Handling warnings
Warning messages are for your information. They don't always point to a severe problem, but often it's a good idea to read these tips carefully and act accordingly. This may improve your document.
We will test this now. Let's say we want to emphasize text that is in a sans-serif font. We expect italic sans-serif text as a result.
Let's try this:
- Take our "
Hello world!
" example and modify it this way:\documentclass{article} \renewcommand{\familydefault}{\sfdefault} \begin{document} \emph{Hello world!} \end{document}
- Compile. LaTeX will print out a warning in the log file:
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:
The \familydefault
macro stands for the default font family used in the LaTeX document...