Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted
+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}
share|improve this answer
    
Ok, this is awesome!! Thank you! 50 points will be on your account as soon as possible –  strauberry Aug 8 '11 at 11:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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