A possible bug in mixed directional typesetting
![](https://secure.gravatar.com/avatar/1cf2d7d6a0fdf04fd11109f5cdb5d1b7.jpg?s=120&d=mm&r=g)
Hello all, Attached a file with what I believe to be a wrong output. Strangely, if I do one of the following steps, the last "ab" returns to the correct ocation (currently the last ab is at the left hand side bottom corner): * if I remove one of the "unnecessary" \textdir TLT * if I remove the grouping around \textdir TRT * if I add another group around {ab\texdir TRT ab}\textdir TLT I can reproduce this result on both miktex and texlive with LaTeX 1.16.0. Is this a bug? or am I somehow misusing the \textdir primitive? Regards, Udi
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
Hello all,
Attached a file with what I believe to be a wrong output. Strangely, if I do one of the following steps, the last "ab" returns to the correct ocation (currently the last ab is at the left hand side bottom corner):
* if I remove one of the "unnecessary" \textdir TLT
* if I remove the grouping around \textdir TRT
* if I add another group around {ab\texdir TRT ab}\textdir TLT
I can reproduce this result on both miktex and texlive with LaTeX 1.16.0.
Is this a bug? or am I somehow misusing the \textdir primitive? you push a node onto the list but not in horizontal mode so that likely confuses the direction recovery (just put something invisible in from of
On 4/11/2023 3:25 PM, Udicoudco wrote: the textdir that forces entering the paragraph migh thelp); patching directional code is a bit tricky and likely not compatible Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/1cf2d7d6a0fdf04fd11109f5cdb5d1b7.jpg?s=120&d=mm&r=g)
On Wed, Apr 12, 2023 at 12:10 AM Hans Hagen
Hello all,
Attached a file with what I believe to be a wrong output. Strangely, if I do one of the following steps, the last "ab" returns to the correct ocation (currently the last ab is at the left hand side bottom corner):
* if I remove one of the "unnecessary" \textdir TLT
* if I remove the grouping around \textdir TRT
* if I add another group around {ab\texdir TRT ab}\textdir TLT
I can reproduce this result on both miktex and texlive with LaTeX 1.16.0.
Is this a bug? or am I somehow misusing the \textdir primitive? you push a node onto the list but not in horizontal mode so that likely confuses the direction recovery (just put something invisible in from of
On 4/11/2023 3:25 PM, Udicoudco wrote: the textdir that forces entering the paragraph migh thelp); patching directional code is a bit tricky and likely not compatible
Indeed, entering horizontal mode before the first \textdir returns the last "ab" back to the expected place in this case. Wouldn't that solution cause wrong indentation if I would like to typeset a right-to-left paragraph, as the indent is placed before the node? It also seems that subsequent paragraphs are affected, regardless of the mode at which the first \textdir is placed. Attached is a second example. Regards, Udi
![](https://secure.gravatar.com/avatar/1cf2d7d6a0fdf04fd11109f5cdb5d1b7.jpg?s=120&d=mm&r=g)
On Wed, Apr 12, 2023 at 2:46 AM Udicoudco
It also seems that subsequent paragraphs are affected, regardless of the mode at which the first \textdir is placed.
It looks like the problem only occurs when the two directional switches are on the same line, and only the text up to the next line break is affected. Attached another example.
Regards, Udi
participants (2)
-
Hans Hagen
-
Udicoudco