Hello,

with the following I get an orphan enddir node

==============================
run \linedirection=1 run \linedirection=0 run
run \linedirection=1 run
\bye
=============================

This can confuse the par builder in some situations, and even worse it can 
confuse the code in pdflistout.c
Another example, where the confusion is visible, is

=================================
run \linedirection=1 run \linedirection=0 run
run {\linedirection=1 run} run \linedirection=1 run

\bye=================================
Note how the last "run" (or nur with direction) is at the bottom left corner.

In fact, anything in the problematic line that is after the problematic point 
is being shifted,
and after the line break things are restored:
============================
run \linedirection=1 run \linedirection=0 run

run {\linedirection=1 run} run \linedirection=1 run \linedirection=0 run Some 
more\hfill\break text
\bye
============================

I think this is because when hlist_out() encounters the orphan enddir node the
coordinate system gets corrupted because the orphan enddir causing it the be 
restored
to bogus saved values.

The enddir node is inserted in 
https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/master/source/texk/web2c/luatexdir/tex/maincontrol.c#L3079

or (with \textdirection) in 
https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/master/source/texk/web2c/luatexdir/tex/maincontrol.c#L3084

Udi
_______________________________________________
dev-luatex mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to