5

I am using Texmaker with TeXLive on Windows 10. I want to use some type of 'Garamond' font for my math paper.

Looking around I found the fonts GaramondNo8 and Garamondx can be used to provide nice looking text and mathematics.

I am having a lot of difficulty getting them to work. First, when I try to use

\usepackage{garamondx}

I get the the error message: File 'garamondx.sty' not found. Looking online in find this is because of some restriction on those fonts and that I need to use getnonfreefonts (http://tug.org/fonts/getnonfreefonts/). When I download the installer, it asks me what program to use to run it. I don't know what program to run it with, its file type is "file".

Basically, I want to know what code I need to put in my LaTeX file to use these fonts and how to get them installed.

Sorry...I am a complete noob and can't figure any of this out.

  • Welcome to TeX SX! Did you try to install it with TeX Live Package Manager? – Bernard Apr 24 '17 at 00:50
  • I'm not sure what TeX Live Package Manager. I installed TexLive then changed PATH with some help of another forum. I just downloaded the getnonfreefonts installer form that website. – David Palmer Apr 24 '17 at 00:58
  • I've just posted an explanation on how to do it (under MiKTeX, but most of the procedure should be the same with TeX Live). – Bernard Apr 24 '17 at 01:09

2 Answers2

7

I think it should be the same as for MiKTeX: I've checked it's not in any distribution. You can easily install it by hand; download the ready-to-install garamondx.tds.zip from the install/fonts directory on CTAN, and unzip it at the root of your texmf-local directory.

(This is the procedure for MiKTeX – it may slightly differ for TeX Live). In some subdirectory of texmf-local (or in your home directory) you should have an updmap.cfg file, in which you can add this line:

Map zgm.map

In MiKTeX, there remains a last step (not sure it is required under TeX Live): run from the command line, as administrator: updmap.exe. This is to refresh the type1 fonts databases, so the compiler knows where to find the font files.

Bernard
  • 271,350
1

I am assuming that OP was not familiar with scripts and Unix systems. The simplest way is indeed to use getnonfreefonts:

  1. Download the script, at https://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
  2. In the folder where you downloaded it, run chmod +x install-getnonfreefonts
  3. Become super-user / admin
  4. Type ./install-getnonfreefonts or texlua install-getnonfreefonts
  5. Type /usr/local/texlive/2021/bin/x86_64-linux/getnonfreefonts --sys garamondx or something similar.

That's it!

Clément
  • 5,591
  • 1
    In the last step, I needed to do sudo /usr/.../getnonfreefonts/getnonfreefonts.pl --sys garamondx. The necessity of sudo is explained here (https://tex.stackexchange.com/questions/422623/installing-getnonfreefonts-mactex). – Physics Enthusiast Sep 21 '23 at 21:15