Hello Bruno<br>
Thanks a lot. I am going to give it a try.<br>
<br>
Regards<br>
Ali<br><br><div><span class="gmail_quote">2007/11/28, Bruno Voisin <<a href="mailto:bvoisin@mac.com">bvoisin@mac.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Le 28 nov. 07 à 01:29, <a href="mailto:mjslouber@berkeley.edu">mjslouber@berkeley.edu</a> a écrit :<br><br>>> Date: Tue, 27 Nov 2007 07:37:38 -0800 (PST)<br>>> From: Apostolos Syropoulos<br>>><br>>>> Is it possible to produce page numbers in Persian? The same
<br>>>> question exists about >footnote numbers, endnote numbers and heading<br>>>> numbers.<br>>><br>>> Of course it is. But either you have modify the standard commads or<br>>> you have to introduce some new commands to take care of this.
<br>>><br>><br>> I am also interested in using non-arabic numbering in my XeTeX/LEDMAC<br>> edition, and I am afraid A.S.'s answer is not very helpful. Is it too<br>> complicated to explain to a beginner how to change these numbering
<br>> commands?<br><br>IIRC LaTeX knows only about arabic and roman numbers, and also about<br>numbering using the roman alphabet and using "old-fashioned" non-<br>alphanumeric characters (for footnotes) like *, §, ¶, †, ‡, ǁ
<br>and the like.<br><br>LaTeX sets up the way counters appear in output by making definitions<br>(for example in article.cls) equivalent to<br><br>\renewcommand{\thesection} {\arabic{section}} % for sections<br>\renewcommand{\thepart} {\Roman{part}} % for parts
<br>\renewcommand{\thefootnote}{\fnsymbol{footnote}} % for footnotes<br>\renewcommand{\theenumii} {\alph{enumii}} % for second-order<br>numbered lists<br><br>where section is the section counter and \thesection the way this
<br>counter is displayed, and so forth.<br><br>But then the hard work of defining the commands \arabic, \roman and so<br>forth is done in latex.ltx, with code equivalent to:<br><br>\newcommand{\arabic}[1]{\expandafter\@arabic\csname c@#1\endcsname}
<br>\newcommand{\roman}[1]{\expandafter\@roman\csname c@#1\endcsname}<br>\newcommand{\Roman}[1]{\expandafter\@Roman\csname c@#1\endcsname}<br>\newcommand{\alph}[1]{\expandafter\@alph\csname c@#1\endcsname}<br>\newcommand{\Alph}[1]{\expandafter\@Alph\csname c@#1\endcsname}
<br>\newcommand{\fnsymbol}[1]{\expandafter\@fnsymbol\csname c@#1\endcsname}<br><br>\newcommand{\@arabic}[1]{\number #1}<br>\newcommand{\@roman}[1]{\romannumeral #1}<br>\newcommand{\@Roman}[1]{\expandafter\@slowromancap\romannumeral #1@}
<br>\newcommand{\@slowromancap}[1]{\ifx @#1% then terminate<br> \else<br> \if i#1I\else\if v#1V\else\if x#1X\else\if l#1L\else\if<br> c#1C\else\if d#1D\else \if m#1M\else#1\fi\fi\fi\fi\fi\fi\fi<br> \expandafter\@slowromancap
<br> \fi}<br>\newcommand{\@alph}[1]{%<br> \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or<br> k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x<br>\or<br> y\or z\else\@ctrerr\fi}
<br>\newcommand{\@Alph}[1]{%<br> \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or<br> K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X<br>\or<br> Y\or Z\else\@ctrerr\fi}<br>\newcommand{\@fnsymbol}[1]{\ensuremath{\ifcase#1\or *\or \dagger\or
<br>\ddagger\or<br> \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger<br> \or \ddagger\ddagger \else\@ctrerr\fi}}<br><br>where \number and \romannumeral are TeX primitives (i.e., commands<br>implemented in the core TeX engine itself).
<br><br>I don't have time to try to explain these definitions in detail, I<br>hope they're more-or-less self-explanatory.<br><br>I can't say much more not knowing anything about Persian numbers. From<br>the answer given by Mojca Miklavec and using ConTeXt, it seems Persian
<br>numbers have the same structure as so-called "arabic" numbers (i.e.<br>base-10, right-to-left ordering of successive powers of 10). So if<br>that's indeed correct, and if the font BCompset does indeed provide
<br>Persian numbers at the slots normally reserved for arabic numbers,<br>then I guess the following could do the job, in the preamble of your<br>LaTeX file:<br><br>\usepackage{fontpec}<br>\newfontfamily\persianfont{BCompset}
<br>\makeatletter<br>\newcommand{\persian}[1]{\expandafter\@persian\csname c@#1\endcsname}<br>\newcommand{\@persian}[1]{\bgroup\persianfont\number #1\egroup}<br>\makeatother<br>\renewcommand{\thefootnote}{\persian{footnote}}
<br><br>Three more things:<br><br>- The above is untested, incomplete (it's not dealing with page<br>numbers which are more complicated) and probably won't work as is. I<br>hope it could provide a starting point for others to come up with
<br>something usable.<br><br>- It's likely that there's a LaTeX package out there somewhere<br>allowing this to be done transparently. But I'm lost personally in the<br>jungle of innumerable and largely redundant LaTeX packages. Have you
<br>looked at the LaTeX Companion 2nd edition?<br><br>- Apart from the Persian font thing, it's more a generic LaTeX<br>question than a XeTeX-specific one. Accordingly, you could get luckier<br>by asking it at a generic LaTeX forum like
comp.text.tex.<br><br>In any case, you see that changing numbering in LaTeX is not<br>straightforward at all, and yes, it's complicated to explain to a<br>beginner how to change it.<br><br>Hope this helps though,<br><br>
Bruno Voisin<br>_______________________________________________<br>XeTeX mailing list<br><a href="mailto:postmaster@tug.org">postmaster@tug.org</a><br><a href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex
</a><br></blockquote></div><br>