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:

  1. Take our "Hello world!" example and modify it this way:
    \documentclass{article}
    \renewcommand{\familydefault}{\sfdefault}
    \begin{document}
    \emph{Hello world!}
    \end{document}
  2. 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.

  3. Check the output:
    Time for action – emphasizing on a sans-serif font

What just happened?

The macro \familydefault stands for the default font family which shall be used ...

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.