How to make table with rotated table headers in LaTeX











up vote
45
down vote

favorite
25












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.



screenshot



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:



enter image description here



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:




  1. How can I make Stakeholder Management stack on top of each other?

  2. 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.










share|improve this question




















  • 5




    could you show what you've tried so far? perhaps Rotated Column Titles in Tabular will get you started....
    – cmhughes
    Feb 15 '13 at 18:03






  • 12




    Did you searched for suitable similar questions? Rowcoloring and rotating should be already covered.
    – Martin Scharrer
    Feb 15 '13 at 18:03






  • 2




    those labels "Knowledge Areas" and "Process" are not really labels, there are just a further row and a further column, respectively. can be done with multirow and multicolumn. And this table has a flaw that I would not want to copy. Stuff should be readable when the head is tilted to the left. Like the process lable. All the stuf in the green part is the wrong way round.
    – nonsense
    Feb 15 '13 at 19:20












  • @eject I tried to make the Process label on the left side rotated 90º like the table headers, but got an error. Do you know how to make it work?
    – jlconlin
    Feb 16 '13 at 0:33















up vote
45
down vote

favorite
25












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.



screenshot



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:



enter image description here



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:




  1. How can I make Stakeholder Management stack on top of each other?

  2. 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.










share|improve this question




















  • 5




    could you show what you've tried so far? perhaps Rotated Column Titles in Tabular will get you started....
    – cmhughes
    Feb 15 '13 at 18:03






  • 12




    Did you searched for suitable similar questions? Rowcoloring and rotating should be already covered.
    – Martin Scharrer
    Feb 15 '13 at 18:03






  • 2




    those labels "Knowledge Areas" and "Process" are not really labels, there are just a further row and a further column, respectively. can be done with multirow and multicolumn. And this table has a flaw that I would not want to copy. Stuff should be readable when the head is tilted to the left. Like the process lable. All the stuf in the green part is the wrong way round.
    – nonsense
    Feb 15 '13 at 19:20












  • @eject I tried to make the Process label on the left side rotated 90º like the table headers, but got an error. Do you know how to make it work?
    – jlconlin
    Feb 16 '13 at 0:33













up vote
45
down vote

favorite
25









up vote
45
down vote

favorite
25






25





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.



screenshot



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:



enter image description here



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:




  1. How can I make Stakeholder Management stack on top of each other?

  2. 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.










share|improve this question















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.



screenshot



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:



enter image description here



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:




  1. How can I make Stakeholder Management stack on top of each other?

  2. 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.







tables color rotating






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 15 '17 at 18:32









Moriambar

7,83731846




7,83731846










asked Feb 15 '13 at 17:56









jlconlin

4,046102944




4,046102944








  • 5




    could you show what you've tried so far? perhaps Rotated Column Titles in Tabular will get you started....
    – cmhughes
    Feb 15 '13 at 18:03






  • 12




    Did you searched for suitable similar questions? Rowcoloring and rotating should be already covered.
    – Martin Scharrer
    Feb 15 '13 at 18:03






  • 2




    those labels "Knowledge Areas" and "Process" are not really labels, there are just a further row and a further column, respectively. can be done with multirow and multicolumn. And this table has a flaw that I would not want to copy. Stuff should be readable when the head is tilted to the left. Like the process lable. All the stuf in the green part is the wrong way round.
    – nonsense
    Feb 15 '13 at 19:20












  • @eject I tried to make the Process label on the left side rotated 90º like the table headers, but got an error. Do you know how to make it work?
    – jlconlin
    Feb 16 '13 at 0:33














  • 5




    could you show what you've tried so far? perhaps Rotated Column Titles in Tabular will get you started....
    – cmhughes
    Feb 15 '13 at 18:03






  • 12




    Did you searched for suitable similar questions? Rowcoloring and rotating should be already covered.
    – Martin Scharrer
    Feb 15 '13 at 18:03






  • 2




    those labels "Knowledge Areas" and "Process" are not really labels, there are just a further row and a further column, respectively. can be done with multirow and multicolumn. And this table has a flaw that I would not want to copy. Stuff should be readable when the head is tilted to the left. Like the process lable. All the stuf in the green part is the wrong way round.
    – nonsense
    Feb 15 '13 at 19:20












  • @eject I tried to make the Process label on the left side rotated 90º like the table headers, but got an error. Do you know how to make it work?
    – jlconlin
    Feb 16 '13 at 0:33








5




5




could you show what you've tried so far? perhaps Rotated Column Titles in Tabular will get you started....
– cmhughes
Feb 15 '13 at 18:03




could you show what you've tried so far? perhaps Rotated Column Titles in Tabular will get you started....
– cmhughes
Feb 15 '13 at 18:03




12




12




Did you searched for suitable similar questions? Rowcoloring and rotating should be already covered.
– Martin Scharrer
Feb 15 '13 at 18:03




Did you searched for suitable similar questions? Rowcoloring and rotating should be already covered.
– Martin Scharrer
Feb 15 '13 at 18:03




2




2




those labels "Knowledge Areas" and "Process" are not really labels, there are just a further row and a further column, respectively. can be done with multirow and multicolumn. And this table has a flaw that I would not want to copy. Stuff should be readable when the head is tilted to the left. Like the process lable. All the stuf in the green part is the wrong way round.
– nonsense
Feb 15 '13 at 19:20






those labels "Knowledge Areas" and "Process" are not really labels, there are just a further row and a further column, respectively. can be done with multirow and multicolumn. And this table has a flaw that I would not want to copy. Stuff should be readable when the head is tilted to the left. Like the process lable. All the stuf in the green part is the wrong way round.
– nonsense
Feb 15 '13 at 19:20














@eject I tried to make the Process label on the left side rotated 90º like the table headers, but got an error. Do you know how to make it work?
– jlconlin
Feb 16 '13 at 0:33




@eject I tried to make the Process label on the left side rotated 90º like the table headers, but got an error. Do you know how to make it work?
– jlconlin
Feb 16 '13 at 0:33










3 Answers
3






active

oldest

votes

















up vote
40
down vote



accepted










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.



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cl*{10}c @{}}
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
& & 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}
& Initiating & OK & & & & & & OK & & & OK \
& Planning & OK & OK & OK & OK & OK & OK & OK & OK & OK & OK \
& Executing & OK & & & & OK & OK & OK & & OK & OK \
& Monitoring and Control & OK & OK & OK & OK & OK & & OK & OK & OK & OK \
rot{rlap{~Processes}}
& Closing & OK & & & & & & OK & & OK & OK \
cmidrule[1pt]{2-12}
end{tabular}
caption{Some caption}
end{table}

end{document}


enter image description here



and the same colored:



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}
usepackage[table]{xcolor}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cr*{10}c }
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
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}
caption{Some caption}
end{table}

end{document}


enter image description here






share|improve this answer























  • You didn't use pstricks?
    – user10274
    Feb 16 '13 at 10:41










  • Very nicely done.
    – jlconlin
    Feb 17 '13 at 3:14










  • I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
    – Qrrbrbirlbel
    Feb 17 '13 at 19:26










  • Too bad the color version has an option clash for xcolor when using beamer.
    – Steven C. Howell
    Nov 15 '15 at 23:45












  • @ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
    – Herbert
    Nov 16 '15 at 8:37




















up vote
29
down vote













When I tried to read your table, I found it impossible to read the column headings because of the rotation, which is why I recommend a solution without rotation. All it is is a simple reorganisation of the rows and columns.



It isn't perfect. Perhaps aligning the Processes to the right is better.



You can simplify the table as well because all knowledge areas require planning, so why put it in the table? Just mention it in the caption. Removing the column for planning should make the table less wide, which is always a good thing because it makes it easier to scan the table from left to right and back.



documentclass{article}
usepackage{booktabs}
newcommand*ON[0]{$surd$}

begin{document}

