The standard font used in latex is called Computer Modern Font Family (CM), which is composed of various Computer Modern fonts. Since it does not include all European characters, the use package fontenc should be included to avoid problems with the display of umlauts.
\documentclass{article} … \usepackage[T1]{fontenc} … \begin{document} … |
For LaTeX not only Computer Modern font family is available, there are currently more than 100 freely available fonts for LaTeX. In my opinion the best overview is provided by LaTeX Font Catalogue. The fonts are divided into groups like serif or sans serif, fonts that can also be used in mathematical formulas or fonts that look like handwritten and many more.
\documentclass{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{ngerman} \usepackage[scaled]{uarial} \begin{document} This text is in something like Arial! \end{document} |
Since LaTeX itself already uses different fonts at the same time, it can also be necessary to include several typefacess from time to time. When creating documents with LaTeX, three families are used by default, one serif, one sans-serif and one monospaced typeface. When writing, the serif typesface is used for the normal text, if you want to use one of the other two, you can use it by command.
Families | Command | Example | Output |
serif | \textrm | \textrm{continuous text} | continuous text |
sans serif | \textsf | \textsf{sans serif typefaces} | sans serif typefaces |
monospace | \texttt | \texttt{monospace typefaces} | monospace typefaces |
The following example shows how to change the normal text to Times, the sans serif text to Helvetica and the monospaced font to courier.
\documentclass{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{ngerman} \usepackage{mathptmx} % Here you will find Times \usepackage[scaled]{helvet} \usepackage{courier} \begin{document} This text is normal text and therefore in Times.\\ \textsf{This text is sans serif text and therefore in Helvetica.}\\ \texttt{This text is monospaced and therefore in Courier.} \end{document} |