[XeTeX] \beginL and colour

Hans Hagen pragma at wxs.nl
Mon Nov 15 10:46:50 CET 2004


Hi Adam,

> Hi Jonathan, all.
> 
> I ran into what I think is a bug. It's an interaction between colour and
> the \beginL \endL mechanism. I reduced it to this:
> 
> \TeXXeTstate=1
> \def\babble{Wa dfonbds kmkn doni don cspdsc mpw mcpi kljndf l dlkn dmnde
> knds, fdwih kdfj dowk. Ifskn nods ods  cskc vif kldn conc lc -- mioefj dinj
> dfnwo dnnks kw mxzlkw mdow. }
> \babble \par
> \beginR
> \babble
> \special{x:textcolor=FF0000} 
> hello there world
> \special{x:textcolor=000000} 
> \babble
> \endR \par
> \babble
> \end
> 
> 
> Is this a bug, or a complete lack of understanding on my part of the model?

I guess that it's an illustration that rl typesetting never really got from the 
ground in the tex world -)

The fact that tex can be made to go from right to left as in etex/xtex (or 
bottom to top or whatever omega provides) does not give you a full blown rl 
typesetting engine for free. The same is true for unicode: the fact that you can 
suddenly typeset all those glyphs does not mean that you have a multi lingual 
typesetting system.

However, etex, xetex, omega, aleph, ... give you the tools to build such a 
machinery. The main issue is that transformations and attributes (like color) as 
well as the general page layout construction need to know if we're going from 
left to right and adapt accordingly; currently specials are simply swapped 
(revresed) with the text, so you end up with a mismatch between begin and end

a solution is to provide something \Bspecial and \Especial (not swapped); 
another solution is in adapting your macros.

(i played with it long ago but dropped it since i don't do rl typesetting; if 
you're interested i can send you a test file that does the right thing [for color])

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the XeTeX mailing list