begin{table}
begin{center}
begin{tabular}{@{}lccccc@{}}
& multicolumn{5}{c}{textbf{Processes}}
\ cmidrule{2-6}
& & & & textbf{Monitoring}
\ textbf{Knowledge Areas}
& textbf{Initiating}
& textbf{Planning}
& textbf{Executing}
& textbf{& Control}
& textbf{Costing}
\ midrule
textbf{Integration} & ON & ON & ON & ON & ON
\ textbf{Scope} & & ON & & ON &
\ textbf{Time} & & ON & & ON &
\ textbf{Cost} & & ON & & ON &
\ textbf{Quality} & & ON & ON & ON &
\ textbf{Human Resource} & & ON & ON & &
\ textbf{Communication} & ON & ON & ON & ON & ON
\ textbf{Risk} & & ON & & ON &
\ textbf{Procurement} & & ON & ON & ON & ON
\ textbf{Stakeholder
Management} & ON & ON & ON & ON & ON
\ bottomrule
end{tabular}
caption{Some caption}
end{center}
end{table}

end{document}


Table






share|improve this answer



















  • 2




    +1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
    – Yiannis Lazarides
    Feb 16 '13 at 9:15




















up vote
19
down vote













I had made a similar table for my use.



enter image description here



documentclass[oneside, 10pt, a4paper]{article}

usepackage{multirow}
usepackage{graphicx}
usepackage{booktabs}

newcommand{mcrot}[4]{multicolumn{#1}{#2}{rlap{rotatebox{#3}{#4}~}}}

newcommand*{twoelementtable}[3][l]%
{%
renewcommand{arraystretch}{0.8}%
begin{tabular}[t]{@{}#1@{}}%
#2tabularnewline
#3%
end{tabular}%
}

begin{document}

begin{table}[h] label{tab:activityTracking}
centering
caption{Tracking daily activities.}
begin{tabular}{ *2{ll|} *6c | *6c }
\
multicolumn{2}{c}{Date} & multicolumn{1}{c}{Start} & multicolumn{1}{c}{Stop}
& mcrot{1}{l}{60}{Activity 1} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p}& mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup}
& mcrot{1}{l}{60}{Activity 2} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p} & mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup} \
midrule midrule

multirow{4}{*}{rotatebox{90}{textbf{January}}}
& 11 & 1:30~am & 10:45~am
& x & x & multicolumn{2}{c}{-} & - & x
& - & x & multicolumn{2}{c}{x} & x & x \
& 12 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 13 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 14 & &
& - & - & multicolumn{2}{c}{-} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
bottomrule
end{tabular}
end{table}

end{document}





share|improve this answer























  • Is there a way to apply this to rotated cells at the very bottom of the table?
    – oarfish
    Apr 6 '16 at 15:42










  • The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
    – TimK
    Feb 5 '17 at 11:21











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f98388%2fhow-to-make-table-with-rotated-table-headers-in-latex%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
40
down vote



accepted










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.



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cl*{10}c @{}}
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
& & 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}
& Initiating & OK & & & & & & OK & & & OK \
& Planning & OK & OK & OK & OK & OK & OK & OK & OK & OK & OK \
& Executing & OK & & & & OK & OK & OK & & OK & OK \
& Monitoring and Control & OK & OK & OK & OK & OK & & OK & OK & OK & OK \
rot{rlap{~Processes}}
& Closing & OK & & & & & & OK & & OK & OK \
cmidrule[1pt]{2-12}
end{tabular}
caption{Some caption}
end{table}

end{document}


enter image description here



and the same colored:



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}
usepackage[table]{xcolor}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cr*{10}c }
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
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}
caption{Some caption}
end{table}

end{document}


enter image description here






share|improve this answer























  • You didn't use pstricks?
    – user10274
    Feb 16 '13 at 10:41










  • Very nicely done.
    – jlconlin
    Feb 17 '13 at 3:14










  • I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
    – Qrrbrbirlbel
    Feb 17 '13 at 19:26










  • Too bad the color version has an option clash for xcolor when using beamer.
    – Steven C. Howell
    Nov 15 '15 at 23:45












  • @ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
    – Herbert
    Nov 16 '15 at 8:37

















up vote
40
down vote



