Time for action – lining up font commands
In Chapter 2, Formatting Words, Lines, and Paragraphs, we've got to know a lot of font commands and declarations. We saw a table containing those commands and example output. Now we shall create such a table ourselves:
Begin a new document, like the one in step 1 of our previous example, but define a command for setting the font of our header:
\documentclass{article} \newcommand{\head}[1]{\textbf{#1}} \begin{document} \begin{tabbing}
Write the first row set tab stops by
\=
and use\>
to move to the tab stops. Use the command\verb|…|
to typeset the LaTeX commands:\begin{tabbing} Family \= \verb|\textrm{...}| \= \head{Declaration} \= \kill \> \head{Command} \> \head{Declaration} \> \head{Example}\\ Family \> \verb|\textrm{...}| \> \verb|\rmfamily| \> \rmfamily Example text\\ \> \verb|\textsf{...}| \> \verb|\sffamily| \> \sffamily Example text\\ \> \verb|\texttt{...}| \> \verb|\ttfamily| \> \ttfamily...