[XeTeX] Numerals in Right-to-Left

Bruno Voisin bvoisin at mac.com
Wed Nov 17 12:33:18 CET 2004


Le 17 nov. 04, à 11:57, Otared Kavian a écrit :

> But then there is a new issue: how an automatically determined number 
> (such as page number, and so on) should be typeset?
> For instance
>
> \font\geeza="Geeza Pro" at 14pt
> % or
> % \font\kamran="Kamran" at 14pt
> \footline{\vrule width 0cm height 30pt\beginR \geeza \hss --- {\folio} 
> ---\hss\endR}
> % or
> % \footline{\vrule width 0cm height 30pt  \geeza \hss --- {\folio} 
> ---\hss}
>
> results in a blank surrounded by two sets of three dashes (instead of 
> m-dashes).

I think the answer comes to what Jonathan has mentioned in his 
preceding message:

> Le 15 nov. 04, à 15:07, Jonathan Kew a écrit :
>
>> Note that "auto-generated" numbers from TeX macros (like \pageno, for 
>> example) will be the Latin digits 0030..0039, and this may be a 
>> problem when working with non-Latin fonts. It's possible to wrap such 
>> things in additional macro code to replace the Latin digits with the 
>> appropriate codes for a different script, but this requires extra TeX 
>> macro programming.

This is exactly the situation you are faced with: \folio is defined in 
plain.tex based on the counter \pageno, and the primitive \number which 
return the value (a decimal number) of this counter:

\def\folio{\ifnum\pageno<\z@ \romannumeral-\pageno \else\number\pageno 
\fi}

So I think you can't avoid that bit of extra programming.

HTH (probably not that much),

Bruno Voisin



More information about the XeTeX mailing list