accepted










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.



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cl*{10}c @{}}
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
& & 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}
& Initiating & OK & & & & & & OK & & & OK \
& Planning & OK & OK & OK & OK & OK & OK & OK & OK & OK & OK \
& Executing & OK & & & & OK & OK & OK & & OK & OK \
& Monitoring and Control & OK & OK & OK & OK & OK & & OK & OK & OK & OK \
rot{rlap{~Processes}}
& Closing & OK & & & & & & OK & & OK & OK \
cmidrule[1pt]{2-12}
end{tabular}
caption{Some caption}
end{table}

end{document}


enter image description here



and the same colored:



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}
usepackage[table]{xcolor}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cr*{10}c }
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
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}
caption{Some caption}
end{table}

end{document}


enter image description here






share|improve this answer























  • You didn't use pstricks?
    – user10274
    Feb 16 '13 at 10:41










  • Very nicely done.
    – jlconlin
    Feb 17 '13 at 3:14










  • I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
    – Qrrbrbirlbel
    Feb 17 '13 at 19:26










  • Too bad the color version has an option clash for xcolor when using beamer.
    – Steven C. Howell
    Nov 15 '15 at 23:45












  • @ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
    – Herbert
    Nov 16 '15 at 8:37















up vote
40
down vote



accepted







up vote
40
down vote



accepted






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.



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cl*{10}c @{}}
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
& & 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}
& Initiating & OK & & & & & & OK & & & OK \
& Planning & OK & OK & OK & OK & OK & OK & OK & OK & OK & OK \
& Executing & OK & & & & OK & OK & OK & & OK & OK \
& Monitoring and Control & OK & OK & OK & OK & OK & & OK & OK & OK & OK \
rot{rlap{~Processes}}
& Closing & OK & & & & & & OK & & OK & OK \
cmidrule[1pt]{2-12}
end{tabular}
caption{Some caption}
end{table}

end{document}


enter image description here



and the same colored:



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}
usepackage[table]{xcolor}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cr*{10}c }
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
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}
caption{Some caption}
end{table}

end{document}


enter image description here






share|improve this 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.



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cl*{10}c @{}}
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
& & 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}
& Initiating & OK & & & & & & OK & & & OK \
& Planning & OK & OK & OK & OK & OK & OK & OK & OK & OK & OK \
& Executing & OK & & & & OK & OK & OK & & OK & OK \
& Monitoring and Control & OK & OK & OK & OK & OK & & OK & OK & OK & OK \
rot{rlap{~Processes}}
& Closing & OK & & & & & & OK & & OK & OK \
cmidrule[1pt]{2-12}
end{tabular}
caption{Some caption}
end{table}

end{document}


enter image description here



and the same colored:



documentclass{article}
usepackage{array,graphicx}
usepackage{booktabs}
usepackage{pifont}
usepackage[table]{xcolor}

newcommand*rot{rotatebox{90}}
newcommand*OK{ding{51}}

begin{document}

begin{table} centering
begin{tabular}{@{} cr*{10}c }
& & multicolumn{10}{c}{Knowledge Areas} \[2ex]
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}
caption{Some caption}
end{table}

end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 9 '17 at 16:24









Moriambar

7,83731846




7,83731846










answered Feb 16 '13 at 7:52









Herbert

267k23406716




267k23406716












  • You didn't use pstricks?
    – user10274
    Feb 16 '13 at 10:41










  • Very nicely done.
    – jlconlin
    Feb 17 '13 at 3:14










  • I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
    – Qrrbrbirlbel
    Feb 17 '13 at 19:26










  • Too bad the color version has an option clash for xcolor when using beamer.
    – Steven C. Howell
    Nov 15 '15 at 23:45












  • @ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
    – Herbert
    Nov 16 '15 at 8:37




















  • You didn't use pstricks?
    – user10274
    Feb 16 '13 at 10:41










  • Very nicely done.
    – jlconlin
    Feb 17 '13 at 3:14










  • I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
    – Qrrbrbirlbel
    Feb 17 '13 at 19:26










  • Too bad the color version has an option clash for xcolor when using beamer.
    – Steven C. Howell
    Nov 15 '15 at 23:45












  • @ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
    – Herbert
    Nov 16 '15 at 8:37


















