O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required