I have to build lots of tables similar to my MWEm only more complex and with many more columns. Manually adjusting the cmidlines and column width etc. is very annoying.

What can I do to automatically build a header like in the red box? It should be configurable with two to eight columns in the second row and draw its own configurable cmidline.

Maybe a command can look like this :

\greathead{Benutzerführung}{Erklärungen, Wizard}{r{3pt}}

enter image description here

I've tried things like a multirow in a mutlicolumn with multicolumns in the second row, but everything I tried messed up the whole table or doesn't even compile.




\newcommand\rota[1]{\rotatebox{90}{#1\ }}



This text has normal textwidth.\\

%\tiny 6 \scriptsize 8 \footnotesize 10 \small 11 \normalsize 12


\begin{tabularx}{\textwidth}{@{} X* {5}{WG}@{}}
\caption{Some Title}\\
& \dimension{2}{Benutzerführung} & \dimension{2}{Canvastypen} & \dimension{2}{Custom Canvas} & \dimension{2}{Export} & \dimension{2}{Finanzübersicht} \\

\cmidrule(r{\sepa}){2-3} \cmidrule(l{\sepa}r{\sepa}){4-5} \cmidrule(l{\sepa}r{\sepa}){6-7} \cmidrule(l{\sepa}r{\sepa}){8-9} \cmidrule(l{\sepa}){10-11}

& \charakteristik{Erklärungen} & \charakteristik{Wizard}
& \charakteristik{BMC} & \charakteristik{Weitere}
& \charakteristik{keine} & \charakteristik{austauschbar}
& \charakteristik{kein} & \charakteristik{Grafik}
& \charakteristik{keine} & \charakteristik{Erlöse-Kosten}
\\ \midrule \endhead
% Content
oneoneoneone & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 0 & 1\\
  • The problem is that you need the bottom rotated text to line up with the individual columns. If you merged the two columns and used a predefined size (e.g. \makebox{3em}{2\hfil 3}) then you could create a rotated header using \parbox and \rule. – John Kormylo Aug 30 '15 at 15:48

Here are basic building blocks. Frankly, it's a whole lot easier letting tabularx do all the work.


\usepackage{xcolor}% loaded by colortbl
\usepackage{graphicx}% loaded by rotating



How to create a box of a given width (1em) with a colored background.


How to line up horizontal and rotated vertical text.

\fbox{\makebox[2em]{2\hfill 3}}

\fbox{\rotatebox{90}{\parbox[c][2em][s]{1in}{\centering top line
\linebreak\vspace{-\baselineskip}\vfill bottom line}}}


building blocks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.