DETAILS: TEXT

4.6

LaTeX: Font and paragraph

Accessible documents must be written with sans-serif fonts. Besides Modern Sans, most TeX distributions offer additional high-quality alternatives, including Fira Sans and Droid Sans.

To change the font, add one of these two commands to your preamble:


  • \usepackage[default]{FiraSans}
  • \usepackage[default]{droidsans}

If you use fontspec, you can easily change the main font, for example:


  • \usepackage{fontspec}
  • \setmainfont{Fira Sans}

The easiest way to change the font size is in the class options, for example:


  • \documentclass[12pt]{article}

You can adjust the line spacing with this command:


  • \renewcommand{\baselinestretch}{1.5}

By default, LaTeX uses Modern, a serif font. Instead of this, use the sans-serif variant. To make this change, add this command to the preamble:


  • \renewcommand{\familydefault}{\sfdefault}