Time for action – emphasizing on a sans-serif font
We shall write our complete document using a sans-serif font. As we did not yet see how emphasizing without serifs looks, we will try that:
Take our "Hello world!" example and modify it this way:
\documentclass{article} \renewcommand{\familydefault}{\sfdefault} \begin{document} \emph{Hello world!} \end{document}
Typeset. LaTeX will print out a warning:
LaTeX Font Warning: Font shape `OT1/cmss/m/it' in size <10> not available
(Font) Font shape `OT1/cmss/m/sl' tried instead on input line 4.
Check the output:
What just happened?
The macro \familydefault
stands for the default font family which shall be used in the LaTeX document. For this macro, we specified the value \sfdefault
, which means the default sans-serif font. This means simply that sans-serif is now default, no matter which font has been chosen. As you can imagine, other possible values are \rmdefault
and \ttdefault
. By changing \familydefault
, we don't have to write \sffamily
again...