You didn't use pstricks?
– user10274
Feb 16 '13 at 10:41




You didn't use pstricks?
– user10274
Feb 16 '13 at 10:41












Very nicely done.
– jlconlin
Feb 17 '13 at 3:14




Very nicely done.
– jlconlin
Feb 17 '13 at 3:14












I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
– Qrrbrbirlbel
Feb 17 '13 at 19:26




I’d use cmidrule[heavyrulewidth]{2-12} for the bottom line to have the same width as bottomrule.
– Qrrbrbirlbel
Feb 17 '13 at 19:26












Too bad the color version has an option clash for xcolor when using beamer.
– Steven C. Howell
Nov 15 '15 at 23:45






Too bad the color version has an option clash for xcolor when using beamer.
– Steven C. Howell
Nov 15 '15 at 23:45














@ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
– Herbert
Nov 16 '15 at 8:37






@ago: write before documentclass the command PassOptionsToPackage{table}{xcolor} or pass the option table via beamer to xcolor.
– Herbert
Nov 16 '15 at 8:37












up vote
29
down vote













When I tried to read your table, I found it impossible to read the column headings because of the rotation, which is why I recommend a solution without rotation. All it is is a simple reorganisation of the rows and columns.



It isn't perfect. Perhaps aligning the Processes to the right is better.



You can simplify the table as well because all knowledge areas require planning, so why put it in the table? Just mention it in the caption. Removing the column for planning should make the table less wide, which is always a good thing because it makes it easier to scan the table from left to right and back.



documentclass{article}
usepackage{booktabs}
newcommand*ON[0]{$surd$}

begin{document}

begin{table}
begin{center}
begin{tabular}{@{}lccccc@{}}
& multicolumn{5}{c}{textbf{Processes}}
\ cmidrule{2-6}
& & & & textbf{Monitoring}
\ textbf{Knowledge Areas}
& textbf{Initiating}
& textbf{Planning}
& textbf{Executing}
& textbf{& Control}
& textbf{Costing}
\ midrule
textbf{Integration} & ON & ON & ON & ON & ON
\ textbf{Scope} & & ON & & ON &
\ textbf{Time} & & ON & & ON &
\ textbf{Cost} & & ON & & ON &
\ textbf{Quality} & & ON & ON & ON &
\ textbf{Human Resource} & & ON & ON & &
\ textbf{Communication} & ON & ON & ON & ON & ON
\ textbf{Risk} & & ON & & ON &
\ textbf{Procurement} & & ON & ON & ON & ON
\ textbf{Stakeholder
Management} & ON & ON & ON & ON & ON
\ bottomrule
end{tabular}
caption{Some caption}
end{center}
end{table}

end{document}


Table






share|improve this answer



















  • 2




    +1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
    – Yiannis Lazarides
    Feb 16 '13 at 9:15

















up vote
29
down vote













When I tried to read your table, I found it impossible to read the column headings because of the rotation, which is why I recommend a solution without rotation. All it is is a simple reorganisation of the rows and columns.



It isn't perfect. Perhaps aligning the Processes to the right is better.



You can simplify the table as well because all knowledge areas require planning, so why put it in the table? Just mention it in the caption. Removing the column for planning should make the table less wide, which is always a good thing because it makes it easier to scan the table from left to right and back.



documentclass{article}
usepackage{booktabs}
newcommand*ON[0]{$surd$}

begin{document}

