[luatex] Info on direction primitives/implementation
taco at docwolves.nl
Tue Dec 4 13:58:35 CET 2012
On Dec 4, 2012, at 12:43 PM, Joseph Wright <joseph.wright at morningstar2.co.uk> wrote:
> Tracking changes through from one engine to another is pretty tricky,
> particularly when the docs for the older engines are not so easy to
> find. I'm also aware that there are lots of things that LuaTeX improves
> on over older engines, so it's best to be sure what is done and moreover
> how it works. So I'm keen to find an answer that covers LuaTeX
> 'directly', if at all possible.
I could paste the old omega stuff into the luatex reference manual, especially
since that old omega manual is hard to find. There is also some stuff I wrote
once to Idris that could be added. But there is nothing I can give right now, I
have to search through old posts and archives.
> based on LuaTeX manual 188.8.131.52 'Direction parameters'. However, I still
> don't know how this is implemented. (e-TeX says \beginR, etc. are an
> abuse of the math on/off system, so there I have some clue.)
Omega uses dedicated (whatsit) nodes. These are at least documented in the
luatex reference, but without any actual explanation. The idea is (roughly)
that the extra nodes are added to hlists and vlists. Direction start nodes are
added mostly via explicit user commands, stop modes are added mostly
via the \endgroup / \egroup handling functions.
The nodes that come from \textdir tend to span across lines, and that
is solved in the linebreak routine by adding extra end nodes at the end /
start of boxes line boxes.
There is (of course) much more detail than this, but that is the overview.
More information about the luatex