diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-07-13 11:36:43 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-07-13 11:36:43 +0000 |
commit | 7d242a30bed5b0fce479c9a5e80f690d19542abc (patch) | |
tree | 617042719fc213b4d276e037ee20421012463e5a /Master/texmf-dist/tex/xelatex/xepersian | |
parent | 901381d41967db76cdaa578dded2923684fb5851 (diff) |
xepersian v0.161 2008/07/12
git-svn-id: svn://tug.org/texlive/trunk@9508 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty index d647998cfc9..bc42b960a37 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/11 v0.16 +\ProvidesPackage{xepersian}[2008/07/12 v0.161 Typesetting Persian with XeTeX] \RequirePackage{amssymb} \RequirePackage{graphicx} @@ -9,7 +9,7 @@ \RequirePackage{arabxetex} \RequirePackage{xltxtra} \RequirePackage{persianpoem,fmultico} -\RequirePackage{xcolor} + \newfontinstance\farsifont[Script=Arabic,Scale=1.2,Mapping=farsidigits]{Nazli} \newfontinstance\arabicfont[Script=Arabic,Scale=1.2]{Scheherazade} \newfontinstance\logofont[Script=Arabic,Scale=1.2]{IranNastaliq} @@ -341,7 +341,7 @@ %For Right-to-Left two column command, I guess taken from rlbabel \makeatletter \let\@old@outputdblcol\@outputdblcol -\newcommand{\rl@outputdblcol}{% +\newcommand{\rl@outputdblcolumn}{% \if@firstcolumn \global \@firstcolumnfalse \global \setbox\@leftcolumn \box\@outputbox @@ -367,16 +367,20 @@ \@startdblcolumn}% \endgroup \fi} -\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl@outputdblcol}} +\newcommand{\rldblcolumn}{\renewcommand{\@outputdblcol}{\rl@outputdblcolumn}} \newcommand{\lrdblcolumn}{\renewcommand{\@outputdblcol}{\@old@outputdblcol}} %set the default direction of the twocolumn texts to Right-to-Left \rldblcolumn \makeatother +% % define the XePersian logo -\newcommand{\XePersian}{\leavevmode$\smash{\hbox{\XeTeX\lower.2ex - \hbox{\kern0em \color[rgb]{0,.6,0}\logofont پارسی}}}$} +\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0 + \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}} +\def\XePersian{\leavevmode$\smash{\hbox{X\lower.5ex + \hbox{\kern-.125em\reflect{E}}Persian}}$} + \newcommand{\eng}[1]{\textroman{ #1}} \newcommand{\fars}[1]{\textfarsi{#1}} @@ -469,37 +473,37 @@ \setRL }} \makeatother -%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% +%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% %to resolve a problem we encounter when using power %or index in math formula |