[luatex] Bugs in \input{...}
luigi scarso
luigi.scarso at gmail.com
Wed Feb 5 09:04:06 CET 2020
On Mon, Jan 27, 2020 at 2:53 PM Phelype Oleinik <phe.h.o1 at gmail.com> wrote:
> Hello all,
>
> When using \input{...} inside an \edef the first token
> in the file disappears:
>
> \directlua{\unexpanded{%
> out = io.open('testfile.tex','w')
> out:write('hello\\noexpand')
> io.close(out)}}
> \edef\tmpa{\input{testfile.tex}}\show\tmpa
> % > \tmpa=macro:
> % ello
> \bye
>
> For some reason, it gets worse if the file starts
> with \noexpand\something:
>
> \directlua{\unexpanded{%
> out = io.open('testfile.tex','w')
> out:write('\\noexpand\\hello\\noexpand')
> io.close(out)}}
> \edef\tmpa{\input{testfile.tex}}\show\tmpa
> % > \tmpa=macro:
> % <gibberish>
> \bye
>
> If I use \edef\tmpa{\input testfile.tex } instead, both
> examples work as expected.
>
>
I have a fix , but I need to check it better.
> Also, a smaller issue: \input{...} doesn't seem to be
> setting cur_cs when using scan_toks, then the
> runaway error message reports it wrong:
>
> \outer\def\boom{}
> \input{\boom
> \bye
>
> this reports:
>
> Runaway text?
> ! Forbidden control sequence found while scanning text of
> \csname\endcsname.
> <inserted text>
> }
> <to be read again>
> \boom
> l.3 \input{\boom
>
> ?
probably related.
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20200205/48106d9c/attachment.html>
More information about the luatex
mailing list.