PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : farbige Zellen in Tabellen



CPPeter
22-04-2005, 23:30
\documentclass{scrartcl}

\usepackage[ngerman]{babel}
\usepackage{colortbl}
\usepackage{multirow}

\definecolor{TableHeadGray}{gray}{.8}

\begin{document}

\begin{small}
\setlength{\extrarowheight}{2mm}
\begin{tabular}{| l | p{2.5cm} | c | p{2.5cm} | c |}
\hline
\multirow{2}{*}{\bf{Zahlensystem}} &
\multicolumn{2}{ >{\columncolor{TableHeadGray}} c |}{\bf{Keil 8051 Assembler}} &
\multicolumn{2}{ >{\columncolor{TableHeadGray}} c |}{\bf{ANSI-C}} \\
\cline{2-5}
&
\multicolumn{1}{ >{\columncolor{TableHeadGray}} c |} {Kennzeichnung} &
\multicolumn{1}{ >{\columncolor{TableHeadGray}} c |} {Beispiel} &
\multicolumn{1}{ >{\columncolor{TableHeadGray}} c |} {Kennzeichnung} &
\multicolumn{1}{ >{\columncolor{TableHeadGray}} c |} {Beispiel} \\

\hline
\multicolumn{1}{| >{\columncolor{TableHeadGray}} l |}{\bf{Dual}} & ein 'b' hinter der Zahl & 1001011\textbf{b} & nicht unterst"utzt & --- \\
\hline
\multicolumn{1}{| >{\columncolor{TableHeadGray}} l |}{\bf{Dezimal}} & keine besondere Kennzeichnung & 194 & keine besondere Kennzeichnung & 194 \\
\hline
\multicolumn{1}{| >{\columncolor{TableHeadGray}} l |}{\bf{Hexadezimal}} & ein '0x' vor der Zahl & \textbf{0x}A6 & ein '0x' vor der Zahl & \textbf{0x}A6 \\
\hline
\multicolumn{1}{| >{\columncolor{TableHeadGray}} l |}{\bf{Oktal}} & ein 'q' hinter der Zahl & 175\textbf{q} & f"uhrende '0' & \textbf{0}175 \\
\hline
\end{tabular}
\end{small}

\end{document}

CPPeter
22-04-2005, 23:40
Hoppla, "Antworten" statt "Vorschau" erwischt.
Thread einfach ignorieren.