+5 votes
72 views
in Office by (242k points)
reopened
LaTeX: Change font - this is how it works

1 Answer

+3 votes
by (1.6m points)
 
Best answer

Change the font throughout the document
Customize the font for individual sentences or words

Would you like to change the font in LaTeX? Then find out how it works here..

image image

By default, a serif font of the largest 10pt is used in LaTeX. In this tipps + tips article, we will show you how you can change the font for the entire document and which fonts are available to you. We also explain how you can only adjust the font in sections.

Change the font throughout the document

You can customize all of the fonts in your document by importing the appropriate font package in the preamble. You should also enter \usepackage[T1]{fontenc} and beforehand \usepackage[utf8]{inputenc} so that special characters and umlauts are displayed correctly. Then use the command: " Font " is to be replaced with your desired font. Some options are for example: for Helvetica , for Latin Modern or for Times . For a full catalog of fonts, see The LaTeX Font Catalog official website.
\usepackage{"Schriftart"}
helvet lmodern mathptmx

Customize the font for individual sentences or words

You can also use additional commands to customize individual words. We list them for you below and then show the compiled output:

  • \textbf{Text} writes your text in bold .
  • \textit{Text} writes your text in italics .
  • \textsf{Text} writes your text in sans serif font .
  • \texttt{Text} types your text in typewriter font .
  • \textsc{Text} writes your text in small caps .
  • \textrm{Text} writes your text in a serif font .
image

...