1

I have a complicated table that is basically doing what I want, but the top row (representing the top level of headings) is a bit too high.

In the image below, 'A' indicates what I have, and 'B' indicates what I seek.

LaTeX table with top headings too high

Here is a minimal(ish) example of the code I am using.

\documentclass{memoir}

\usepackage{graphicx}

\begin{document}

\begin{table}[ht!]
\resizebox{\textwidth}{!}{%
\centering
\begin{tabular}{lccccccc}
\toprule
 &  \multicolumn{2}{c}{Heading text} & & & \multicolumn{3}{c}{Even more heading text}\\
\\\cline{2-3}\cline{6-8}
\begin{tabular}[c]{@{}c@{}}\rule{48pt}{0ex}Leftmost\\\rule{48pt}{0ex}Header (w)\end{tabular}&\begin{tabular}[c]{@{}c@{}}A\\Header\end{tabular} & \begin{tabular}[c]{@{}c@{}}A\\Header\end{tabular} & Header & \begin{tabular}[c]{@{}c@{}}A\\Long\\Header\end{tabular} & \begin{tabular}[c]{@{}c@{}}Another\\Header\end{tabular} & \begin{tabular}[c]{@{}c@{}}Another\\Header\end{tabular} & \begin{tabular}[c]{@{}c@{}}Another \\Longish\\long header\end{tabular} \\
\hline
\begin{tabular}[c]{@{}c@{}}\rule{8pt}{0ex}First row\end{tabular} & 6.76 & 18.60 & 1.01 & 0.98 & 0.11 & 5.10 & 12.43\\
\begin{tabular}[c]{@{}c@{}}\rule{8pt}{0ex}Second row\end{tabular} & 6.21 & 18.60 & 1.10 & 0.98 & 0.40 & 9.84 & 18.02\\
\hline
\end{tabular}}
\end{table}

\end{document}
0

1 Answer 1

3

Remove \\ from

\\\cline{2-3}\cline{6-8}

result should be:

\toprule
 &  \multicolumn{2}{c}{Heading text} & & & \multicolumn{3}{c}{Even more heading text}\\\cline{2-3}\cline{6-8}

You must log in to answer this question.

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