After an update of all my packages, the upgrading from my old MiKTeX 2.9 to the last version, and the refreshing of the file name database (FNDB), my tex file wouldn’t compile anymore. I identified the problem as coming from the fontspec package which worked perfectly fine right before updating everything.
When running, the compilation stops first on the following lines:
Package: fontspec 2019/03/15 v2.7c Font selection for XeLaTeX and LuaLaTeX
! Undefined control sequence.
l.27 \sys_if_engine_luatex:T
If I force to run though, I get several other errors which appear in the log file below. No PDF file emerges from the process.
I tried to uninstall (and deleting all files left) then to reinstall my MiKTeX distribution several times with 64 bits and 32 bits versions in case I did it wrong but it did not change anything to my problem.
I also checked with other packages as the one linked to the LaTeX2ε and LaTeX3 as it seemed to be in this topic but installing, uninstalling and reinstalling the packages l3kernel and l3packages had no effect on the compilation. This temporary solution from 2013 had no effect neither.
Ater several tests, I also found out that other packages seemed to be affected by my issue: polyglossia (as it works partly upon the fontspec package), the manyfoot package and the perpage package. For the manyfoot and perpage packages, I am not sure if it is related to the fontspec package althought it also worked fine before any update. It seems to me that the core issue stands with the fontspec package.
Any idea of how I could fix that issue?
I am using MiKTeX 2.9.7050 (32bits) and Texmaker 5.0.3 on Windows 10. Here is a M(N)WE:
\documentclass[10pt,a4paper]{article} \usepackage{fontspec} \begin{document} Hello world! \end{document}
And here is the log file until the first error (I may not post the whole log file which looks like a spam to the forum):
\c__fp_Bigg_trailing_shift_int=\count110 L3 Module: l3box 2014/08/23 v5354 L3 Experimental boxes \c_empty_box=\box27 \l_tmpa_box=\box28 \l_tmpb_box=\box29 \g_tmpa_box=\box30 \g_tmpb_box=\box31 L3 Module: l3coffins 2014/08/23 v5354 L3 Coffin code layer \l__coffin_internal_box=\box32 \l__coffin_internal_dim=\dimen109 \l__coffin_offset_x_dim=\dimen110 \l__coffin_offset_y_dim=\dimen111 \l__coffin_x_dim=\dimen112 \l__coffin_y_dim=\dimen113 \l__coffin_x_prime_dim=\dimen114 \l__coffin_y_prime_dim=\dimen115 \c_empty_coffin=\box33 \l__coffin_aligned_coffin=\box34 \l__coffin_aligned_internal_coffin=\box35 \l_tmpa_coffin=\box36 \l_tmpb_coffin=\box37 \l__coffin_display_coffin=\box38 \l__coffin_display_coord_coffin=\box39 \l__coffin_display_pole_coffin=\box40 \l__coffin_display_offset_dim=\dimen116 \l__coffin_display_x_dim=\dimen117 \l__coffin_display_y_dim=\dimen118 L3 Module: l3color 2014/08/23 v5354 L3 Experimental color support L3 Module: l3candidates 2014/11/23 v5466 L3 Experimental additions to l3kernel \l__box_top_dim=\dimen119 \l__box_bottom_dim=\dimen120 \l__box_left_dim=\dimen121 \l__box_right_dim=\dimen122 \l__box_top_new_dim=\dimen123 \l__box_bottom_new_dim=\dimen124 \l__box_left_new_dim=\dimen125 \l__box_right_new_dim=\dimen126 \l__box_internal_box=\box41 \l__coffin_bounding_shift_dim=\dimen127 \l__coffin_left_corner_dim=\dimen128 \l__coffin_right_corner_dim=\dimen129 \l__coffin_bottom_corner_dim=\dimen130 \l__coffin_top_corner_dim=\dimen131 \l__coffin_scaled_total_height_dim=\dimen132 \l__coffin_scaled_width_dim=\dimen133 ) (C:\Users\Erizo\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\l3unicode-data.de f File: l3unicode-data.def 2014/11/23 v5465 L3 Unicode data ) (C:\Users\Erizo\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\l3xdvipdfmx.def File: l3xdvidpfmx.def 2014/11/23 v5466 L3 Experimental driver: xdvipdfmx )) Package: xparse 2014/11/25 v5471 L3 Experimental document command parser \l__xparse_current_arg_int=\count111 \l__xparse_m_args_int=\count112 \l__xparse_mandatory_args_int=\count113 \l__xparse_processor_int=\count114 \l__xparse_v_nesting_int=\count115 ) Package: fontspec 2019/03/15 v2.7c Font selection for XeLaTeX and LuaLaTeX! Undefined control sequence. l.27 \sys_if_engine_luatex:T
fontspecis quite recent (2019/03/15), but yourl3kernelis very old (2014/11/23). You need to updatel3kernel. – Phelype Oleinik Jul 20 '19 at 19:41l3kernel. I did uninstall then reinstall it from the MiKTeX console as an admin. The console indicates, indeed, that the package was "packaged on 12-12_2014". So I uninstalled them then used thetds.zipfiles from CTAN to install them semi-manually but it didn't change anything. Would thetds.zipbe outdated? Do you think I should try to install the two packages by running latex on everydtxfile? There are like 40 or 60 and the documentation is not really extensive on where to place them in my MiKTeX location tree. – Mosley Jul 21 '19 at 08:50tds.zipfrom CTAN should contain only the latest version. CTAN doesn't store package history. And you don't need to runlatexthrough all the files, the main installation file isl3.ins, so if you runpdftex l3.insit will already generate all the necessary files. Although you shouldn't go this way: try to update through the MiKTeX console so that everything is in the right place. (I don't use MiKTeX, so I can't help you with that, sorry). – Phelype Oleinik Jul 21 '19 at 12:41FNDBand so on in both user and admin modes in the future, everytime I add packages. @PhelypeOleinik Problem solved. Thank you both for your insights. – Mosley Jul 21 '19 at 17:56