Time for action – adding nicer horizontal lines with the booktabs package
We shall use the new commands introduced by booktabs
:
- In the previous example, load the package
booktabs
:\usepackage{booktabs}
- Use
\toprule
,\midrule
, and\bottomrule
instead of\hline
. Specify a thickness as an optional argument:\begin{tabular}{ccc} \toprule[1.5pt] \head{Command} & \head{Declaration} & \head{Output}\\ \midrule \verb|\textrm| & \verb|\rmfamily| & \rmfamily Example text\\ \verb|\textsf| & \verb|\sffamily| & \sffamily Example text\\ \verb|\texttt| & \verb|\ttfamily| & \ttfamily Example text\\ \bottomrule[1.5pt] \end{tabular}
- Typeset to see the difference:
What just ...
Get LaTeX Beginners Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.