[XeTeX] Are the new etex changes reflected in XeTeX? (was XeTeX bugs in bidirectional typesetting)

David Carlisle d.p.carlisle at gmail.com
Sun Nov 20 21:02:19 CET 2016


On 20 November 2016 at 18:19, Jonathan Kew <jfkthame at gmail.com> wrote:

> This is very interesting, I didn't know Peter had done that. I think this is
> the right way forward (for an etex-based engine such as xetex), and had been
> hoping to find the time to work on essentially the same idea in xetex, but
> so far the code exists only in my head.
>

If you do find time to look at this... the other main issue besides \specials
where the current model causes problems is the inability to specify direction
while in vertical mode. The restriction to hmode was probably needed in tex-xet
so the extra nodes got added at safe places but in tex--xet it's less
clearly needed.

The restriction to horizontal mode forces fragile code trying to get
the \beginR into \everypar
at the right time, and with tables there basically is no workaround:
you can not construct the tables in vertical mode while stacking the
columns from the right.
(You can wrap them in a box but then they won't split)

It would be really good if xetex could have commands usable in vmode
that produced the effects of luatex
below (doesn't have to be "\textdir TRT" it could be
"\addBeginRByDefaultInHlists"  it doesn't really matter...
Of course it if _was_ "\textdir TRT" that would simplify cross engine
support, but the missing functionality is the main problem, not the
differing syntax.

David


\vsize=5\baselineskip
\topskip=\baselineskip

\ifx\directlua\undefined
\TeXXeTstate=1
%????
\else
%
\textdir TRT                %columns assembled right to left with RTL text
% \bodydir TRT \pagedir TRT % columns added to right of page
\fi



\halign{&#\quad\hfil\cr
111&222\cr
a&b\cr
aabbcc&bcd\cr
a&b\cr
aabbcc&bcd\cr
a&b\cr
aabbcc&bcd\cr
a&b\cr
}

\bye


More information about the XeTeX mailing list