[XeTeX] XeTeX, Persian, Page Numbers, Footnote Numbers and other same issues

Ali Majdzadeh ali.majdzadeh at gmail.com
Thu Nov 29 09:58:34 CET 2007


Otared,
Thanks a lot. I am going to give it a try.

Kind Regards
Ali


2007/11/29, Otared Kavian <otared at gmail.com>:
>
> > On 27 Nov 2007, at 9:10 am, Ali Majdzadeh wrote:
> >
> >> Hello
> >> Is it possible to produce page numbers in Persian? The same
> >> question exists about footnote numbers, endnote numbers and heading
> >> numbers.
> >>
>
>
> Hi Ali,
>
> Actually, following Mojca's answer, using ConTeXt + XeTeX, that is the
> format called XeConTeXt, using Persian numerals is quite easy: one has
> only to specify how the nmbers are converted to such and such glyphs.
> Below is a complete working example.
> Note that there is still a problem with the alignment of sections
> headers…
> This also can be fixed but right now I don't remember how and I don't
> have time to search in my archives :-)
>
> Best reards: OK
>
> %%%%%%%%%%
> %!TEX TS-program = xecontext
>
> % following Mojca M.'s suggestions:
>
> \TeXXeTstate=1
> \everypar={\setbox0=\lastbox \beginR \box0 }
>
> \font\PersianA="B Zar" at 10pt
>
> \font\PersianB="X Ferdosi" at 10pt
>
> % persian page numbers:
>    \setuppagenumbering[conversion=persiannumerals,style=\PersianA]
>
> % persian heading numbers:
>    \setuphead[section][conversion=persiannumerals,numberstyle=
> \PersianA]
>    \setuphead[subsection][conversion=persiannumerals,numberstyle=
> \PersianA]
>
> % persian footnotes numbers:
>    \setupfootnotes[conversion=persiannumerals,style=\PersianA]
>
> % persian item numbers
>        \setupitemize[conversion=persiannumerals,stopper=,left={(},style=
> \PersianA]
>
> \starttext
>
> \PersianB
> \beginR
>
> \section{
> \PersianB
> گفتار یکم
> }
>
>
> \startitemize[n]
> \dorecurse{5}{
> \item
> اين آزمايش نوشتن فارسى است بدون هيچ
> آمادگى
>
> ۱۲۳۴۵۶۷۸۹۰
>
> \item
> .خانه دوست كجاست؟ در فلق بود كه پرسيد
> سوار
>
> ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰
> }
> \stopitemize
>
> \subsection{
> \PersianB
> بخش یکم
> }
>
> ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰
>
>
> \subsection{
> \PersianB
> بخش دوم
> }
>
> ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰
>
> \stoptext
> %%%%%%%%%%
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20071129/9c88a242/attachment-0001.html 


More information about the XeTeX mailing list