[luatex] Inserting a "dummy" node

Hans Hagen pragma at wxs.nl
Sat Oct 28 12:09:26 CEST 2017


On 10/28/2017 9:20 AM, Javier Bezos wrote:
> Hans,
> 
>> there are user nodes that you can inject
>>
>>      \def\dummynode#1{\directlua{
>>          local n = node.new("whatsit",node.subtype("user_defined"))
>>          n.type = 100
>>          n.value = #1
>>          node.write(n)
>>      }}%
>>
>>      foo\dummynode{123}bar
> 
> Thanks, this is what I was looking for, but is not node.write
> experimental? Or has it come to stay?
it has been around for quite a while now and (as i use it it will stay)

the only thing to keep in mind is that it can only be issued when in 
horizontal mode (you get an error otherwise) bnut that is no big deal

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list