In the excellent article "Output routines: examples and techniques Part IV: Horizontal techniques", David Salomon explores three techniques for dealing with communication from horizontal mode to the OTR, which amount to two "real" tricks: enclosing each character in a box or writing the contents of the boxes to the log file and reprocessing the log file in a second (or third) pass.
I'm wondering if LuaTeX changes the situation. Can LuaTeX look at the contents of boxes character-by-character? David says "Note that each method has its own limitations, and none is completely general," but is that still true? If not, is it possible to solve the problems described in the article in a fully general way using Lua?
I guess what I'm asking is:
- Is character-by-character examination of boxes from the OTR possible with LuaTeX?
- Is there an example of it I can see?