diff options
author | Karl Berry <karl@freefriends.org> | 2008-07-22 17:21:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-07-22 17:21:18 +0000 |
commit | 1e2a43a4beae84cdca27de59864267a140b79378 (patch) | |
tree | 48f1cd598c63abd49855a7958a200acaa59291a7 /Master/texmf-dist/tex/xelatex | |
parent | 52dec36b84825c197770ddbfd4798946ba672280 (diff) |
missed xepersian commit
git-svn-id: svn://tug.org/texlive/trunk@9702 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty | 188 |
1 files changed, 93 insertions, 95 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty index f34fb8a38d2..959b6f1e9e1 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty +++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{xepersian}[2008/07/16 v0.1611111 +\ProvidesPackage{xepersian}[2008/07/17 v0.16111111 Typesetting Persian with XeTeX] \RequirePackage{graphicx} \RequirePackage{amssymb} @@ -16,39 +16,39 @@ \newfontfamily\farsifont[Script=Arabic,Scale=1.2,Mapping=farsidigits]{Nazli}\fi }% -\renewcommand{\thepage}{\RL{\the\c@page}} - -%to make the digits in math formula persian
-\font\tenrgm="Nazli" at 12pt
-\font\sevrgm="Nazli" at 10pt
-\font\fivrgm="Nazli" at 7pt
-\newfam\fardig
-\textfont\fardig=\tenrgm
-\scriptfont\fardig=\sevrgm
-\scriptscriptfont\fardig=\fivrgm
-\def\maths{
- \XeTeXmathcode`0="7 \fardig "06F0%
- \XeTeXmathcode`1="7 \fardig "06F1%
- \XeTeXmathcode`2="7 \fardig "06F2%
- \XeTeXmathcode`3="7 \fardig "06F3%
- \XeTeXmathcode`4="7 \fardig "06F4%
- \XeTeXmathcode`5="7 \fardig "06F5%
- \XeTeXmathcode`6="7 \fardig "06F6%
- \XeTeXmathcode`7="7 \fardig "06F7%
- \XeTeXmathcode`8="7 \fardig "06F8%
- \XeTeXmathcode`9="7 \fardig "06F9%
- \XeTeXmathcode`.="7 \fardig "066B%decimal point
-}
-\XeTeXmathcode`٫="7 \fardig "066B%decimal point
-\XeTeXmathcode`۰="7 \fardig "06F0%
-\XeTeXmathcode`۱="7 \fardig "06F1%
-\XeTeXmathcode`۲="7 \fardig "06F2%
-\XeTeXmathcode`۳="7 \fardig "06F3%
-\XeTeXmathcode`۴="7 \fardig "06F4%
-\XeTeXmathcode`۵="7 \fardig "06F5%
-\XeTeXmathcode`۶="7 \fardig "06F6%
-\XeTeXmathcode`۷="7 \fardig "06F7%
-\XeTeXmathcode`۸="7 \fardig "06F8%
+\renewcommand{\thepage}{\rl{\the\c@page}} + +%to make the digits in math formula persian +\font\tenrgm="Nazli" at 12pt +\font\sevrgm="Nazli" at 10pt +\font\fivrgm="Nazli" at 7pt +\newfam\fardig +\textfont\fardig=\tenrgm +\scriptfont\fardig=\sevrgm +\scriptscriptfont\fardig=\fivrgm +\def\maths{ + \XeTeXmathcode`0="7 \fardig "06F0% + \XeTeXmathcode`1="7 \fardig "06F1% + \XeTeXmathcode`2="7 \fardig "06F2% + \XeTeXmathcode`3="7 \fardig "06F3% + \XeTeXmathcode`4="7 \fardig "06F4% + \XeTeXmathcode`5="7 \fardig "06F5% + \XeTeXmathcode`6="7 \fardig "06F6% + \XeTeXmathcode`7="7 \fardig "06F7% + \XeTeXmathcode`8="7 \fardig "06F8% + \XeTeXmathcode`9="7 \fardig "06F9% + \XeTeXmathcode`.="7 \fardig "066B%decimal point +} +\XeTeXmathcode`٫="7 \fardig "066B%decimal point +\XeTeXmathcode`۰="7 \fardig "06F0% +\XeTeXmathcode`۱="7 \fardig "06F1% +\XeTeXmathcode`۲="7 \fardig "06F2% +\XeTeXmathcode`۳="7 \fardig "06F3% +\XeTeXmathcode`۴="7 \fardig "06F4% +\XeTeXmathcode`۵="7 \fardig "06F5% +\XeTeXmathcode`۶="7 \fardig "06F6% +\XeTeXmathcode`۷="7 \fardig "06F7% +\XeTeXmathcode`۸="7 \fardig "06F8% \XeTeXmathcode`۹="7 \fardig "06F9% \AtBeginDocument{\maths\setRL\farsifont} @@ -279,17 +279,17 @@ \@ifclassloaded{article}{% \renewcommand{\refname}{مراجع} \renewcommand{\abstractname}{چکیده} -\renewcommand\appendix{\par
- \setcounter{section}{0}%
- \setcounter{subsection}{0}%
+\renewcommand\appendix{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% \gdef\thesection{\@farsi\c@section}} }{} \@ifclassloaded{amsart}{% \renewcommand{\refname}{مراجع} \renewcommand{\abstractname}{چکیده} -\renewcommand\appendix{\par
- \setcounter{section}{0}%
- \setcounter{subsection}{0}%
+\renewcommand\appendix{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% \gdef\thesection{\@farsi\c@section}} }{} \@ifclassloaded{report}{% @@ -297,24 +297,24 @@ \renewcommand{\abstractname}{چکیده} \renewcommand{\chaptername}{فصل} \renewcommand{\partname}{بخش} -%to make appendix numbering farsi
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@farsi\c@chapter}
+%to make appendix numbering farsi +\renewcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@farsi\c@chapter} }%end appendix }{} \@ifclassloaded{amsbook}{% \renewcommand{\bibname}{کتابنامه} \renewcommand{\chaptername}{فصل} \renewcommand{\partname}{بخش} -%to make appendix numbering farsi
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@farsi\c@chapter}
+%to make appendix numbering farsi +\renewcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@farsi\c@chapter} }%end appendix }{} \@ifclassloaded{bookest}{% @@ -322,62 +322,62 @@ \renewcommand{\bibname}{کتابنامه} \renewcommand{\chaptername}{فصل} \renewcommand{\partname}{بخش} -%to make appendix numbering farsi
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@farsi\c@chapter}
+%to make appendix numbering farsi +\renewcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@farsi\c@chapter} }%end appendix }{} \@ifclassloaded{book}{% \renewcommand{\bibname}{کتابنامه} \renewcommand{\chaptername}{فصل} \renewcommand{\partname}{بخش} -%to make appendix numbering farsi
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@farsi\c@chapter}
+%to make appendix numbering farsi +\renewcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@farsi\c@chapter} }%end appendix }{} \@ifclassloaded{refrep}{% \renewcommand{\bibname}{کتابنامه} \renewcommand{\chaptername}{فصل} \renewcommand{\partname}{بخش} -%to make appendix numbering farsi
-\renewcommand\appendix{\par
- \setcounter{chapter}{0}%
- \setcounter{section}{0}%
- \gdef\@chapapp{\appendixname}%
- \gdef\thechapter{\@farsi\c@chapter}
+%to make appendix numbering farsi +\renewcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@farsi\c@chapter} }%end appendix }{} -%We redefine arabic counter style
-\def\@@number#1{\ifmmode\else\beginL\fi{#1}\ifmmode\else\endL\fi}
-\def\@@latin#1{\@@number{{\@fromrl#1}}}
-\def\@number{\protect\@@number}
-\def\@latin{\protect\@@latin}
-\let\@farsi=\@arabic
-\let\@@arabic=\@arabic
-\let\@@roman=\@roman
-\let\@@Roman=\@Roman
-\let\@@alph=\@alph
-\let\@@Alph=\@Alph
-\def\@arabic#1{\ifmmode\else\@number{\@@arabic#1}\fi}
-\def\@Roman#1{\@latin{\@@Roman#1}}
-\def\arabicnorl#1{\expandafter\@@arabic\csname c@#1\endcsname}
-\def\make@lr#1{\begingroup
- \toks@=\expandafter{#1}%
- \edef\x{\endgroup
- \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
- \x}
-\def\@character#1{\ifcase#1\or الف\or ب\or پ\or ت\or ث\or ج\or چ\or ح\or خ\or د\or ذ\or ر\or ز\or س\or ش\or ص\or ض\or ع\or غ\or ف\or ق\or ک\or گ\or ل\or م\or ن\or ه\or و\or ی\fi}
-
+%We redefine arabic counter style +\def\@@number#1{\ifmmode\else\beginL\fi{#1}\ifmmode\else\endL\fi} +\def\@@latin#1{\@@number{{\@fromrl#1}}} +\def\@number{\protect\@@number} +\def\@latin{\protect\@@latin} +\let\@farsi=\@arabic +\let\@@arabic=\@arabic +\let\@@roman=\@roman +\let\@@Roman=\@Roman +\let\@@alph=\@alph +\let\@@Alph=\@Alph +\def\@arabic#1{\ifmmode\else\@number{\@@arabic#1}\fi} +\def\@Roman#1{\@latin{\@@Roman#1}} +\def\arabicnorl#1{\expandafter\@@arabic\csname c@#1\endcsname} +\def\make@lr#1{\begingroup + \toks@=\expandafter{#1}% + \edef\x{\endgroup + \def\noexpand#1{\noexpand\@number{\the\toks@}}}% + \x} +\def\@character#1{\ifcase#1\or الف\or ب\or پ\or ت\or ث\or ج\or چ\or ح\or خ\or د\or ذ\or ر\or ز\or س\or ش\or ص\or ض\or ع\or غ\or ف\or ق\or ک\or گ\or ل\or م\or ن\or ه\or و\or ی\fi} + \def\@farsi#1{\farsifont\@character{\@@arabic#1}} @@ -458,10 +458,8 @@ \newenvironment{english}{\par\vspace{.5cm}\setLR\begin{rmfamily}}{\end{rmfamily}\par\vspace{.5cm}} -\let\@uLR=\LR -\def\LR#1{\@uLR{\rmfamily{#1}}} -\let\@uRL=\RL -\def\RL#1{\@uRL{\farsifont#1}} +\def\lr#1{\LR{\rmfamily{#1}}} +\def\rl#1{\RL{\farsifont#1}} %To fix tabular problem in bidi. Taken from farsitex |