latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
277 stars 34 forks source link

kernel/invalid-variant error #367

Closed ashthespy closed 5 years ago

ashthespy commented 5 years ago

Description

A MiKTeX update seems to have broken fontspec for me. I am running: fontspec: 2.7c packaged on 15/03/2019 l3kernel packaged on 25/09/2019

Check/indicate

Minimal example demonstrating the issue

% arara: xelatex: {synctex: yes, options: ['-file-line-error'], interaction: nonstopmode}
\documentclass{article}
\usepackage{fontspec}
\begin{document}
hello \emph{hello}
\end{document}

Which leads to the error:

MiKTeX 2.9\tex/latex/fontspec\fontspec-xetex.sty:514: LaTeX er
ror: "kernel/invalid-variant"
! 
! Variant form 'e' invalid for base form '\tl_if_empty_p:n'.
! 
! See the LaTeX3 documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

Further details

All MiKTeX packages are up-to-date.

ashthespy commented 5 years ago

Turned out to be an issue with my installation.

ghost commented 5 years ago

Could you share what was the issue with your system? I’m facing the same thing with a (quite fresh) MikTeX installation.

ashthespy commented 5 years ago

My trouble was that it was still utilising older packages located in the user partition, while the MikTeX console was updating packages in the system partition.

ghost commented 5 years ago

Thanks! I have fontspec v2.7c (packaged on 15/3/2019) and l3kernel packaged on 27/7/2019. Still, xelatex gives the same error. I have MikTeX 2.9.7100 installed ‘only for me’ (i.e. packages only in %APPDATA%).

ashthespy commented 5 years ago

Hmm I had mine at C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel - try removing/renaming the one from there, or launch the MikTeX console in admin mode and upgrade it? FWIW, my issue was that I had just converted my installation from 'only for me/user' to 'admin' mode.