Is it even possible to write this in Lua? I need to invoke the line
breaking
algorithm at some time, how do I do this in Lua?
Write "what" ?
\setbox0\vbox{long text that breaks into lines}
and immediately afterwards get the dimensions of this box 0
Yes, it's possible to write lua code for this
\setbox0\vbox{hello world}
\the\ht0
but it's longer than the two lines before -- AFAIK you must build
each node by hands
and pack into a vbox (I don't remember how to pack nodes in vlist )
and then print.
I don't know how to invoke line break algo.
In my opinion
\setbox100=\vbox{\hsize=5cm \input tufte }
is much clearer then basic lua code
You need some lua layer -- maybe there is something in context base
folder.
I am not asking which version is clearer :)
I want to know if this can be done without any TeX code at all.
Patrick