[Dev-luatex] Hooking into the page builder?

Taco Hoekwater taco at elvenkind.com
Mon Nov 22 16:04:49 CET 2010


On 11/22/2010 03:54 PM, Graham Douglas wrote:
> Hi All
>
> I'd like to use GraphViz to create a graph of the entire
> node structure of a (simple) page. Keeping the page simple
> and just for experimentation. Not trying to change any values
> of node lists, just to output values and structures etc.
>
> Before I get too far, is it safe/possible to do this?
> If so, would anyone have some pseudo code I can use to
> get me started in the right direction...?
>
> Many thanks in advance for suggestions etc.

The simplest is:

callback.register('pre_output_filter', function (head)
   ...
   return head
end)

This callback does not replace any code, so you can do whatever you
want without interfering, as long as you remember to pass back
'head'. This callback runs just before box255 is packaged for
the output routine, btw.

Best wishes,
Taco



More information about the dev-luatex mailing list