[luatex] TeX scanner

Andreas Matthias andreas.matthias at gmail.com
Mon Oct 20 19:51:44 CEST 2014


luigi scarso wrote:

> \directlua {
>     function followup(n)
>         print(tex.box[n].list.width)
>         print(tex.box[n].list.height)
>         print(tex.box[n].list.depth)
>         tex.print(tex.box[n].list.width  .. "\string\\par")
>         tex.print(tex.box[n].list.height .. "\string\\par")
>         tex.print(tex.box[n].list.depth  .. "\string\\par")
>     end
> }
> \directlua {
>     tex.print([[\string\setbox0=\string\hbox{foo}]])
>     tex.print([[\string\directlua{followup(0)}]])
> }
> 
> (the code is from H. Hagen)


That's it. Thanks!

The argument of tex.print is fed to the TeX scanner. I've read this
part of the documentation over and over again, but didn't get it right.
Thanks for the code.


Ciao
Andreas



More information about the luatex mailing list