[Dev-luatex] tex.print and \inputlineno
Hans Hagen
pragma at wxs.nl
Tue Sep 25 11:40:10 CEST 2007
Jonathan Sauer wrote:
> Hello,
>
> while testing, I stumbled on a (then) strange phenomenon concerning
> line numbers in tex.print. It seems that \inputlineno is not equal
> to the number of the line of the tex.print statement (or the macro
> expanding to it), but of the virtual file tex.print uses internally.
>
> Example (PlainTeX):
>
> --------------------------------------------------------------------
>
> % Output is `1' instead of `3':
> \directlua0{\unexpanded{tex.print('\\message{\\the\\inputlineno}')}}
>
> % Output is `1' instead of `6':
> \scantokens{\message{\the\inputlineno}}
it's a new input level; using the line number of the parent would be
confusing in other situations;
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the dev-luatex
mailing list