Ich möchte eine Tabelle erstellen, in welcher der Inhalt samt Titel ohne Abstand ganz links in der Zelle steht. Mit
@{} an der richtigen Stelle funktioniert das auch ganz gut.
\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\renewcommand{\arraystretch}{1} % Zeilenhöhe der Tabelle
\begin{tabular}{|p{0.6cm}|@{}l|}
\multicolumn{2}{@{}l}{\bfseries Titel}\\
\multicolumn{2}{c}{}\\
\hline
A & a\\
\hline
B & b\\
\hline
C & c\\
\hline
\end{tabular}
\end{document}
Jetzt habe ich aber das Problem, dass ich die rechte Spalte mit Farbe hinterlegen will. Der Befehl
>{\columncolor{yellow}} überschreibt aber offenbar
@{}. Wie bring ich das trotzdem hin?
\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\renewcommand{\arraystretch}{1} % Zeilenhöhe der Tabelle
\begin{tabular}{|p{0.6cm}|@{}>{\columncolor{yellow}}l|}
\multicolumn{2}{@{}l}{\bfseries Titel}\\
\multicolumn{2}{c}{}\\
\hline
A & a\\
\hline
B & b\\
\hline
C & c\\
\hline
\end{tabular}
\end{document}