summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-13 23:35:32 +0000
committerKarl Berry <karl@freefriends.org>2011-02-13 23:35:32 +0000
commitf8caf0445c4cba501dbb7bb4089b56493e2080a5 (patch)
treeaa46cb6998d2a1272b49daea3b907a45f5d29215 /Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
parent559fa5fe1412df424f60e00b33d20ef1ca773b22 (diff)
xepersian (12feb11)
git-svn-id: svn://tug.org/texlive/trunk@21397 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty45
1 files changed, 41 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
index cba3ed3d526..b7a05ee4947 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
@@ -13,9 +13,9 @@
%%
%%
\NeedsTeXFormat{LaTeX2e}
-\def\xepersianversion{v1.1.0β1.2}
-\def\xepersiancommit{commit 80}
-\def\xepersiandate{2011/01/01}
+\def\xepersianversion{v1.1.0}
+\def\xepersiancommit{commit 100}
+\def\xepersiandate{2011/03/21}
\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space <\xepersiancommit>
Persian typesetting in XeLaTeX]
\RequirePackage{fontspec}
@@ -40,6 +40,31 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\fi
\def\prq{«}
\def\plq{»}
+\def\xepersian@cmds@temp#1{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname xepersian@#1\endcsname\relax
+ \begingroup
+ \escapechar=-1 %
+ \edef\x{\expandafter\meaning\csname#1\endcsname}%
+ \def\y{#1}%
+ \def\z##1->{}%
+ \edef\y{\expandafter\z\meaning\y}%
+ \expandafter\endgroup
+ \ifx\x\y
+ \expandafter\def\csname xepersian@#1\expandafter\endcsname
+ \expandafter{%
+ \csname#1\endcsname
+ }%
+ \fi
+ \fi
+}%
+\xepersian@cmds@temp{shellescape}
+\newif\ifwritexviii
+\ifnum\xepersian@shellescape=1\relax
+ \writexviiitrue
+\else
+\writexviiifalse
+\fi
\newfontscript{Parsi}{arab}
\newfontlanguage{Parsi}{FAR}
\newcommand*\settextfont[2][]{%
@@ -220,7 +245,7 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\small
\@starttoc{toc}%
\end{multicols}}
-{\PackageError{xepersian}{Oops! you should load multicol package before xepersian package for being able to use this command.}}}
+{\PackageError{xepersian}{Oops! you should load multicol package before xepersian package for being able to use this command}{}}}
\def\XePersian{\leavevmode$\smash{\hbox{X\lower.5ex
\hbox{\kern-.125em\reflect{E}}Persian}}$}
\def\figurename{\if@RTL شکل\else Figure\fi}
@@ -311,6 +336,7 @@ Location on CTAN: /macros/xetex/latex/xepersian}
\@ifpackageloaded{bidicode}{\input{bidicode-xepersian.def}}{}
\@ifpackageloaded{breqn}{\input{breqn-xepersian.def}}{}
\@ifpackageloaded{enumerate}{\input{enumerate-xepersian.def}}{}
+\@ifpackageloaded{empheq}{\input{empheq-xepersian.def}}{}
\@ifpackageloaded{hyperref}{\input{hyperref-xepersian.def}}{}
\@ifpackageloaded{minitoc}{\input{minitoc-xepersian.def}}{}
\@ifpackageloaded{multicol}{\input{multicol-xepersian.def}}{}
@@ -339,6 +365,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}}
+\DeclareOption{extrafootnotefeatures}{\input{extrafootnotefeatures.def}}
+\DeclareOption{quickindex}{%
+\ifwritexviii%
+\@ifclassloaded{memoir}{\PackageError{xepersian}{This feature does not yet work with the memoir class}{}}{%
+\renewcommand\printindex{\newpage%
+\immediate\closeout\@indexfile
+\immediate\write18{xindy -L persian -C utf8 -M texindy \jobname.idx}
+\@input@{\jobname.ind}}}%
+\else
+\PackageError{xepersian}{“shell escape” (or “write18”) is not enabled. You need to run “xelatex --shell-escape” on your TeX document for this feature to work}{}
+\fi}
\ExecuteOptions{localise}
\ProcessOptions
%%