Introduction to typography and fonts in TeX and LaTeX: families, styles, and commands

Last update: 16/06/2025
Author Isaac
  • TeX and LaTeX allow you to modify font families, shapes and weights with commands simple
  • It is possible to customize the typography in both normal texts and mathematical expressions.
  • Some font styles require additional packages to use advanced commands

tex

Typography customization in scientific, academic, or technical documents is a fundamental tool for improving the readability, style, and professionalism of texts. When working with TeX or LaTeX We find ourselves with a very powerful system that allows us to control virtually every aspect of the font used, from its family and style to its weight and mathematical formatting. However, for many users who are beginning to create documents in LaTeX, common questions arise about how to change fonts and take advantage of all its possibilities.

In this article I offer you a detailed, simple and in-depth guide on All the options you have to control typography in TeX and LaTeXWe will cover all the commands available to change the font family, styles, weight, italics, underline, emphasis, and specific settings for Symbols mathematicians. I'll also explain which additional packages you need in some cases and how to use them efficiently. If you want your documents to look professional and personalized, this TeX typography tutorial will give you the keys to achieving this without getting lost in confusing commands and packages.

Font families in TeX and LaTeX

When you create a document in LaTeX, it is important to know that there are three main font families that you can use for your texts:

  • Roman (Serifs): This is the default font in many documents. Its letters have small serifs at the ends of the strokes. This typeface conveys seriousness and is often preferred in academic and scientific texts.
  • Sans Serif: Also known as sans serif, this is a sans serif typeface with clean, modern lines. It's commonly used for titles, presentations, or to highlight specific sections of text.
  • Teletype (Monospaced): It simulates the typing of old typewriters and is ideal for including code snippets or commands in your documents.
  How to Hide the Recycle Bin on the Desktop in Windows 11: Complete Guide

En LaTeX, you can modify the font family of a text fragment using the following commands:

  • \textrm{text}: Uses the "roman" family
  • \textsf{text}: Uses the "sans serif" family
  • \texttt{text}: Applies the "teletype" family

For the change to only affect a specific part, you must braces the text as shown above. If you want an entire section of your document to have that family, you can use the commands: \rmfamily, \sffamily, or \ttfamily before the text. Everything you type after that will have that family until you change it again with another command.

Modifying font styles

Font customization isn't limited to just changing the family. LaTeX It also allows you to change its format: italics, capital letters, small caps, slanted, straight, among others. This is useful for highlighting definitions, variable names, section titles, or important fragments.

The most relevant commands to modify the letter shape are the following:

  • \textit{text}: Convert to italics
  • \textup{text}: Returns to upright text
  • \textsl{text}: Apply slanted style
  • \textsc{text}: Transforms into small capitals

And if you want to change the font shape for an entire block, use \itshape, \slshape, \scshape o \upshape depending on the style you want.

These styles help make your texts clearer and more visually appealing, making it easier to differentiate concepts or emphasize specific parts.

Commands to modify the thickness

Another way of highlight information in your documents is playing with the thickness of the letters. In LaTeX, you have the possibility to make text in bold font with:

  • \textbf{text}: Apply the style bold font
  • \textmd{text}: Uses the medium thickness style (default)

When the relevant text is in an italicized block, for example in mathematical proofs, you can use \emph{} to to emphasize some word or section. Normally, the command \emph applies italics, but if you're already italicized, the emphasized text appears in a different style, helping to maintain content clarity.

  The best way to use Kindle without an Amazon account

How to underline text in LaTeX

Underlining can be useful in certain specific cases, although less common in scientific documents. The most recommended option in LaTeX is to use the command \ul{text}, but this requires that load the soul pack previously with \usepackage{soul} in the document preamble. This allows you to underline any piece of text easily and with control over the underline style.

Font families in math mode

One of the most powerful capabilities of LaTeX is its ability to forma tear la typography in mathematical expressionsSpecific styles can be used to highlight different types of symbols, letters, or sets, allowing for a clear and professional presentation.

The most common and used variants are:

  1. Calligraphic letters (\mathcal{A}), common in algebra for sets and spaces.
  2. Double slate letters or blackboard bold (\mathbb{R}), which represent sets such as real or complex numbers. To use them, you must load the package amssymb in the preamble: \usepackage{amssymb}.
  3. Fraktur Letters (\mathfrak{g}) which also requires amssymb.
  4. Ralph Smith Lyrics (\mathscr{L}) that needs to be loaded mathrsfs: \usepackage{mathrsfs}.
  5. Euler type letters (\mathscr{A}), wearing \usepackage{euscript}.

These variants allow customize mathematical notation adapting it to your needs and the specific requirements of publications or institutions.

Word to epub
Related article:
How to convert a Word document to a clean and professional EPUB

Summary of essential commands for typography in LaTeX

  • Change family: \textrm, \textsf, \texttt
  • Shapes and styles: \textit, \textup, \textsl, \textsc
  • Thickness: \textbf (bold), \textmd (medium)
  • Emphasis: \emph to highlight words
  • Underlined: \ul from the soul package
  • Math mode: \mathcal, \mathbb, \mathfrak, \mathscr with their respective packages

Practical tips for customizing the typography in your documents

To achieve a professional style that suits your needs in TeX or LaTeX:

  • Think about when it is appropriate to highlight an element and select from bold font, Cursive, small caps o underlined.
  • Use variations in mathematics to maintain visual consistency in your expressions.
  • Do not overuse styles to preserve the readability and elegance of the document.
  • Review the documentation for recommended packages to take advantage of advanced features.
  Best way to fix excessive RAM and CPU usage in House home windows 10

Mastering LaTeX typography gives you great freedom to add character and clarity to your writing. Now that you have a deep understanding of the most useful commands, families, styles, and packages, you can adapt the presentation of any content, both textual and mathematical, to your specific needs. Take advantage of this tool to make every piece of work stand out and accurately convey the message you want to communicate.

power bi
Related article:
How to customize reports in Power BI: A complete and updated guide