2

I just updated my packages through the MikTeX console, and when I try to define a new font family with TeX Gyre Pagella, I get a mysterious error (below). Just defining the new font family leads to the error; it's not necessary to use it anywhere. Commenting out the \newfontfamily macro or replacing TeX Gyre Pagella with something else allows it to compile. This did not occur before the update just now.

MWE:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{fontspec}
\newfontfamily{\myfamily}{TeX Gyre Pagella} 
% Comment out or replace with Times New Roman to compile

\begin{document}
\end{document}

Runaway argument? 76543210\q_stop end \exp_args:NNf \group_end: \iow_log:n {\tl_to_str:N \ETC. ! File ended while scanning use of \__iow_wrap_end_chunk:w. <inserted text> \par <*> ./test.tex

Any ideas? (Also, I'm not entirely sure if I need fontenc here, but the same error happens even without including it.)

closed as off-topic by egreg, Romain Picot, Stefan Pinnow, Bobyandbob, Phelype Oleinik Oct 23 '18 at 10:35

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Oh, I should also mention that setting the main font to TeX Gyre Pagella with \setmainfont works fine. It's only defining a new font family with it that causes the issue. – Jigsaw Oct 23 '18 at 1:26
  • 5
    See tex.stackexchange.com/q/456257 – Thérèse Oct 23 '18 at 1:29
  • 4
    I'm voting to close this question as off-topic because the issue is due to a bug that has already been removed – egreg Oct 23 '18 at 8:44
  • 1
    @egreg On one hand I agree that this question is off-topic since it is about a resolved bug, on the other hand it might be useful for MikTeX users to leave the question open until the update arrives in MikTeX. – moewe Oct 23 '18 at 9:59
4

Edit: As of 2018-10-24 0:00 midnight (EST, may be earlier), the 2018-10-19 l3kernel has made its way to MiKTeX, so additional tweaking is no longer nessessary.


Old answer if you are using the 2018-10-17 l3kernel: MiKTeX was really late updating a bug fix from the l3kernel package. So we must wait until MiKTeX updates its repository.

In the mean time, since there were only two lines of code changed, you could

  1. Go to your local directory: C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel.
  2. Copy the file expl3-code.tex.
  3. Paste it into your working directory.
  4. Replace line 10665

    \or: \use_none:nnnnnnn
    

    with this line

    \or: \__iow_wrap_line_seven:nnnnnnn
    
  5. Add this line

    \cs_new:Npn \__iow_wrap_line_seven:nnnnnnn #1#2#3#4#5#6#7 { \exp_stop_f: }
    

    before line 10669

    \cs_new:Npn \__iow_wrap_line_end:NnnnnnnnN #1#2#3#4#5#6#7#8#9 % <- So this becomes line 10670
    

This is how I get around using packages affected by the 2018-10-17 l3kernel update. As soon as MiKTeX has the 2018-10-19 l3kernel update, everything should be back to normal.

  • 2
    For reference, I opened an issue at the MikTeX packaging tracker to make sure that the update does not go unnoticed: github.com/MiKTeX/miktex-packaging/issues/58 – moewe Oct 23 '18 at 10:19
  • 2
    The update made it to MikTeX tonight/this morning (UTC), so if one runs an update now the fixed version should be installed. – moewe Oct 24 '18 at 6:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.