Time for action – building a table of font family commands
We shall create a table like in the previous example, but this time, we would like to make all entries in a column horizontally centered to each other. We will also add some horizontal lines to mark the border and the header of the table:
- Create a new document. Define a command for setting the font for the head row:
\documentclass{article} \newcommand{\head}[1]{\textnormal{\textbf{#1}}} \begin{document}
- Begin a
tabular
environment. As a mandatory argument, provideccc
standing for three centered columns:\begin{tabular}{ccc}
- Write the table head row, write
&
to separate column entries, and\\
to end rows. Use\hline
to insert horizontal lines:\hline \head{Command} & \head{Declaration} & \head{Output}\\ ...
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.