[Tex/LaTex] n easy way to create a partial \toprule

booktabsrulestables

Is there a relatively simple equivalent to \cmidrule (a partial horisontal line in a table) but with the characteristics of a \toprule? It seems the booktabs package does not provide a \ctoprule command.

Best Answer

By "characteristics of a \toprule?", I assume you mean the thickness of the line. To draw a \cmidrule, whose default weight is \cmidrulewidth, with the thickness of a \toprule, you'd type something like

\cmidrule[\heavyrulewidth]{3-6}

Addendum: As @Manuel has pointed out in a comment, \toprule differs from \cmidrule (and \midrule) not only in terms of line thickness but also by not having vertical whitespace in the amount of \aboverulesep inserted above the line. If your "truncated toprule` should have no such whitespace, you'd need to write

 \addlinespace[-\aboverulesep] 
 \cmidrule[\heavyrulewidth]{3-6}

to achieve your objective.