begin{table}
begin{center}
begin{tabular}{@{}lccccc@{}}
& multicolumn{5}{c}{textbf{Processes}}
\ cmidrule{2-6}
& & & & textbf{Monitoring}
\ textbf{Knowledge Areas}
& textbf{Initiating}
& textbf{Planning}
& textbf{Executing}
& textbf{& Control}
& textbf{Costing}
\ midrule
textbf{Integration} & ON & ON & ON & ON & ON
\ textbf{Scope} & & ON & & ON &
\ textbf{Time} & & ON & & ON &
\ textbf{Cost} & & ON & & ON &
\ textbf{Quality} & & ON & ON & ON &
\ textbf{Human Resource} & & ON & ON & &
\ textbf{Communication} & ON & ON & ON & ON & ON
\ textbf{Risk} & & ON & & ON &
\ textbf{Procurement} & & ON & ON & ON & ON
\ textbf{Stakeholder
Management} & ON & ON & ON & ON & ON
\ bottomrule
end{tabular}
caption{Some caption}
end{center}
end{table}

end{document}


Table






share|improve this answer



















  • 2




    +1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
    – Yiannis Lazarides
    Feb 16 '13 at 9:15















up vote
29
down vote










up vote
29
down vote









When I tried to read your table, I found it impossible to read the column headings because of the rotation, which is why I recommend a solution without rotation. All it is is a simple reorganisation of the rows and columns.



It isn't perfect. Perhaps aligning the Processes to the right is better.



You can simplify the table as well because all knowledge areas require planning, so why put it in the table? Just mention it in the caption. Removing the column for planning should make the table less wide, which is always a good thing because it makes it easier to scan the table from left to right and back.



documentclass{article}
usepackage{booktabs}
newcommand*ON[0]{$surd$}

begin{document}

begin{table}
begin{center}
begin{tabular}{@{}lccccc@{}}
& multicolumn{5}{c}{textbf{Processes}}
\ cmidrule{2-6}
& & & & textbf{Monitoring}
\ textbf{Knowledge Areas}
& textbf{Initiating}
& textbf{Planning}
& textbf{Executing}
& textbf{& Control}
& textbf{Costing}
\ midrule
textbf{Integration} & ON & ON & ON & ON & ON
\ textbf{Scope} & & ON & & ON &
\ textbf{Time} & & ON & & ON &
\ textbf{Cost} & & ON & & ON &
\ textbf{Quality} & & ON & ON & ON &
\ textbf{Human Resource} & & ON & ON & &
\ textbf{Communication} & ON & ON & ON & ON & ON
\ textbf{Risk} & & ON & & ON &
\ textbf{Procurement} & & ON & ON & ON & ON
\ textbf{Stakeholder
Management} & ON & ON & ON & ON & ON
\ bottomrule
end{tabular}
caption{Some caption}
end{center}
end{table}

end{document}


Table






share|improve this answer














When I tried to read your table, I found it impossible to read the column headings because of the rotation, which is why I recommend a solution without rotation. All it is is a simple reorganisation of the rows and columns.



It isn't perfect. Perhaps aligning the Processes to the right is better.



You can simplify the table as well because all knowledge areas require planning, so why put it in the table? Just mention it in the caption. Removing the column for planning should make the table less wide, which is always a good thing because it makes it easier to scan the table from left to right and back.



documentclass{article}
usepackage{booktabs}
newcommand*ON[0]{$surd$}

begin{document}

begin{table}
begin{center}
begin{tabular}{@{}lccccc@{}}
& multicolumn{5}{c}{textbf{Processes}}
\ cmidrule{2-6}
& & & & textbf{Monitoring}
\ textbf{Knowledge Areas}
& textbf{Initiating}
& textbf{Planning}
& textbf{Executing}
& textbf{& Control}
& textbf{Costing}
\ midrule
textbf{Integration} & ON & ON & ON & ON & ON
\ textbf{Scope} & & ON & & ON &
\ textbf{Time} & & ON & & ON &
\ textbf{Cost} & & ON & & ON &
\ textbf{Quality} & & ON & ON & ON &
\ textbf{Human Resource} & & ON & ON & &
\ textbf{Communication} & ON & ON & ON & ON & ON
\ textbf{Risk} & & ON & & ON &
\ textbf{Procurement} & & ON & ON & ON & ON
\ textbf{Stakeholder
Management} & ON & ON & ON & ON & ON
\ bottomrule
end{tabular}
caption{Some caption}
end{center}
end{table}

end{document}


