[texhax] \cline spaces

Lars Madsen daleif at imf.au.dk
Thu May 13 12:17:10 CEST 2010


Sam Albers wrote:
> Hello there,
> 
> I can't seem to find the answer to the following table issue I am having 
> in LaTeX. The example below work fine but I would like a small space 
> between the \cline's such that the level heading are better 
> distinguished form each other. So I would like a spaces in the line that 
> separate the multi spanning column headers but not the other horizontal 
> lines.
> 
> Is this possible? The example below should illustrate what I am talking 
> about.
> 
> Thanks in advance!
> 
> Sam
> 
> \documentclass[12pt, pdftex]{article}
> \usepackage{multirow}
> \begin{document}
> \begin{table}[htp]
> \begin{center}
> {\scriptsize
> 
> \begin{tabular}{lrrrrrrr}
> \hline
>  &  & \multicolumn{2}{c}{level1} & \multicolumn{2}{c}{level2} & 
> \multicolumn{2}{c}{level3} \\
>  \cline{3-4}  \cline{5-6} \cline{7-8}
> \noalign{\smallskip} 
> type & f1 & f2 & f3 & f4 & f5 & f6 & f7 \\ 
>   \hline
> Section    & 2.3 & 2.288 & 0.009 &  1.779 & 0.008 & 0.338 & 2.1\\ 
>   Period    & 2.8 & 3.309 & 0.002  &  4.060 & 0.000 & 0.866 & 2.3\\ 
>    \hline
> \end{tabular}
> }
> \end{center}
> \end{table}
> \end{document}
> 

see the booktabs package, it also has better spacing above and below its 
special rules

the booktabs equivalent to \cline i called \cmidrule and has options to 
make a separation between two \cmidrule's that would collide.

/daleif



More information about the texhax mailing list