I want to use math fonts with the unicode-math package. The code I wrote is
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
\begin{equation}
\vec{F} = m \vec{a}
\end{equation}
\end{document}
But this does not compile with xelatex. I get the output
This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/Arch Linux) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./document.tex
LaTeX2e <2018-12-01>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texmf-dist/tex/latex/base/tuenc.def))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/share/texmf-dist/tex/latex/unicode-math/unicode-math.sty
(/usr/share/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty
(/usr/share/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/share/texmf-dist/tex/latex/filehook/filehook.sty)
(/usr/share/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex)))kpathsea:make_tex: Invalid filename `TeX Gyre Pagella Math/OT', contains ' '
! Package fontspec Error: The font "TeX Gyre Pagella Math" cannot be found.
For immediate help type H <return>.
...
l.8
? x
No pages of output.
Transcript written on document.log.
The fonts have been succesfully installed because tllocalmgr install tex-gyre tex-gyre-math gives
Initializing ...
tex-gyre is already installed with texlive-core
and it is uptodate
tex-gyre-math is already installed with texlive-core
and it is uptodate
I can also see the fonts have been installed successfully using a font manager. Then why aren't the fonts being found? The code compiles succesfully on Overleaf.
fc-listorfc-match "TeX Gyre Pagella Math"find them? Might need to clear some font caches, although in theory it ought to do that whenever it doesn’t find a font, automatically. – Davislor Oct 08 '19 at 17:53sudo fc-cache -fsvsolve the problem? – Davislor Oct 08 '19 at 18:03