1

I'm trying to create a complex table, but at the current point I have no idea how to proceed... because there are some questions in it, I'll start a "50" bounty for the question! So the answer will get some points ;-)

enter image description here

The problems I have are the following:

  • The last line with UC7.1 has no space to the row above. I've tried to fix it with parbox, but no luck
  • The next thing is the incomplete vertical line at the very left. I've tried it with the "multirow" trick I found here but again no luck
  • how can I use black vertical lines between the x's and light gray vertical lines between the UC1, UC1.1, ...

Here's my latex code

\newcommand{\rotfortabtop}[1]{\begin{sideways}\parbox[b][0cm][c]{1.3cm}{#1}\end{sideways}}
\newcommand{\rotfortabbottom}[1]{\begin{sideways}\parbox[t][0cm][c]{1.9cm}{\raggedleft{#1}}\end{sideways}}

\begin{tabular}{l c c c c c c c c c c c c c c c c c }
   & \rotfortabtop{UC1} & \rotfortabtop{UC1.1} & \rotfortabtop{UC1.2}
   & \rotfortabtop{UC1.3} & \rotfortabtop{UC2} & \rotfortabtop{UC3.1} & \rotfortabtop{UC3.2}
   & \rotfortabtop{UC4.1} & \rotfortabtop{UC4.2} & \rotfortabtop{UC4.3} &
   \rotfortabtop{UC4.4} & \rotfortabtop{UC5} & \rotfortabtop{UC6} &
   \rotfortabtop{UC6.1} & \rotfortabtop{UC6.2} & \rotfortabtop{UC6.3} &
   \rotfortabtop{UC6.4} \\ \hline
   \multicolumn{1}{|l|}{\multirow{2}{*}{Beispiel}} & \checkmark & \checkmark & x & x & x & x & x & x
   & x & x & x & x & x & x & x & x & x \\ \cline{2-18} & \checkmark & \checkmark
   & x & x & x & x & x & x & x & x & x & x & x & x & x & x & x \\
   \hline & \rotfortabbottom{UC7.1} & \rotfortabbottom{UC7.2} &
   \rotfortabbottom{UC8.1} & \rotfortabbottom{UC8.2} & \rotfortabbottom{UC9} & \rotfortabbottom{NFA1} &
   \rotfortabbottom{NFA2} & \rotfortabbottom{NFA3} & \rotfortabbottom{NFA4} &
   \rotfortabbottom{NFA5} & \rotfortabbottom{NFA6} & \rotfortabbottom{NFA7} & & & & & \\ \hline
\end{tabular}

Thank you!

1 Answer 1

7
+50

please provide full working examples, not only fragments.

\documentclass[12pt]{article}
\usepackage[table]{xcolor}
\usepackage{rotating,array,multirow,amssymb}
\begin{document}

\newcommand\rotfortabtop[1]{\multicolumn{1}{c!{\color{black!20}\vrule}}{\rotatebox{90}{#1}}}
\newcommand\rotfortabbottom[1]{\multicolumn{1}{c!{\color{black!20}\vrule}}{\rotatebox{90}{\makebox[1.5cm][r]{#1~}}}}

\begin{tabular}{l c c c c c c c c c c c c c c c c c }
   & \rotfortabtop{UC1} & \rotfortabtop{UC1.1} & \rotfortabtop{UC1.2}
   & \rotfortabtop{UC1.3} & \rotfortabtop{UC2} & \rotfortabtop{UC3.1} & \rotfortabtop{UC3.2}
   & \rotfortabtop{UC4.1} & \rotfortabtop{UC4.2} & \rotfortabtop{UC4.3} &
   \rotfortabtop{UC4.4} & \rotfortabtop{UC5} & \rotfortabtop{UC6} &
   \rotfortabtop{UC6.1} & \rotfortabtop{UC6.2} & \rotfortabtop{UC6.3} &
   \rotfortabtop{UC6.4} \\ \hline
   \multicolumn{1}{|l|}{\multirow{2}{*}{Beispiel}} & \checkmark & \checkmark & x & x & x & x & x & x
   & x & x & x & x & x & x & x & x & x \\ \cline{2-18} 
   \multicolumn{1}{|l|}{} & \checkmark & \checkmark
   & x & x & x & x & x & x & x & x & x & x & x & x & x & x & x \\\hline 
   & \rotfortabbottom{UC7.1} & \rotfortabbottom{UC7.2} &
   \rotfortabbottom{UC8.1} & \rotfortabbottom{UC8.2} & \rotfortabbottom{UC9} & \rotfortabbottom{NFA1} &
   \rotfortabbottom{NFA2} & \rotfortabbottom{NFA3} & \rotfortabbottom{NFA4} &
   \rotfortabbottom{NFA5} & \rotfortabbottom{NFA6} & \rotfortabbottom{NFA7} & & & & & \\ \hline
\end{tabular}
\end{document}
1
  • Ok, this is awesome!! Thank you! 50 points will be on your account as soon as possible
    – strauberry
    Commented Aug 8, 2011 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .