Fonts

You can change the font of text in LaTeX using a simple command. Observe the difference in font rendered in Pressbooks:

Testing, testing, one, two, three

\){\fontfamily{qbk}\selectfont

\text{Testing, testing, one, two, three}}\)

The first font is the theme’s default body text font, Tinos, and the second is the TeX Gyre Bonum font. You can find a list of available LaTeX typefaces on Overleaf.

If you would like to change the font of all text rendered in LaTeX using \text{}, you need to add a package to the QuickLaTeX settings in Pressbooks. To do this:

  1. Go to Settings > QuickLaTeX in the Pressbooks dashboard menu
  2. Go to the Advanced tab
  3. Add “\usepackage{fontpackagename}” on a new line (without italics)

You can find a list of font packages on the Overleaf reference page linked to above.

License

Icon for the Creative Commons Attribution 4.0 International License

LaTeX in Pressbooks: An Introduction and Workflow Copyright © by Caroline Daniels and Arianna is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book