Fontspec (and several other packages) were not working. I reinstalled MacTeX-2018, but the same errors keep coming up (see below). l3kernel & l3packages are both installed. All packages on TeX Live Utility are up to date. I'm running macOS Mojave.




TraditionalBuilder: Engine: xelatex. Invoking latexmk... done.


Missing = inserted for \ifnum. [\RequirePackage{expl3}[2018-04-12]]
Missing = inserted for \ifnum. [\@ifpackagelater{expl3}{2018-04-12}]
Missing = inserted for \ifnum. [\ProvidesExplPackage]
Missing = inserted for \ifnum. [\ProvidesExplPackage]


Package fontspec Warning: 
I have found the tuenc.def encoding definition file(fontspec)                
but the TU encoding is not defined by the LaTeX2e(fontspec)                
kernel; attempting to correct but you really should(fontspec)                
update to the latest version of LaTeX2e.
  • Looks as if some packages are outdated. Check the log-file if some files are loaded from local sources. – Ulrike Fischer Apr 20 '19 at 14:17
  • 1
    Apparently your PATH variable points to a MacPorts installed version of TeX Live. Remove it. – egreg Apr 20 '19 at 14:31
  • 1
    Please tell us which version numbers of fontspec (2019/02/12 v2.7b?), fontspec-xetex (2019/02/12 v2.7b?), and `tuenc.def (tuenc.def) are installed on your system. (The information in parentheses in the preceding sentence is the version information on my MacTeX2018 installation -- no MacPort, just the "straight" version.) – Mico Apr 20 '19 at 14:34
  • 1
    @iteu What's the output of the terminal command kpsewhich --var-value=TEXINPUTS? – egreg Apr 20 '19 at 14:59
  • 1
    @iteu You should remove the MacPorts TeX Live with MacPorts tools, otherwise you'll remain with TeX binaries in /opt/local/bin. I abandoned MacPorts several years ago. – egreg Apr 20 '19 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.