Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runaway argument with fontspec/LuaLaTeX after installing l3kernel 2018-10-17 #491

Closed
svitalsky opened this issue Oct 19, 2018 · 11 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@svitalsky
Copy link

svitalsky commented Oct 19, 2018

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

@svitalsky
Copy link
Author

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

@wspr
Copy link
Contributor

wspr commented Oct 19, 2018

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 wspr added the bug Something isn't working label Oct 19, 2018
@u-fischer
Copy link
Member

u-fischer commented Oct 19, 2018

@wspr a minimal example for me is

\documentclass{book}
\usepackage{fontspec}
%\tracingmacros=1
\newfontfamily\arabicfont{Amiri}

 \begin{document}
abc
\end{document}

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

@josephwright josephwright self-assigned this Oct 19, 2018
@josephwright josephwright changed the title l3kernel 48935 breaks lualatex document Runaway argument with fontspec/LuaLaTeX after installing l3kernel 2018-10-17 Oct 19, 2018
@josephwright
Copy link
Member

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.

@u-fischer
Copy link
Member

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
 }
 
\newfontfamily\arabicfont{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.

@josephwright
Copy link
Member

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

@u-fischer
Copy link
Member

@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;"
}

@josephwright
Copy link
Member

@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.

@josephwright
Copy link
Member

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.

@RuixiZhang42
Copy link

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/mailman.549.1539893624.4481.ctan-ann@ctan.org
\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
                                
?

@josephwright
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants