The \cmidrule in booktabs package has trim option to specify how much to trim from left or right. However from the following example \cmidrule(l{2pt}r{2pt}){1-2}
shows the line is shifted, not shortened; I may be confused about the this trim option, but I expected 2 points from left and right should be removed (trimmed).
The next code \cmidrule(l{2pt}r{2pt}){3-3}
is even more confusing to show that the line is shifted to the left.
How to interpret the trim option with \cmdrule
?
\documentclass[12pt]{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{@{}llr@{}}
\toprule
\multicolumn{2}{c}{Item} &\multicolumn{1}{c}{Price/lb} \\
\cmidrule(r){1-2}\cmidrule(l){3-3}
a & b & c \\
\cmidrule(l{2pt}r{2pt}){1-2}\cmidrule(l{2pt}r{2pt}){3-3}
\morecmidrules
\cmidrule(l{2pt}r{2pt}){2-3}
\addlinespace[5pt]
Food& Category & \multicolumn{1}{c}{\$}\\
\midrule
Apples & Fruit & 1.50 \\
Oranges & Fruit & 2.00 \\
\addlinespace
Beef & Meat & 4.50 \\
\specialrule{.5pt}{3pt}{3pt}
x & y & z \\
\bottomrule
\end{tabular}
\end{document}
\cmidrule
s since you're not using a\tabcolsep
on the outer edges of the first/last column. That is, you're using@{}
to suppress it.