summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty58
1 files changed, 29 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
index b4bfad32aee..ed476e77195 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
@@ -1,17 +1,20 @@
%%
%% This is file `xepersian.sty',
-
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `xepersian.sty')
%%
-%% __________________________________
-%% Copyright © 2008-2010 Vafa Khalighi
+%% ______________________________________
+%% Copyright © 2008–2011 Vafa Khalighi
%%
%% License information appended.
%%
-%%
\NeedsTeXFormat{LaTeX2e}
-\def\xepersianversion{v1.0.9a}
-\def\xepersiancommit{commit 26}
-\def\xepersiandate{2010/07/25}
+\def\xepersianversion{v1.1.0β1}
+\def\xepersiancommit{commit 74}
+\def\xepersiandate{2011/01/01}
\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space <\xepersiancommit>
Persian typesetting in XeLaTeX]
\RequirePackage{fontspec}
@@ -23,7 +26,7 @@ Persian typesetting in XeLaTeX]
xepersian package (Persian for LaTeX over XeTeX)^^J
Description: The package supports Persian^^J
typesetting, using fonts provided in the distribution.^^J
-Copyright © 2008-2010 Vafa Khalighi^^J
+Copyright © 2008–2011 Vafa Khalighi^^J
\xepersianversion, <\xepersiancommit>, \xepersiandate^^J
License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J
Home: http://bitbucket.org/vafa/xepersian^^J
@@ -31,16 +34,6 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\typeout{\xepersianinfo}
\edef\xepersian@everyjob{\the\everyjob}
\everyjob{\xepersian@everyjob\typeout{\xepersianinfo}}
-\AtBeginDocument{\ifdefined\persianfont\relax\else%
-\PackageError{xepersian}{Oops! you have not specified any font for the main text of the document. Please specify a font for the main text of the document by using \settextfont\space CS, and then try to run xelatex on your document again}%
-\fi}
-\AtBeginDocument{\ifdefined\latinfont\relax\else%
-\PackageInfo{xepersian}{“You have not specified any font for the Latin texts of the document and so the default TeX fonts will be used for the Latin texts of the document. If you would like to have any other font as the font of the Latin texts, then please specify a font for the Latin texts of the document by using \setlatintextfont\space CS, and then try to run xelatex on your document again”}%
-\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic},SmallCapsFont={lmromancaps10-regular},SlantedFont={lmromanslant10-regular},BoldSlantedFont={lmromanslant10-bold}]{lmroman10-regular}
-\fi}
-\AtBeginDocument{\ifdefined\decimalseparator\relax\else%
-\PackageInfo{xepersian}{“You have not specified any font for the digits in maths mode and so the digits in maths mode will appear Latin. If you would like to have Persian digits in maths mode, then please specify a font for the digits in maths mode by using \setdigitfont\space CS, and then try to run xelatex on your document again”}%
-\fi}
\if@developmentversion
\PackageWarningNoLine{xepersian}{Thanks for testing the development version of xepersian package. The development version may not work correctly or may not work at all. The development version is not recommended to be used for production purposes and should only be used for testing purposes. You are encouraged to use the stable version of xepersian package available on CTAN for production purposes}
\fi
@@ -53,12 +46,10 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\let\rmdefault\zf@family
\normalfont
}
-\newcommand*\settxtmathfont[2][]{%
-\newfontfamily\TXTmath[Mapping=txt2maths,#1]{#2}
-}
\newcommand*\setlatintextfont[2][]{%
\newfontfamily\latinfont[Mapping=tex-text,#1]{#2}
}
+\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic},SmallCapsFont={lmromancaps10-regular},SlantedFont={lmromanslant10-regular},BoldSlantedFont={lmromanslant10-bold}]{lmroman10-regular}
\let\setlatinsansfont\setsansfont
\let\setlatinmonofont\setmonofont
\newcommand*\defpersianfont[1]{%
@@ -143,12 +134,23 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\def\endlatin{\endLTR}
\def\persian{\RTL\PersianAlphs\@RTL@footnotetrue\setpersianfont}
\def\endpersian{\endRTL}
-\def\Latin{\if@RTL\par\LatinAlphs\@RTLfalse\@Latintrue\@RTL@footnotefalse\resetlatinfont\fi}
-\def\Persian{\if@RTL\relax\else\par\PersianAlphs\@RTLtrue\@Latinfalse\@RTL@footnotetrue\setpersianfont\fi}
\let\originaltoday=\today
\def\today{\lr{\originaltoday}}
\let\latintoday\today
\def\today{\rl{\persiantoday}}
+\DeclareRobustCommand\Latincite{%
+ \@ifnextchar [{\@tempswatrue\@Latincitex}{\@tempswafalse\@Latincitex[]}}
+\def\@Latincitex[#1]#2{\leavevmode
+ \let\@citea\@empty
+ \@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{\lr{,}\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\hbox{\reset@font\bfseries\lr{?}}%
+ \G@refundefinedtrue
+ \@latex@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\@cite@ofmt{\lr{\csname b@\@citeb\endcsname}}}}}{#1}}
\def\@outputpage{%
\begingroup % the \endgroup is put in by \aftergroup
\let \protect \noexpand
@@ -336,19 +338,17 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\@ifclassloaded{memoir}{\input{memoir-xepersian.def}}{}
\DeclareOption{Kashida}{\input{kashida-xepersian.def}}
\DeclareOption{localise}{\input{localise-xepersian.def}}
+\ExecuteOptions{localise}
\ProcessOptions
%%
-%% Copyright © 2008-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
%%
-%% Distributable under the LaTeX Project Public License,
+%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
-%% This work is "maintained" (as per LPPL maintenance status)
+%% This work is “author-maintained” (as per LPPL maintenance status)
%% by Vafa Khalighi.
%%
-%%
-%%
-%%
%%
%% End of file `xepersian.sty'.