Table







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 16 '13 at 11:26

























answered Feb 16 '13 at 7:06







user10274















  • 2




    +1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
    – Yiannis Lazarides
    Feb 16 '13 at 9:15
















  • 2




    +1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
    – Yiannis Lazarides
    Feb 16 '13 at 9:15










2




2




+1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
– Yiannis Lazarides
Feb 16 '13 at 9:15






+1 For not having to turn my head to read anything. To be personally I would have left out the "Processes", as is self-evident.
– Yiannis Lazarides
Feb 16 '13 at 9:15












up vote
19
down vote













I had made a similar table for my use.



enter image description here



documentclass[oneside, 10pt, a4paper]{article}

usepackage{multirow}
usepackage{graphicx}
usepackage{booktabs}

newcommand{mcrot}[4]{multicolumn{#1}{#2}{rlap{rotatebox{#3}{#4}~}}}

newcommand*{twoelementtable}[3][l]%
{%
renewcommand{arraystretch}{0.8}%
begin{tabular}[t]{@{}#1@{}}%
#2tabularnewline
#3%
end{tabular}%
}

begin{document}

begin{table}[h] label{tab:activityTracking}
centering
caption{Tracking daily activities.}
begin{tabular}{ *2{ll|} *6c | *6c }
\
multicolumn{2}{c}{Date} & multicolumn{1}{c}{Start} & multicolumn{1}{c}{Stop}
& mcrot{1}{l}{60}{Activity 1} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p}& mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup}
& mcrot{1}{l}{60}{Activity 2} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p} & mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup} \
midrule midrule

multirow{4}{*}{rotatebox{90}{textbf{January}}}
& 11 & 1:30~am & 10:45~am
& x & x & multicolumn{2}{c}{-} & - & x
& - & x & multicolumn{2}{c}{x} & x & x \
& 12 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 13 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 14 & &
& - & - & multicolumn{2}{c}{-} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
bottomrule
end{tabular}
end{table}

end{document}





share|improve this answer























  • Is there a way to apply this to rotated cells at the very bottom of the table?
    – oarfish
    Apr 6 '16 at 15:42










  • The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
    – TimK
    Feb 5 '17 at 11:21















up vote
19
down vote













I had made a similar table for my use.



enter image description here



documentclass[oneside, 10pt, a4paper]{article}

usepackage{multirow}
usepackage{graphicx}
usepackage{booktabs}

newcommand{mcrot}[4]{multicolumn{#1}{#2}{rlap{rotatebox{#3}{#4}~}}}

newcommand*{twoelementtable}[3][l]%
{%
renewcommand{arraystretch}{0.8}%
begin{tabular}[t]{@{}#1@{}}%
#2tabularnewline
#3%
end{tabular}%
}

begin{document}

begin{table}[h] label{tab:activityTracking}
centering
caption{Tracking daily activities.}
begin{tabular}{ *2{ll|} *6c | *6c }
\
multicolumn{2}{c}{Date} & multicolumn{1}{c}{Start} & multicolumn{1}{c}{Stop}
& mcrot{1}{l}{60}{Activity 1} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p}& mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup}
& mcrot{1}{l}{60}{Activity 2} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p} & mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup} \
midrule midrule

multirow{4}{*}{rotatebox{90}{textbf{January}}}
& 11 & 1:30~am & 10:45~am
& x & x & multicolumn{2}{c}{-} & - & x
& - & x & multicolumn{2}{c}{x} & x & x \
& 12 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 13 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 14 & &
& - & - & multicolumn{2}{c}{-} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
bottomrule
end{tabular}
end{table}

end{document}





share|improve this answer























  • Is there a way to apply this to rotated cells at the very bottom of the table?
    – oarfish
    Apr 6 '16 at 15:42










  • The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
    – TimK
    Feb 5 '17 at 11:21













up vote
19
down vote










up vote
19
down vote









I had made a similar table for my use.



enter image description here



documentclass[oneside, 10pt, a4paper]{article}

usepackage{multirow}
usepackage{graphicx}
usepackage{booktabs}

