[luatex] Issue with unpaired dir node

Khaled Hosny dr.khaled.hosny at gmail.com
Mon Oct 29 22:21:38 CET 2018

Hello all,

I’m working on a package that modifies the node list, and I’m working by
copying the node list one node at a time, doing some modifications
(possibly adding or dropping some of the nodes). This is working fine so
far, with one exception:

When setting an RTL paragraph like this:

\pardir TRT
\textdir TRT

The resulting paragraph is not right aligned after my code processes it,
but properly aligned otherwise. On the other hand, if I drop the
\{begin,end}group things are fine. Looking closely, there seem to be an
an +TLT dir node inserted without a closing -TLT one. If I change my
code to drop that node, things are fine again.

I’m not sure whether this unpaired +TLT node is expected or not, or what
is wrong with my code that is causing the misalignment. I’m attaching a
sample file that shows this behaviour, with some commented out code that
shows that removing the stray dir node fixes things.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpaired-dir.tex
Type: application/x-tex
Size: 914 bytes
Desc: not available
URL: <https://tug.org/pipermail/luatex/attachments/20181029/8b9accab/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 185264 bytes
Desc: not available
URL: <https://tug.org/pipermail/luatex/attachments/20181029/8b9accab/attachment-0001.pdf>

More information about the luatex mailing list