[luatex] \latelua

David Carlisle d.p.carlisle at gmail.com
Sun Jul 13 12:20:29 CEST 2014


> Because tex.print is disabled in \latelua (we do have pdf.print) the printed stuff
> ends up on the lua 'output stack' and is therefore flushed with the next \directlua;

Hmm that's unfortunate. It would probably be better if it could be
made to make an error or to do nothing, gobbling its argument, or
something.

On 13 July 2014 10:59, Hans Hagen <pragma at wxs.nl> wrote:
> On 7/13/2014 11:21 AM, David Carlisle wrote:
>
>> why isn't it inserted into the stream as the first page is shipped
>> out, and then appear after "Second"
>
>
> fyi: when I run
>
> x \latelua{tex.print("foo")} x
>
> I get an error message: a number expected, so


You do? I don't with the version in texlive 2014?

>
> x \latelua{tex.print(123)} x
>
> works ok. This is of course because the "foo" ends up before a following
> tex.print, the one supposed to return a number and the 123 is probably not
> what i want there. In fact, if i would need latelua to print back something
> (never needed that so far)

Ah well you know what it's like maintaining a format:-)
It's not enough just to do stuff you need, you need to know how things
are supposed to work when users do the weirdest thing imaginable:-)

so would it be correct to say that the behaviour of latelua here has status
"undocumented and liable to change"
(It's Ok if that's the case, but it would be better to document it's
undocumented:-)



>  I'd probably collect the data and print it at a
> well defined spot

>
> so, no matter how this works, it's something to be used with care

sure:-)
>


David



More information about the luatex mailing list