Latex3: Runaway argument with fontspec/LuaLaTeX after installing l3kernel 2018-10-17

Created on 19 Oct 2018  ·  11Comments  ·  Source: latex3/latex3

I have a document (a book), typeset with Adobe Garamond Pro, that I compile with LuaLaTeX. After the last update of TeXLive it broke (I couldn't compile the document), without any change in the document itself. After restoring l3kernel to the previous version it is OK again (checked with pdf-diff).

tlmgr update log relevant data:

[Fri Oct 19 09:06:16 2018] update: l3kernel (48749 -> 48935)     // broke the document
[Fri Oct 19 14:28:03 2018] restore: l3kernel (48749)                 // document compiles OK

Document compilation log (relevant part, before this the log goes the same way as when compilation succeeds):

Runaway argument?
76543210\q_stop newline     newline  This font family consists o\ETC.
! File ended while scanning use of \__iow_wrap_end_chunk:w.
<inserted text> 
\par 

Linux, TeXLive 2018, LuaTeX 1.07.0

bug

Most helpful comment

@RuixiZhang42 I'm working on it: I'd expect to fix it today.

All 11 comments

Note: the CONTRIBUTING document says to add “bug” label for this, but how do I do that?

I could be mistaken but I don't think there's enough information here to know what could be triggering the bug. Can you provide a minimal example that demonstrates the problem?

@wspr a minimal example for me is

~~~~
documentclass{book}
usepackage{fontspec}
%tracingmacros=1
newfontfamilyarabicfont{Amiri}

begin{document}
abc
end{document}
~~~~

I get a similar error if I load \usepackage{libertine}.

OK, this is LuaTeX-specific so I wonder if it's something in the message text that is dependent on the form of the font-loading command.

The break seems to depend on the length of the module name. With 8 chars it breaks:

~~~~
documentclass{book}
usepackage{fontspec}
ExplSyntaxOn
%suppress fontspec message
msg_set:nnn {fontspec}{defining-font}{}

%new test message
msg_set:nnn {testtest} {defining-font} %works with testtests and testtes
{
g__fontspec_defined_shapes_tl
}

newfontfamilyarabicfont{Amiri}

msg_info:nn {testtest} {defining-font} %breaks
ExplSyntaxOff

begin{document}
abc
end{document}
~~~~

The message from xelatex is a longer than the one from lualatex, but beside this I don't see anything obvious.

@u-fischer I think I have an idea on the source of the issue ... need to work a few things through.

@josephwright and I get the error in xelatex now too with a suitable message.

~~~~
msg_set:nnn {testtest} {defining-font} %works with testtests and testtes
{
(m/n)~with~
<->"Amiri:mode=node;script=latn;language=DFLT;"
}

~~~~

@u-fischer Yeah, fits with my guess as to the issue: I need to trace the wrapping through, but I think I can fix after work.

Cutting down further, one can get to for example

\RequirePackage{expl3}
\ExplSyntaxOn
\iow_wrap:nnnN
  {
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx~
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  }
  { xxxxxxxxxxxxxxxxxxxxxxx }
  { }
  \iow_term:n

_i.e._ it's an engine-neutral issue caused by the exact line lengths involved.

From CTeX issue 384. I originally tested article, book, etc, which worked fine with unicode-math. But switching document class to ctexart, ctexbook produces similar problem as the OP. Initially I assumed it was a bug in CTeX. But now it appears to be a l3kernel bug.

% !TeX program = XeLaTeX
% l3kernel update, 2018-10-17:
% https://ctan.org/ctan-ann/id/[email protected]
\documentclass{ctexart}
\usepackage{unicode-math}
\begin{document}
$e^{i\pi} = -1$
\end{document}

with error messages:

...
Runaway argument?
76543210\q_stop newline - 'bold' (bx/n) with NFSS spec.: <->s*[0.9999\ETC.
! File ended while scanning use of \__iow_wrap_end_chunk:w.
<inserted text> 
                \par 
<*> ./test-ctex-unicode-math.tex

?

@RuixiZhang42 I'm working on it: I'd expect to fix it today.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bastien-roucaries picture bastien-roucaries  ·  19Comments

EvanAad picture EvanAad  ·  49Comments

JairoAdelRio picture JairoAdelRio  ·  7Comments

dbitouze picture dbitouze  ·  12Comments

dbitouze picture dbitouze  ·  43Comments