newcommand{mcrot}[4]{multicolumn{#1}{#2}{rlap{rotatebox{#3}{#4}~}}}

newcommand*{twoelementtable}[3][l]%
{%
renewcommand{arraystretch}{0.8}%
begin{tabular}[t]{@{}#1@{}}%
#2tabularnewline
#3%
end{tabular}%
}

begin{document}

begin{table}[h] label{tab:activityTracking}
centering
caption{Tracking daily activities.}
begin{tabular}{ *2{ll|} *6c | *6c }
\
multicolumn{2}{c}{Date} & multicolumn{1}{c}{Start} & multicolumn{1}{c}{Stop}
& mcrot{1}{l}{60}{Activity 1} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p}& mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup}
& mcrot{1}{l}{60}{Activity 2} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p} & mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup} \
midrule midrule

multirow{4}{*}{rotatebox{90}{textbf{January}}}
& 11 & 1:30~am & 10:45~am
& x & x & multicolumn{2}{c}{-} & - & x
& - & x & multicolumn{2}{c}{x} & x & x \
& 12 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 13 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 14 & &
& - & - & multicolumn{2}{c}{-} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
bottomrule
end{tabular}
end{table}

end{document}





share|improve this answer














I had made a similar table for my use.



enter image description here



documentclass[oneside, 10pt, a4paper]{article}

usepackage{multirow}
usepackage{graphicx}
usepackage{booktabs}

newcommand{mcrot}[4]{multicolumn{#1}{#2}{rlap{rotatebox{#3}{#4}~}}}

newcommand*{twoelementtable}[3][l]%
{%
renewcommand{arraystretch}{0.8}%
begin{tabular}[t]{@{}#1@{}}%
#2tabularnewline
#3%
end{tabular}%
}

begin{document}

begin{table}[h] label{tab:activityTracking}
centering
caption{Tracking daily activities.}
begin{tabular}{ *2{ll|} *6c | *6c }
\
multicolumn{2}{c}{Date} & multicolumn{1}{c}{Start} & multicolumn{1}{c}{Stop}
& mcrot{1}{l}{60}{Activity 1} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p}& mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup}
& mcrot{1}{l}{60}{Activity 2} & mcrot{1}{l}{60}{Analysis} & mcrot{1}{l}{60}{twoelementtable{No. of}{processes}} & phantom{p} & mcrot{1}{l}{60}{Result} & mcrot{1}{l}{60}{Backup} \
midrule midrule

multirow{4}{*}{rotatebox{90}{textbf{January}}}
& 11 & 1:30~am & 10:45~am
& x & x & multicolumn{2}{c}{-} & - & x
& - & x & multicolumn{2}{c}{x} & x & x \
& 12 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 13 & &
& - & - & multicolumn{2}{c}{x} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
& 14 & &
& - & - & multicolumn{2}{c}{-} & - & -
& - & - & multicolumn{2}{c}{x} & - & - \
bottomrule
end{tabular}
end{table}

end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 15 '17 at 21:03









Moriambar

7,83731846




7,83731846










answered Feb 16 '13 at 8:53









mythealias

2,22631434




2,22631434












  • Is there a way to apply this to rotated cells at the very bottom of the table?
    – oarfish
    Apr 6 '16 at 15:42










  • The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
    – TimK
    Feb 5 '17 at 11:21


















  • Is there a way to apply this to rotated cells at the very bottom of the table?
    – oarfish
    Apr 6 '16 at 15:42










  • The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
    – TimK
    Feb 5 '17 at 11:21
















Is there a way to apply this to rotated cells at the very bottom of the table?
– oarfish
Apr 6 '16 at 15:42




Is there a way to apply this to rotated cells at the very bottom of the table?
– oarfish
Apr 6 '16 at 15:42












The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
– TimK
Feb 5 '17 at 11:21




The only thing I really do not like with your approach is that you have with multiple line boxes a bad alignment of the header!
– TimK
Feb 5 '17 at 11:21


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f98388%2fhow-to-make-table-with-rotated-table-headers-in-latex%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks