Redundant \cmidrule commands in formal tables

Andrew Parsloe ajparsloe at gmail.com
Fri Sep 18 05:53:25 UTC 2020


I notice when creating a title for a number of columns in a formal table 
that the \cmidrule command is needlessly duplicated:

\begin{tabular}{ccccc}
\toprule
  & \multicolumn{4}{c}{title}\tabularnewline
\cmidrule{2-5} \cmidrule{3-5} \cmidrule{4-5} \cmidrule{5-5}
x & 1 & 2 & 3 & 4\tabularnewline
\midrule
1 & b & l & a & h\tabularnewline
2 & b & l & a & h\tabularnewline
\bottomrule
\end{tabular}

Although the table compiles without problems, \cmidrule{2-5} suffices.

Andrew



More information about the lyx-devel mailing list