1

I have just updated my MikTeX installation to 2.9.6942 and Tex Studio to 2.12.14. I'm running on Windows 10 64-bit. The following code is in just about everything I write in LaTeX and it now breaks

\documentclass[12pt]{scrartcl}

\usepackage{fontspec}
\setmainfont{Times New Roman}
\addtokomafont{dispostion}{\rmfamily}

From the log in TeX Studio:

Undefined control sequence. \setmainfont{Times New Roman}

From the output messages:

Couldn't open `Times New Roman{}{}{.cfg' hbf2gf (CJK ver. 4.8.4)

From the actual log file:

! Undefined control sequence.
\__fontspec_init_ttc:n #1->\str_if_eq:eeT 
                                          {\str_lower_case:f {\l__fontspec_e...
l.4 \setmainfont{Times New Roman}

Everything is up to date, Times New Roman is installed, and I have successfully used it like this in versions past (MikTeX 2.9.6161). All L3 packages are installed as well. How do I get fontspec to work again?

1 Answers1

2

In case anyone runs in to this problem: l3kernel and the associated packages were up to date in MikTeX, but old libraries were still present in folders like AppData. Once I uninstalled MikTeX, purged the old files, and reinstalled, it worked fine.

  • 1
    When you use miktex you always update as admin and as user, then both gets updated – daleif Feb 18 '19 at 07:43
  • See also https://tex.stackexchange.com/q/55437/35864 and https://tex.stackexchange.com/q/108447/35864. On multi-user installations of MikTeX updates should usually be performed in both admin and user mode to avoid issues like this. That is one of the reasons why some people recommend single-user installations. – moewe Feb 18 '19 at 13:09