3

When calling a function with a post_linebreak_filter callback, the nodelist only contains nodes of type 0 (hlist), 10 (glue) and 12 (penalty), whereas when using a pre_linebreak_filter callback, type 37 (glyph) nodes are also sent.

Is there a way to analyze glyph nodes of a paragraph after the paragraph has been rendered (in order to insert PDF annotations)?

5

This is not really the whole story. See the LuaTeX wiki and there you'll see that the boxes 0 (hlists) that you find are in fact the lines and these lines contain the glyphs. So what you have to do is: if you find a hlist (id 0), go through the node list where the entry "head" points to. See my answer to the overfull rule question where I call magentabox again with head.head. And for analyzing the nodelist: to get a graphical representation to use with graphviz (gv) see this github gist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.