[lltx] \scantokens differs between LaTeX and plain?

Ulrike Fischer news3 at nililand.de
Tue Nov 15 16:40:01 CET 2011

Am Tue, 15 Nov 2011 10:18:40 +0100 schrieb Arno Trautmann:

> Hi all!
> [moving this thread from texhax]
> After I had trouble with the tabu package, Philipp Stephani posted the 
> following minimal example on texhax that causes the problem.

The error is the one you get if you add a \par in $...$. You can
simplify the problem 




In this case the \par in \end{document} will trigger the error as
you can see if you enlarge \errorcontextlines:

! Missing $ inserted.
<inserted text> 
<to be read again> 
\newpage ...k \@nobreakfalse \everypar {}\fi \par 
                                                  \vfil \penalty 

l.9 \end{document}

If you put braces around the \scantokens: {\scantokens{$^^J$}}
then one get a ! Extra }, or forgotten $. error.

So in my opinion for some reason the ending "$" is not seen.

The problem seems to be related to \newlinechar: It disappears if
one reset \newlinechar (and then appears for the new value):



Ulrike Fischer 

More information about the lualatex-dev mailing list