[XeTeX] Overriding Unicode text direction with \beginR ... \endR

David M. Jones dmj at ams.org
Thu Aug 7 02:50:32 CEST 2008


I stumbled across the answer:

    \TeXXeTstate=1
    
    \nopagenumbers
    
    % \chardef\popDirection"202C
    % \chardef\forceLtoR"202D
    \chardef\forceRtoL"202E
    
    \beginR
    0123456789
    
    \font\0="Gentium"
    \0
    
    \beginR
    0123456789
    
    \beginR
    \forceRtoL
    0123456789
    
    \everypar={\setbox0=\lastbox \beginR \box0 \forceRtoL}
    
    0123456789
    
    \bye

Cheers,
David.    

> Date: Mon, 4 Aug 2008 22:07:16 -0400
> From: "David M. Jones" <dmj at ams.org>
> 
> When I typeset the following document with r803 of the XeTeX trunk,
> the first row of digits (in CMR) is reversed, but the second isn't.
> 
>     \TeXXeTstate=1
>     
>     \nopagenumbers
>     
>     \beginR
>     0123456789
>     \endR
>     
>     \font\0="Gentium"
>     \0
>     
>     \beginR
>     0123456789
>     \endR
>     
>     \bye
> 
> I assume this is because in the second case, the Unicode
> directionality of the Basic Latin plane is overriding \beginR.  Is
> there a way to override the overriding?


More information about the XeTeX mailing list