[XeTeX] \beginL and colour

Adam Lindsay atl at comp.lancs.ac.uk
Sat Nov 13 12:55:41 CET 2004

Adam Lindsay said this at Sat, 13 Nov 2004 11:16:44 +0000:

>>> Is this a bug, or a complete lack of understanding on my part of the 
>>> model?
>>Looks like a bug to me. I wonder why it does that........
>Following a hunch this morning, I switched the black and red lines, and
>it came out as originally intended. Could it be the something in Apple's
>styled text system continues to scan from left to right for applying colours?

[to answer my own question:]
Yeah, it's looking like that's the case. If I put the colour switch
inside a \beginL, then it scans in the right order:

\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
hello there world
\endR \par

...My guess is that ATSUI is following the script-determined direction,
regardless of the paragraph direction that XeTeX asserts.
And that to me sounds like a good reason for what HH was arguing for:

>> [I noted that words were in reverse order, but not the letters, when 
>>  Roman AAT scripts were used with \beginR.]
>> This is because XeTeX also respects the inherent direction of the script
>> (from Unicode/the font itself), so insertion of a word of arabic, for
>> example, is correctly set right-to-left, even in a paragraph of LtoR roman.
>ha, funny side effect, somehow i think that this kind of automatisms are 
>dangerous (same for language)
>so, maybe we're talking about \worddir as well
>i think that it makes sense to have an xtex switch for disabling this 
>automatism: three states: font, font+tex, tex

I thought XeTeX was being really clever, so wasn't convinced by Hans at
the time. The above feature interaction has me convinced now, though!

 Adam T. Lindsay, Computing Dept.     atl at comp.lancs.ac.uk
 Lancaster University, InfoLab21        +44(0)1524/510.514
 Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492

More information about the XeTeX mailing list