Time for action – tuning the font shape
We will emphasize an important word in a text and we will see how to make words appear bold, italic, or slanted. We shall figure out how to highlight words in a part of some text that's already emphasized:
Create a new document containing the following code:
\documentclass{article} \begin{document} Text can be \emph{emphasized}. Besides being \textit{italic} words could be \textbf{bold}, \textsl{slanted} or typeset in \textsc{Small Caps}. Such commands can be \textit{\textbf{nested}}. \emph{See how \emph{emphasizing} looks when nested.} \end{document}
Typeset and have a look at the output:
What just happened?
At first, we used the command \emph
, giving one word as an argument to this command. This argument will be typeset in italic shape, because this is the default way how LaTeX emphasizes text.
Text-formatting commands usually look like \text**{argument}
, where **
stands for a two letter abbreviation like bf
for bold face, it
for italic, and sl
for...