I saw a table created in PowerPoint and wanted to know how to do it in LaTeX. The table is shown below. The aspects of the table that I'm most interested in are the rotated table headers as well as Knowledge Areas
and Process
labels outside the table.
Here is what I've come up with so far after seeing Rotated column titles in tabular
suggested in the comments (thanks!)
\documentclass{article}
\usepackage{adjustbox}
\usepackage{array}
\usepackage{booktabs}
\usepackage{multirow}
\newcolumntype{R}[2]{%
>{\adjustbox{angle=#1,lap=\width-(#2)}\bgroup}%
l%
<{\egroup}%
}
\newcommand*\rot{\multicolumn{1}{R{90}{1em}}}% no optional argument here, please!
\begin{document}
\begin{table} \centering
\begin{tabular}{clcccccccccc}
& & \multicolumn{10}{c}{Knowledge Areas} \\
& & \rot{Integration} & \rot{Scope} & \rot{Time} & \rot{Cost}
& \rot{Quality} & \rot{Human Resource} & \rot{Communication}
& \rot{Risk} & \rot{Procurement} & \rot{Stakeholder Management} \\
\midrule
\multirow{5}{*}{{Processes}}
& Initiating & * & & & & & & * & & & * \\
& Planning & * & * & * & * & * & * & * & * & * & * \\
& Executing & * & & & & * & * & * & & * & * \\
& Monitoring and Control & * & * & * & * & * & & * & * & * & * \\
& Closing & * & & & & & & * & & * & * \\
\bottomrule
\end{tabular}
\caption{Some caption}
\end{table}
\end{document}
With the result looking like:
I'm not so concerned about the row coloring (sorry, should have mentioned that before). There are just a few things I don't know how to do:
- How can I make
Stakeholder Management
stack on top of each other? - How can I rotate
Processes
on the left-hand side? The\rot
command I used in the table header didn't work, presumably because it is in the\multirow
command.
Best Answer
Using
\rlap
makes it easier to position text without additional space. And if you want the label "Processes" outside then use\cmidrule{2-12}
and\cmidrule[1pt]{2-12}
instead.and the same colored: