Tabellen mit LaTeX
3.2
No color for the forst column
\documentclass{article}
\usepackage{array,graphicx}
\usepackage{booktabs}
\usepackage{pifont}
\usepackage[table]{xcolor}
\newcommand*\rot{\rotatebox{90}}
\newcommand*\OK{\ding{51}}
\begin{document}
\begin{tabular}{@{} cr*{10}c }
& & \multicolumn{10}{c}{Knowledge Areas} \\[1ex]
\rowcolor{blue!30} \cellcolor{white}
& & \rot{Integration} & \rot{Scope} & \rot{Time} & \rot{Cost}
& \rot{Quality} & \rot{Human Resource~} & \rot{Communication}
& \rot{Risk} & \rot{Procurement} & \rot{\shortstack[l]{Stakeholder\\Management}} \\
\cmidrule{2-12}
\rowcolor{black!15} \cellcolor{white}
& Initiating &\OK & & & & & &\OK & & &\OK \\
& Planning &\OK &\OK &\OK &\OK &\OK &\OK &\OK &\OK &\OK &\OK \\
\rowcolor{black!15} \cellcolor{white}
& Executing &\OK & & & &\OK &\OK &\OK & &\OK &\OK \\
& Monitoring and Control
&\OK &\OK &\OK &\OK &\OK & &\OK &\OK &\OK &\OK \\
\rowcolor{black!15} \cellcolor{white}
\rot{\rlap{~Processes}}
& Closing &\OK & & & & & &\OK & &\OK &\OK \\
\cmidrule[1pt]{2-12}
\end{tabular}
\end{document}
Alternating colors
There are problems with packages which reads the contents twice, eg tabulary
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{tabulary}
\definecolor{light-grey}{gray}{0.9}
%%%%------------- important! ------------%%%%
\let\Tabular\tabular
\def\tabular{\global\rownum=0\relax\Tabular}
\begin{document}
\rowcolors{2}{light-grey}{white}
\begin{tabulary}{\textwidth}{|l|L|}\hline
\textbf{ID} & \textbf{Requirement} \\ \hline
REQ1 & Requirement 1 \\
REQ1 & Requirement 1 \\
REQ1 & Requirement 1 \\
REQ2 & Requirement 2 \\\hline
\end{tabulary}
\end{document}
Zurück zur Hauptseite/Back to main page
Copyright $Id: chapter03.html 5 2022-12-28 17:04:44Z voss $