StartLaTeX faqLaTeX for Beginners F.A.Q.LaTeX topicsLaTeX courseSearch

The lmodern (= Latin Modern) package modifies the font used in LaTeX documents, offering a smoother text rendering experience compared to the default Computer Modern font. While the standard font may appear pixelated, especially in PDF files, Latin Modern enhances readability and aesthetics.

To incorporate the lmodern package into LaTeX documents, simply use the following command:

\usepackage{lmodern}

Switching Font Families

If you prefer a sans-serif font for your document, you can redefine the default font family using:

\renewcommand*\familydefault{\sfdefault}

Conversely, if you prefer a typewriter-style font, you can use:

\renewcommand*\familydefault{\ttdefault}

Comparison

Below are examples comparing the output with the standard Computer Modern font and the Latin Modern font:

With Computer Modern Font

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}

\begin{document}
This is an example of text shown in different fonts. This is the normal text of the standard font.
\end{document}

With Latin Modern Font

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}
This is an example of text shown in different fonts. This is the normal text of the Latin Modern font.
\end{document}

Conclusion

In conclusion, the comparison between Computer Modern and Latin Modern fonts highlights significant differences in text rendering. Considering that the majority of documents are created in PDF format, using Latin Modern font can significantly improve the visual appeal and readability of your LaTeX documents.

Contact   Privacy Policy   disclosures

accept decline

This website uses cookies and pixel tags to ensure you get the best experience on our website. By using this website, you consent to the use of cookies.learn more about cookies see also our privacy policy