bidi-lua.tex /size: 1552 b    last modification: 2021-10-28 13:50
1% language=us runpath=texruns:manuals/bidi
2
3\startcomponent bidi-lua
4
5\environment bidi-style
6
7\startchapter[title={The \LUA\ interface}]
8
9We assume that you run \CONTEXT\ \MKIV\ in combination with \LUATEX. Direction
10support in this engine has been improved over time. Originally the \OMEGA\
11(\ALEPH) direction model was used but in the meantime it has been stripped to the
12basics, and what used to be so called whatsits (extension nodes) are now first
13class nodes. Of the many directions only four are kept in \LUATEX\ and they are
14indicated by three letters:
15
16\starttabulate[|l|l|l|]
17\NC 0 \NC \type {TLT} \NC left to right \NC \NR
18\NC 1 \NC \type {TRT} \NC right to left \NC \NR
19\NC 2 \NC \type {LTL} \NC not used in context (obsolete) \NC \NR
20\NC 3 \NC \type {RTT} \NC not used in context (obsolete) \NC \NR
21\stoptabulate
22
23In \LUAMETATEX, and therefore \CONTEXT\ \LMTX\ we only have the first two.
24Therefore in \LMTX\ you normally don't have to worry about checking for them at
25the \LUA\ end because they are irrelevant for calculations (the vertical ones
26swapped the horizontal and vertical progression). Also, when really needed, we
27use the \type {direction} keys with numerical indicators, so zero for \type {l2r}
28and one for \type {r2l}. These values are used for local par nodes as well as
29direction nodes. In addition a direction node has a subtype:
30
31\starttabulate[|l|l|l|]
32\NC 0 \NC \type {normal} \NC comparable to \type {+} \NC \NR
33\NC 1 \NC \type {cancel} \NC comparable to \type {-} \NC \NR
34\stoptabulate
35
36\stopchapter
37
38\stopcomponent
39