[XeTeX] color directives in RL context
Bruno Voisin
bvoisin at mac.com
Tue Apr 17 14:25:44 CEST 2007
Le 17 avr. 07 à 13:02, Jonathan Kew a écrit :
> An example that shows font color working with R-L text is:
>
> \documentclass{article}
> \usepackage[xetex]{color} % <= 'xetex' works with either xdv2pdf or
> xdvipdfmx
> \usepackage{fontspec}
> \setmainfont{Times New Roman}
> \TeXXeTstate=1
> \begin{document}
> \everypar={\setbox0=\lastbox \beginR \box0 }
>
> black black black black black black black black black black black
> black
> black black black black black \addfontfeature{Color=0000FF}blue blue
> blue blue blue
> blue blue blue blue blue blue blue blue blue blue blue blue
> \end{document}
Running a color-stripped version of your example:
\documentclass{article}
\usepackage{fontspec}
\TeXXeTstate=1
\begin{document}
\everypar={\setbox0=\lastbox \beginR \box0 }
abc def ghi jkl mno pqr stu vwx yz
\end{document}
something very odd is revealed:
- With fontspec, in right-to-left mode word ordering is reversed, but
not the individual letters within each word, yielding
yz vwx stu pqr mno jkl ghi def abc
- Without fontspec, not only word ordering is reversed but also the
individual letters within each word, yielding
zy xwv uts rqp onm lkj ihg fed cba
Which of these two behaviours is the intended one? Or are things as
they should?
Bruno Voisin
More information about the XeTeX
mailing list