I am using the newest editions of MacOS, MacTeX, TeXMaker, and all the packages that I am using.

This is the code I have:

\documentclass[12pt, letterpaper]{article}

\setmainfont{TeX Gyre Termes}


\title{Blah Blah Blah}
\author{Noah Blah Blah\\[.4cm]{Supervisory Professor: Dr. Blah Blah}}
\date{October 5th, 2020}

\graphicspath{ {./images/} }






I have also tried not using \usepackage{tex-gyre} I have tried manually downloading the font and putting it in the local tex folder, etc.

This is the error it gives me when I do include \usepackage{tex-gyre}:

! LaTeX Error: File `tex-gyre.sty' not found.

When I try installing this:

tex-gyre.sty attempted installation

However, it seems the package is definitely loaded:

tex-gyre package installation

This is the error it gives me when I do not include \usepackage{tex-gyre}:

! Package fontspec Error: The font "TeX Gyre Termes" cannot be found.

Thank you so much for your time and help!

EDIT: I also tried adding \usepackage{tg-termes} which resulted in:

! Package fontspec Error: The font "TeX Gyre Termes" cannot be found.

Result of running those two commands:

result of commands

  • 1
    You definitely don’t need \usepackage{tex-gyre}.
    – Davislor
    Commented Oct 16, 2020 at 16:56
  • Awesome! Thank you. Unfortunately, it still gives me the "! Package fontspec Error: The font "TeX Gyre Termes" cannot be found." error without it.
    – NLing
    Commented Oct 16, 2020 at 16:59
  • Since you say you’re on MacTeX, try running sudo tlmgr install tex-gyre.
    – Davislor
    Commented Oct 16, 2020 at 17:00
  • 2
    @Davislor texlive never auto-detects that packages are needed (unlike miktex) Commented Oct 16, 2020 at 17:10
  • 1
    You should be trying to install tex-gyre, not tex-gyre.sty. There is no such file or package as tex-gyre.sty.
    – Davislor
    Commented Oct 16, 2020 at 17:50

2 Answers 2


To preemptively fix the problems you’ll get if you try \setmainfont{texgyretermes-regular.otf}, here is the recommended way to load the font:

  UprightFont = *-regular ,
  BoldFont = *-bold ,
  ItalicFont = *-italic ,
  BoldItalicFont = *-bolditalic ,
  Extension = .otf ,
  Scale = 1.0 ]

This tells fontspec what filenames to search for. If the italic font were named something like texgyretermes-mediumitalic.ttf, you would instead write ItalicFont = *-mediumitalic , Extension = .ttf.

I don’t have MacTeX to test on. On another OS, I would tell you to first reinstall the package with

sudo tlmgr update --self --all
sudo tlmgr install --reinstall tex-gyre

Then rebuild the font caches XeTeX and LuaTeX use with

sudo fc-cache -f -s -v
sudo luaotfload-tool -f -u -p -v

If you have some out-of-date files in the TeX Live subdirectory of your user folder, maybe clear those out.

Another solution would be to run sudo nano ${kpsewhich --var-value=TEXMFLOCAL}/fonts/TeXGyreTermes.fontspec to create a configuration file in your local TeX tree, and edit it to have the following contents:

  UprightFont = texgyretermes-regular.otf ,
  BoldFont = texgyretermes-bold.otf ,
  ItalicFont = texgyretermes-italic.otf ,
  BoldItalicFont = texgyretermes-bolditalic.otf ,
  Ligatures = Common

This should enable commands like \setmainfont{TeXGyreTermes} even if your installation is not able to look up the font by its display name.


@DavidCarlisle and @Davislor answered the question in the comments.

What eventually worked for me was completely updated the entire TeXLive Manager, reinstalling TeX Gyre Termes, and then, instead of using \setmainfont{TeX Gyre Termes}, I used \setmainfont{texgyretermes-regular.otf}.

Thank you everyone for your help!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .