[Dev-luatex] [***SPAM***] Traversing node list structures

Hans Hagen pragma at wxs.nl
Sun Nov 28 20:00:58 CET 2010

On 28-11-2010 7:40, Graham Douglas wrote:
> Thanks Hans.
> Sure, I've been doing this to generate the GraphViz
> diagrams etc plus hooking into various callbacks etc.
> What I don't yet quite understand is the correct navigation or
> link path to follow through the node structures and the best way to
> access or calculate glue (set) values for things like skip between words.

that is just a multiplication factor; for the precise dealing of it you 
might want to look into the backend code (take the dvi related code at 
that is rather simple and discussed in the tex the program book as well; 
it might look more complex due to hz and protruding)

> All this reflects my currently hazy understanding of the
> liks + connections in the node graph.
> For example, see the attached PDF of the graph arising from
> a saimple example:
> \setbox0\vbox{Hello to Lua\TeX\ and another \vbox {here}}
> Even with this simple example the node traversal
> to render in the right order seems quite complex.

in general you loop recursively, i.e. in a typeset box you need to 
follow the list in hlist/vlist nodes; in backend related operations you 
also might need to go into the leader part of a rule

of course whatsits are sort if special as they can represent anything

it all depends on what you want to do but


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

More information about the dev-luatex mailing list