Redundant \cmidrule commands in formal tables

Andrew Parsloe ajparsloe at gmail.com
Fri Sep 18 10:50:58 UTC 2020


On 18/09/2020 6:39 pm, Jürgen Spitzmüller wrote:
> Am Freitag, den 18.09.2020, 17:53 +1200 schrieb Andrew Parsloe:
>> 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.
> Please post a minimal example file.
>
> Jürgen
>
I've attached a mwe. I created a 2 row, 3 column table, changed to 
Formal Style, cleared the internal rules (leaving top and bottom rules), 
then joined the 2nd and 3rd cells of the top row using the button on the 
table toolbar. Now clicking the lower border button with the cursor in 
the combined cell produces the duplicate \cmidrule commands (as viewed 
in the Code Preview Pane).

Andrew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmidrule-table.lyx
Type: application/lyx
Size: 3640 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200918/0dcb12f8/attachment-0001.bin>


More information about the lyx-devel mailing list