[luatex] Creating a token list

Javier Bezos listas at tex-tipografia.com
Thu Mar 7 15:00:06 CET 2019


>> My original question was how to generate in lua
>> the token list to feed the data field (ie, ???)
> 
> Still not sure whether I understand the question...
> 
> local n = node.new(8, 1)
> n.stream = 1
> tex.scantoks(0, 0, "\the\lastxpos")
> n.data = tex.toks[0]

This is the concept, indeed, but this piece of code
doesn't work because:

-- n.data expects a table (with a list of triplets).
-- tex.toks[0] returns a string.

Javier


More information about the luatex mailing list