Skip to content

Instantly share code, notes, and snippets.

@jiyometrik
Last active April 3, 2022 10:33
Show Gist options
  • Save jiyometrik/0bd6a7b7d4151a7783f05689a3c967fc to your computer and use it in GitHub Desktop.
Save jiyometrik/0bd6a7b7d4151a7783f05689a3c967fc to your computer and use it in GitHub Desktop.
A guide to installing the URW Garamond / MathDesign font if it isn't included in your LaTeX distribution..

How To Get urw-garamond And mathdesign Working in LaTeX

URW Garamond and MathDesign

Many people adore the Garamond font and its many variations. With that, LaTeX has also introduced its own version, with a complimentary math-mode font, inside the mathdesign package.

The most common way to use it is as follows:

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[urw-garamond]{mathdesign}

\begin{document}
% document body here...
\end{document}

The Problem

However, with some LaTeX distributions such as TeXLive, these fonts may not be included and may cause some errors during compilation.

Personally, this has caused some annoyance as there are many variations and versions of the Garamond font.

The Solution

The below instructions are tested on Arch Linux (x86).

  1. Install TeXLive.
    sudo pacman -S texlive-most
        

    Enter your password and make sure you include the texlive-fontsextra package during installation.

  2. Get the getnonfreefonts binary so that we may install URW Garamond, which isn’t a free font.
    wget https://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
    texlua install-getnonfreefonts
        
  3. Install the fonts. If you want all the non-free fonts included, use
    getnonfreefonts -a
        

    If you just want Garamond, use

    getnonfreefonts garamond
        
  4. Once the installation is complete, you may use the code snippet above and compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment