[XeTeX] \beginL and colour
jonathan_kew at sil.org
Mon Nov 15 14:46:07 CET 2004
On 15 Nov 2004, at 4:53 am, Hans Hagen wrote:
> Jonathan Kew wrote:
>> On 12 Nov 2004, at 7:38 pm, Adam Lindsay wrote:
>>> Hi Jonathan, all.
>>> I ran into what I think is a bug. It's an interaction between colour
>>> the \beginL \endL mechanism. I reduced it to this:
>>> Is this a bug, or a complete lack of understanding on my part of the
>> Looks like a bug to me. I wonder why it does that........
> because the specials end up in the wrong order; and ... there is no
> way that oen can automatically decide what to do unless it's made
> explicit (some things indeed need to change order, others don't)
Yes, having realized what's happening, this is an inherent weakness in
using \special's to affect the text, in conjunction with the e-TeX bidi
mechanism that ends up reversing horizontal lists. I don't anticipate
doing anything to try and fix it in XeTeX for the time being.
Note that it should be possible to implement arbitrary text color
changes by using \fontname to retrieve the current font name, adding a
"color=...." attribute, and setting a new font. In this case, the color
is associated directly with the actual text characters, so it will work
properly despite the reordering.
More information about the XeTeX