Comments in the thread Is there an easy way to create a partial \toprule? provide a solution for creating a "partial" \toprule. Is there a way to create an analogous partial \bottomrule?

I.e. what characteristic must be added to a \cmidrule to make it simulate the behaviour of \bottomrule?


Let's assume your tabular-like environment has 5 columns and that the "partial bottomrule" should span columns 2-4, with trimming on the left and the right. The following directives should work for you:


Addendum: If your document calls for repeated uses of partial top and bottom rules, it's worth setting up dedicated macros; they're called \partialtoprule and \partialbottomrule in the following example. Note that the macros take 2 arguments: the first argument, if non-empty, indicates any trimming that should be performed. In the following screenshot, the first tabular environment employs standard \toprule and \bottomrule directives, while the second employs "partial" top and bottom rules. (The thin longer lines in the following screenshot are there just to indicate what's above and below the tabular environments.)

enter image description here




   AAA & BBB & CCC & DDD & EEE \\
\partialtoprule{r}{1-2}     % right-trimming only
   AAA & BBB & CCC & DDD & EEE \\
\partialbottomrule{lr}{3-4} % left- and right-trimming 


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.