Instantly share code, notes, and snippets.

# pgundlach/viznodelist.lua Last active Apr 19, 2018

LuaTeX nodelist visualization

### hennigs commented Oct 8, 2012

 An issue with hlist and vlist nodes. Edges departing from the field labelled list always head south, while in most cases they should head east, like, e.g., the edges departing from next fields do.

### hennigs commented Oct 8, 2012

 An issue with hlist and vlist nodes. Field list should be renamed to head. To quote from the LuaTeX manual: Note: the new field name head was introduced in 0.65 to replace the old name list. Use of the name list is now deprecated, but it will stay available until at least version 0.80.
Owner

### pgundlach commented Nov 10, 2012

 I missed your comment, sorry. I will rename head/list and have a look at the edges departing from list/head field. Thank you very much for your comment!

### hennigs commented Nov 10, 2012

 An RFE this time: In user-defined whatsit nodes, would it be possible to show fields user_id, type and value?
Owner

### pgundlach commented Feb 27, 2013

 Thanks @hennigs, I've finally implemented your suggestions.

### neapel commented May 24, 2013

 To limit output for quickly checking a node's neighbours max_prev, max_next and max_head options would be useful, i.e. called on node n with max_head=1 would draw n and n.head but not n.head.head, but instead a dangling arrow.

### Josef-Friedrich commented Jul 7, 2016 • edited Edited 1 time Josef-Friedrich edited Jul 7, 2016 (most recent)

 I have also witten a package which visualizes the node lists. My package nodetree tries to solve the challenge to visualize the node structure in a different approach. https://www.ctan.org/pkg/nodetree
Owner

### pgundlach commented Nov 16, 2017

 Here is an example of the output of the file:

### u-fischer commented Mar 14, 2018

 I tried the code on the AtBeginShipoutBox with luatex 1.07 from texlive 2018 pretest: \documentclass{article} \usepackage{atbegshi,lipsum} \AtBeginShipout {% \directlua{require("viznodelist") viznodelist.nodelist_visualize(tex.box["AtBeginShipoutBox"],"mybox.gv")}} \pagestyle{empty} \begin{document} abc \end{document}  When I try to convert this to a pdf with dot.exe I get a warning Warning: node n80, port title unrecognized Warning: node n80, port title unrecognized  and there is a mysterious n80 node in the middle:

### rolfn commented Apr 12, 2018

 I can confirm this (Linux, TeXLive 2017, luatex 1.0.4). I get Warning: node n78, port title unrecognized  ...Rolf