summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/README4
-rw-r--r--Master/texmf-dist/doc/xelatex/xepersian/xepersian.pdfbin658911 -> 745679 bytes
-rw-r--r--Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx251
-rw-r--r--Master/texmf-dist/source/xelatex/xepersian/xepersian.ins1
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def18
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/color-localise.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/empheq-xepersian.def31
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def4
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def4
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/messages-localise.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/misc-localise-xepersian.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/packages-localise-xepersian.def2
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty104
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty45
15 files changed, 401 insertions, 71 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/README b/Master/texmf-dist/doc/xelatex/xepersian/README
index 24259880237..0f2d0facb0b 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/README
+++ b/Master/texmf-dist/doc/xelatex/xepersian/README
@@ -1,9 +1,9 @@
_________________
The XePersian package
-v1.1.0β1.2
+v1.1.0
XePersian is a package written for XeLaTeX that allows users to typeset
-Persian easily. The current version is 1.1.0β1.2 and it will be developed to
+Persian easily. The current version is 1.1.0 and it will be developed to
meet the needs of Persian typesetting properly.
The XePersian package is independent of any operating system, meaning it
diff --git a/Master/texmf-dist/doc/xelatex/xepersian/xepersian.pdf b/Master/texmf-dist/doc/xelatex/xepersian/xepersian.pdf
index ea9f0dadd77..aa130156c90 100644
--- a/Master/texmf-dist/doc/xelatex/xepersian/xepersian.pdf
+++ b/Master/texmf-dist/doc/xelatex/xepersian/xepersian.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
index cca38dbd01b..1e0b5558c48 100644
--- a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
+++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
@@ -5,10 +5,10 @@
%<*readme>
_________________
The XePersian package
-v1.1.0β1.2
+v1.1.0
XePersian is a package written for XeLaTeX that allows users to typeset
-Persian easily. The current version is 1.1.0β1.2 and it will be developed to
+Persian easily. The current version is 1.1.0 and it will be developed to
meet the needs of Persian typesetting properly.
The XePersian package is independent of any operating system, meaning it
@@ -91,6 +91,7 @@ by Vafa Khalighi.
\generate{\file{commands-ltx.def}{\from{\jobname.dtx}{commands-ltx.def}}}
\generate{\file{color-localise.def}{\from{\jobname.dtx}{color-localise.def}}}
\generate{\file{commands-xepersian.def}{\from{\jobname.dtx}{commands-xepersian.def}}}
+\generate{\file{empheq-xepersian.def}{\from{\jobname.dtx}{empheq-xepersian.def}}}
\generate{\file{enumerate-xepersian.def}{\from{\jobname.dtx}{enumerate-xepersian.def}}}
\generate{\file{environments-ltx.def}{\from{\jobname.dtx}{environments-ltx.def}}}
\generate{\file{environments-xepersian.def}{\from{\jobname.dtx}{environments-xepersian.def}}}
@@ -155,10 +156,11 @@ by Vafa Khalighi.
\usepackage{bidicode}
\usepackage[numbered]{hypdoc}
\definecolor{bidiblue}{rgb}{0.1,0.2,0.8}
+\definecolor{myred}{rgb}{0.65,0.04,0.07}
\hypersetup{linkcolor=bidiblue,urlcolor=bidiblue,citecolor=bidiblue}
\usepackage{bidi}
\setlength\columnseprule{.4pt}
-\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
+\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Junicode}
\newfontfamily\ParsiFont[Script=Arabic]{FreeFarsi}
\def\Pcs#1{\nxPLcs{#1}}
\def\nxPLcs#1{\RLE{\texttt{\symbol{92}\ParsiFont#1}}}
@@ -205,10 +207,10 @@ by Vafa Khalighi.
% \GetFileInfo{\jobname.sty}
% \CheckSum{0}
% \makeatletter
-% \changes{v1.1.0β1.2}{2011/01/01}{Update the documentation.}
+% \changes{v1.1.0}{2011/03/21}{Update the documentation.}
%\title{The \textsf{\XePersian} Package\\ \href{http://bitbucket.org/vafa/xepersian}{\texttt{http://bitbucket.org/vafa/xepersian}}}
%\author{Vafa Khalighi\\ \href{mailto:vafakhlgh@gmail.com}{\texttt{vafakhlgh@gmail.com}}}
-%\date{Version 1.1.0β1.2\qquad\today}
+%\date{Version 1.1.0\qquad\today}
%\maketitle
%\section{Dedication}
%\textit{We dedicate the \textsf{\XePersian} package to our \textbf{father}, \textbf{Cyrus The Great}.}
@@ -243,7 +245,7 @@ by Vafa Khalighi.
%Description: The package supports Persian
%typesetting, using fonts provided in the distribution.
%Copyright © 2008-2011 Vafa Khalighi
-%v1.1.0*\(\beta\)*1.2, <commit 80>, 2011/01/01
+%v1.1.0, <commit 100>, 2011/03/21
%License: LaTeX Project Public License, version 1.3c or higher (your choice)
%Home: http://bitbucket.org/vafa/xepersian
%Location on CTAN: /macros/xetex/latex/xepersian
@@ -310,13 +312,28 @@ by Vafa Khalighi.
%\end{document}
%\end{lstlisting}
%\subsection{{Options of The Package\label{options}}}
-%There are two options:
+%There are three options:
+%\subsection{\texttt{extrafootnotefeatures} Option}
+%This is just the \texttt{extrafootnotefeatures} Option of \textsf{bidi} package. Please refer to \textsf{bidi} package for details.
%\subsubsection{\texttt{Kashida} Option}
%If you pass \texttt{Kashida} option to the package, you will use Kashida for stretching words for better output quality and getting rid of underfull or overfull \Lcs{hbox} messages.
%\marginpar{This is the font issue not \XePersian's bug}Please note that X series fonts of IRMUG (Iranian Mac Users Group) have absolutely super poor quality and if you use any of these fonts with \texttt{Kashida} option enabled, the result on the PDF viewed on the monitor is the ugliest of any kind, however the print may look fine. Hence if you are going to enable \texttt{Kashida} option , then you are advised to use either ``Adobe Arabic'' or ``Scheherazade'' fonts.
-%
+%
%Note that you can not use \texttt{Kashida} option when you are using Nastaliq-like font (well, you still can use \texttt{Kashida} option when you use any Nastaliq-like font, but I can not guarantee high quality output!).
%
+%\bigskip
+%The following two commands are provided when you activate the \texttt{Kashida} option:
+%\begin{BDef}
+%\Lcs{KashidaOn}\quad\Lcs{KashidaOff}
+%\end{BDef}
+%\begin{itemize}
+%\item \Lcs{KashidaOn} enables Kashida and is active by default when \texttt{Kashida} option is activated.
+%\item \Lcs{KashidaOff} disables Kashida.
+%\end{itemize}
+%
+%\subsubsection{\texttt{quickindex} Option}
+%\marginpar{\textcolor{red}{New} $\color{red}\longrightarrow$}
+%When you generally want to prepare index for your Persian documents, you need to first run \texttt{xelatex}, then \texttt{xindy}, and again \texttt{xelatex} on your document respectively, which is very time consuming. The \texttt{quickindex} option gives you the index with only and only one run of \texttt{xelatex}. To use this feature, you will need to run \texttt{xelatex --shell-escape} on your \TeX{} document; otherwise you get an error which indicates that shell scape (or write18) is not enabled.
%\subsubsection{\texttt{localise} Option}
%\marginpar{\textcolor{red}{New} $\color{red}\longrightarrow$}
%The \texttt{localise} option is now active by default; it allows you to use most frequently-used \LaTeX\ commands and environments in Persian, almost like what \TeX-e-Parsi offers. This is still work in progress and we wish to add lots more Persian equivalents of \LaTeX\ and \TeX\ commands and environments. The Persian equivalents of \LaTeX\ and \TeX\ commands are shown in \autoref{lcs}, The Persian equivalents of \XePersian\ commands are shown in \autoref{xcs}, Persian equivalents of \LaTeX\ environments are shown in \autoref{lenv} and Persian equivalents of \XePersian\ environments are shown in \autoref{xenv}
@@ -1459,13 +1476,17 @@ by Vafa Khalighi.
%\begin{BDef}
%\Lcs{settextfont}\OptArgs\Largb{\Larga{font name}}\\
%\Lcs{setlatintextfont}\OptArgs\Largb{\Larga{font name}}\\
-%\Lcs{setdigitfont}\OptArgs\Largb{\Larga{font name}}
+%\Lcs{setdigitfont}\OptArgs\Largb{\Larga{font name}}\\
+%\Lcs{setmathsfdigitfont}\OptArgs\Largb{\Larga{font name}}\\
+%\Lcs{setmathttdigitfont}\OptArgs\Largb{\Larga{font name}}
%\end{BDef}
%\begin{itemize}
%\item Options in any font command in this documentation are anything that \textsf{fontspec} package provides as the option of loading fonts, except \texttt{Script} and \texttt{Mapping}.
%\item \Lcs{settextfont} will choose the default font for Persian texts of your document. This command is compulsory and if you do not use it at least once, you will get error saying that you should choose a Persian font by using this command.
%\item \Lcs{setlatintextfont} will choose the font for Latin texts of your document. If you do not use this command at all, the default \TeX\ font (fonts used in this documentation) will be used for Latin texts of your document.
%\item \Lcs{setdigitfont} will choose the Persian font for digits in math mode. By using this command, digits in math mode will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode and digits appear in their original form (Western).
+%\item \Lcs{setmathsfdigitfont} will choose the Persian font for digits in math mode inside \Lcs{mathsf}. By using this command, digits in math mode inside \Lcs{mathsf} will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode inside \Lcs{mathsf} and digits appear in their original form (Western).
+%\item \Lcs{setmathttdigitfont} will choose the Persian font for digits in math mode inside \Lcs{mathtt}. By using this command, digits in math mode inside \Lcs{mathtt} will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode inside \Lcs{mathtt} and digits appear in their original form (Western).
%\end{itemize}
%\subsubsection{Defining Extra Persian and Latin Fonts}
%\begin{BDef}
@@ -1538,7 +1559,7 @@ by Vafa Khalighi.
%\item \texttt{persian} environment both changes direction of the Paragraphs to RTL and font to Persian font.
%\end{itemize}
%
-%\marginpar{\textcolor{red!100}{\textbf{Warning:}} The commands \Lcs{Latin} and \Lcs{Persian} do not exist as of version 1.1.0β1.2}
+%\marginpar{\textcolor{red!100}{\textbf{Warning:}} The commands \Lcs{Latin} and \Lcs{Persian} do not exist as of version 1.1.0}
%\subsection{Short Latin and Persian Texts}
%\begin{BDef}
%\Lcs{lr}\Largb{\Larga{text}}\quad\Lcs{rl}\Largb{\Larga{text}}
@@ -1568,20 +1589,29 @@ by Vafa Khalighi.
%\subsection{Additional Counters}
%\XePersian\ defines several additional counters to what already \LaTeX\ offers. These counters are \texttt{harfi}, \texttt{adadi}, and \texttt{tartibi}.
%
-%\subsection{Things To Know About \Lcs{setdigitfont}}
+%\subsection{Things To Know About \Lcs{setdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}}
%\begin{BDef}
%\Lcs{DefaultMathsDigits}\quad\Lcs{PersianMathsDigits}\quad\Lcs{AutoMathsDigits}
%\end{BDef}
%\begin{itemize}
-%\item As we discussed before, \Lcs{setdigitfont} will choose the Persian font for digits in math mode. By using this command, digits in math mode will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode and digits appear in their original form (Western).
+%\item As we discussed before, \Lcs{setdigitfont} will choose the Persian font for digits in math mode. By using this command, digits in math mode will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode and digits appear in their original form (Western). The same is also true for \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}.
%
-%If you use \Lcs{setdigitfont}, you should the know that:
+%If you use \Lcs{setdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}, then you should know that:
%\begin{itemize}
%\item By default, \Lcs{AutoMathsDigits} is active, which means that in Persian mode, you get Persian digits in math mode and in Latin mode, you get \TeX's default font and digits in math mode.
%\item If you use \Lcs{PersianMathsDigits} anywhere, you will overwrite \XePersian's default behaviour and you will always get Persian digits in math mode.
%\item If you use \Lcs{DefaultMathsDigits} anywhere, again you will overwrite \XePersian's default behaviour and you will always get \TeX's default font and digits in math mode.
%\end{itemize}
%\end{itemize}
+%\section{New Conditionals}
+%\subsection{Shell escape (or write18) conditional}
+%\begin{BDef}
+%\Lcs{ifwritexviii}\\
+%\qquad\textcolor{myred}{\Larga{material when Shell escape (or write18) is enabled}}\\
+%\Lcs{else}\\
+%\qquad\textcolor{myred}{\Larga{material when Shell escape (or write18) is not enabled}}\\
+%\Lcs{fi}
+%\end{BDef}
%\section{Bilingual Captions}
%\XePersian\ sets caption bilingually. This means if you are in RTL mode, you get Persian caption and if you are in LTR mode, you get English caption.
%\subsection{Support For Various Packages}
@@ -2218,6 +2248,24 @@ by Vafa Khalighi.
% \begin{macrocode}
\ProvidesFile{backref-xepersian.def}[2010/07/25 v0.1 adaptations for backref package]
\def\backrefpagesname{\if@RTL صفحات\else pages\fi}
+\def\BR@Latincitex[#1]#2{%
+ \BRorg@Latincitex[{#1}]{#2}%
+ \ifBR@verbose
+ \PackageInfo{backref}{back Latin cite \string`#2\string'}%
+ \fi
+ \Hy@backout{#2}%
+}
+\AtBeginDocument{%
+ \@ifundefined{NAT@parse}{%
+ \global\let\BRorg@Latincitex\@Latincitex
+ \global\let\@Latincitex\BR@Latincitex
+ }{%
+ \@ifpackageloaded{hyperref}{}{%
+ \def\hyper@natlinkstart#1{\Hy@backout{#1}}%
+ }%
+ \PackageInfo{backref}{** backref set up for natbib **}%
+ }%
+}%
% \end{macrocode}
% \iffalse
%</backref-xepersian.def>
@@ -3310,7 +3358,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{color-localise.def}}
% \begin{macrocode}
-\آماده‌سازی‌پرونده{color-localise.def}[2011/01/01 v0.1 localising color package]
+\آماده‌سازی‌پرونده{color-localise.def}[2011/03/01 v0.1 localising color package]
\تعریف‌رنگ{سیاه}{rgb}{0,0,0}
\تعریف‌رنگ{سفید}{rgb}{1,1,1}
\تعریف‌رنگ{قرمز}{rgb}{1,0,0}
@@ -3346,7 +3394,7 @@ by Vafa Khalighi.
\eqcommand{پانویس‌عنوان}{LTRthanks}
\eqcommand{قلم‌پارسی}{persianfont}
\eqcommand{اعدادفرمولهاپارسی}{PersianMathsDigits}
-\eqcommand{علامت‌چپ‌نقل‌قول‌پارسی‌}{plq}
+\eqcommand{علامت‌چپ‌نقل‌قول‌پارسی}{plq}
\eqcommand{علامت‌راست‌نقل‌قول‌پارسی}{prq}
\eqcommand{خط‌زیرنویس‌راست}{rightfootnoterule}
\eqcommand{متن‌پارسی}{rl}
@@ -3386,6 +3434,16 @@ by Vafa Khalighi.
% \end{macrocode}
% \iffalse
%</commands-xepersian.def>
+%<*empheq-xepersian.def>
+%\fi
+% \subsection{\textsf{empheq-xepersian.def}}
+% \begin{macrocode}
+\ProvidesFile{empheq-xepersian.def}[2011/03/01 v0.1 adaptations for empheq package]
+\def\tagform@#1{\maketag@@@{\if@Latin\else\beginR\fi(\ignorespaces#1\unskip\@@italiccorr)\if@Latin\else\endR\fi}}
+\def\text#1{\@@text{\if@Latin\else\beginR\fi#1\if@Latin\else\endR\fi}}
+% \end{macrocode}
+% \iffalse
+%</empheq-xepersian.def>
%<*enumerate-xepersian.def>
%\fi
% \subsection{\textsf{enumerate-xepersian.def}}
@@ -3471,9 +3529,13 @@ by Vafa Khalighi.
\eqenvironment{لاتین}{latin}
\eqenvironment{متن‌چپ}{LTR}
\eqenvironment{دسته‌بندی‌چپ}{LTRitems}
+\eqenvironment{شعرنو}{modernpoem}
+\eqenvironment{شعرنو*}{modernpoem*}
\eqenvironment{پارسی}{persian}
\eqenvironment{متن‌راست}{RTL}
\eqenvironment{دسته‌بندی‌راست}{RTLitems}
+\eqenvironment{شعرسنتی}{traditionalpoem}
+\eqenvironment{شعرسنتی*}{traditionalpoem*}
% \end{macrocode}
% \iffalse
%</environments-xepersian.def>
@@ -3730,7 +3792,9 @@ by Vafa Khalighi.
\XeTeXinterchartoks \L \R = {\kashida}
\XeTeXinterchartoks \L \A = {}
-\XeTeXinterchartokenstate=1
+\newcommand{\KashidaOn}{\XeTeXinterchartokenstate=1}
+\newcommand{\KashidaOff}{\XeTeXinterchartokenstate=0}
+\KashidaOn
% \end{macrocode}
% \iffalse
%</kashida-xepersian.def>
@@ -3818,7 +3882,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{messages-localise.def}}
% \begin{macrocode}
-\آماده‌سازی‌پرونده{messages-localise.def}[2011/01/01 v0.1 localising LaTeX2e messages]
+\آماده‌سازی‌پرونده{messages-localise.def}[2011/03/01 v0.1 localising LaTeX2e messages]
% \end{macrocode}
% \iffalse
%</messages-localise.def>
@@ -3843,7 +3907,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{misc-localise-xepersian.def}}
% \begin{macrocode}
-\ProvidesFile{misc-localise-xepersian.def}[2011/01/01 v0.1 miscellaneous Persian localisation of LaTeX2e]
+\ProvidesFile{misc-localise-xepersian.def}[2011/03/01 v0.1 miscellaneous Persian localisation of LaTeX2e]
\تر\گرجدید#1{%
\شمار@\نویسه‌ویژه \نویسه‌ویژه\من@ا
\بگذار#1\گرنادرست
@@ -3954,7 +4018,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{packages-localise-xepersian.def}}
% \begin{macrocode}
-\آماده‌سازی‌پرونده{packages-localise-xepersian.def}[2011/01/01 v0.1 localising LaTeX2e Packages]
+\آماده‌سازی‌پرونده{packages-localise-xepersian.def}[2011/03/01 v0.1 localising LaTeX2e Packages]
\@گرسبک‌فراخوانی‌شده{color}{\ورودی{color-localise.def}}{}
% \end{macrocode}
% \iffalse
@@ -4207,9 +4271,9 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
% \subsection{\textsf{xepersian.sty}}
% \begin{macrocode}
\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}
@@ -4234,6 +4298,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][]{%
@@ -4414,7 +4503,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}
@@ -4505,6 +4594,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}}{}
@@ -4533,6 +4623,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
% \end{macrocode}
@@ -5420,7 +5521,7 @@ indexblock environment may only appear inside frontpage environment.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xepersian-mathsdigitspec}
- [2011/01/01 v0.6b Unicode Persian maths digits in XeLaTeX]
+ [2011/03/01 v0.9 Unicode Persian maths digits in XeLaTeX]
%\@zf@mathfalse
\ExplSyntaxOn
\bool_set_false:N \g_fontspec_math_bool
@@ -5444,27 +5545,90 @@ indexblock environment may only appear inside frontpage environment.
\XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
\newcommand\SetMathCharDef[4]{%
\XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\ExplSyntaxOn
+\cs_new_eq:NN \orig_mathbf:n \mathbf
+\cs_new_eq:NN \orig_mathit:n \mathit
+\cs_new_eq:NN \orig_mathrm:n \mathrm
+\cs_new_eq:NN \orig_mathsf:n \mathsf
+\cs_new_eq:NN \orig_mathtt:n \mathtt
+\NewDocumentCommand \new@mathbf { m } {
+ \orig_mathbf:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathbf@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathit { m } {
+ \orig_mathit:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathit@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathrm { m } {
+ \orig_mathrm:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathrm@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathsf{ m } {
+ \orig_mathsf:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathsf@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathtt{ m } {
+ \orig_mathtt:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathtt@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\ExplSyntaxOff
\newcommand\setdigitfont[2][]{%
\let\glb@currsize\relax
\setkeys*[xepersian-mathsdigitspec]{options}{#1}%
- \edef\@tempa{\noexpand\zf@fontspec{%
+ \edef\@tempa{\noexpand\zf@fontspec{Mapping=parsidigits,%
\XKV@rm}{#2}}\@tempa
\xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
\DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n}
+ \DeclareSymbolFont{new@mathbf@font@digits}{EU1}{\zf@family}{bx}{n}
+ \DeclareSymbolFont{new@mathit@font@digits}{EU1}{\zf@family}{m}{it}
+ \DeclareSymbolFont{new@mathrm@font@digits}{EU1}{\zf@family}{m}{n}
\def\persianmathsdigits{%
- \SetMathCode{`0}{\mathord}{OPERATORS}{"06F0}
- \SetMathCode{`1}{\mathord}{OPERATORS}{"06F1}
- \SetMathCode{`2}{\mathord}{OPERATORS}{"06F2}
- \SetMathCode{`3}{\mathord}{OPERATORS}{"06F3}
- \SetMathCode{`4}{\mathord}{OPERATORS}{"06F4}
- \SetMathCode{`5}{\mathord}{OPERATORS}{"06F5}
- \SetMathCode{`6}{\mathord}{OPERATORS}{"06F6}
- \SetMathCode{`7}{\mathord}{OPERATORS}{"06F7}
- \SetMathCode{`8}{\mathord}{OPERATORS}{"06F8}
- \SetMathCode{`9}{\mathord}{OPERATORS}{"06F9}
+ \SetMathCode{`0}{\mathalpha}{OPERATORS}{`0}
+ \SetMathCode{`1}{\mathalpha}{OPERATORS}{`1}
+ \SetMathCode{`2}{\mathalpha}{OPERATORS}{`2}
+ \SetMathCode{`3}{\mathalpha}{OPERATORS}{`3}
+ \SetMathCode{`4}{\mathalpha}{OPERATORS}{`4}
+ \SetMathCode{`5}{\mathalpha}{OPERATORS}{`5}
+ \SetMathCode{`6}{\mathalpha}{OPERATORS}{`6}
+ \SetMathCode{`7}{\mathalpha}{OPERATORS}{`7}
+ \SetMathCode{`8}{\mathalpha}{OPERATORS}{`8}
+ \SetMathCode{`9}{\mathalpha}{OPERATORS}{`9}
\SetMathCode{`\%}{\mathbin}{OPERATORS}{`٪}
- \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}}
+ \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}
+ \let\mathbf\new@mathbf
+ \let\mathit\new@mathit
+ \let\mathrm\new@mathrm}
}
+\newcommand*\setmathsfdigitfont[2][]{%
+\zf@fontspec{Mapping=parsidigits,#1}{#2}%
+\let\zf@sfmaths\zf@family
+\DeclareSymbolFont{new@mathsf@font@digits}{EU1}{\zf@family}{m}{n}
+\def\persianmathsfdigits{\let\mathsf\new@mathsf}}
+\newcommand*\setmathttdigitfont[2][]{%
+\zf@fontspec{Mapping=parsidigits,#1}{#2}%
+\let\zf@ttmaths\zf@family
+\DeclareSymbolFont{new@mathtt@font@digits}{EU1}{\zf@family}{m}{n}
+\def\persianmathttdigits{\let\mathtt\new@mathtt}}
\ifx\newcommand\undefined\else
\newcommand{\ZifferAn}{}
\fi
@@ -5497,12 +5661,17 @@ indexblock environment may only appear inside frontpage environment.
\mathcode`.="8000\relax
\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi}
\def\DefaultMathsDigits{\def\SetMathsDigits{}}
-\def\PersianMathsDigits{\def\SetMathsDigits{\ifx\persianmathsdigits\undefied\else\persianmathsdigits\fi}}
-\def\AutoMathsDigits{\def\SetMathsDigits{\ifx\persianmathsdigits\undefied\else\if@Latin\else\persianmathsdigits\fi\fi}}
+\def\PersianMathsDigits{\def\SetMathsDigits{%
+\ifx\persianmathsdigits\undefied\else\persianmathsdigits\fi%
+\ifx\persianmathsfdigits\undefied\else\persianmathsfdigits\fi%
+\ifx\persianmathttdigits\undefied\else\persianmathttdigits\fi}}
+\def\AutoMathsDigits{\def\SetMathsDigits{%
+\ifx\persianmathsdigits\undefied\else\if@Latin\else\persianmathsdigits\fi\fi%
+\ifx\persianmathsfdigits\undefied\else\if@Latin\else\persianmathsfdigits\fi\fi%
+\ifx\persianmathttdigits\undefied\else\if@Latin\else\persianmathttdigits\fi\fi}}
\AutoMathsDigits
-\everymath{\SetMathsDigits}
-\g@addto@macro\document{\everydisplay{\predisplaydirection=0 \SetMathsDigits}
-\@ifpackageloaded{amsmath}{\everydisplay\@xp{\the\everydisplay \@displaytrue}}{}}
+\everymath\expandafter{\the\everymath\SetMathsDigits}
+\g@addto@macro\document{\everydisplay\expandafter{\the\everydisplay\SetMathsDigits}}
% \end{macrocode}
% \iffalse
%</xepersian-mathsdigitspec.sty>
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins b/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins
index 50fd6a5849b..6fa81d26008 100644
--- a/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins
+++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins
@@ -56,6 +56,7 @@ by Vafa Khalighi.
\generate{\file{commands-ltx.def}{\from{\jobname.dtx}{commands-ltx.def}}}
\generate{\file{color-localise.def}{\from{\jobname.dtx}{color-localise.def}}}
\generate{\file{commands-xepersian.def}{\from{\jobname.dtx}{commands-xepersian.def}}}
+\generate{\file{empheq-xepersian.def}{\from{\jobname.dtx}{empheq-xepersian.def}}}
\generate{\file{enumerate-xepersian.def}{\from{\jobname.dtx}{enumerate-xepersian.def}}}
\generate{\file{environments-ltx.def}{\from{\jobname.dtx}{environments-ltx.def}}}
\generate{\file{environments-xepersian.def}{\from{\jobname.dtx}{environments-xepersian.def}}}
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def
index 2e076448904..2f3c6b940da 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/backref-xepersian.def
@@ -14,6 +14,24 @@
%%
\ProvidesFile{backref-xepersian.def}[2010/07/25 v0.1 adaptations for backref package]
\def\backrefpagesname{\if@RTL صفحات\else pages\fi}
+\def\BR@Latincitex[#1]#2{%
+ \BRorg@Latincitex[{#1}]{#2}%
+ \ifBR@verbose
+ \PackageInfo{backref}{back Latin cite \string`#2\string'}%
+ \fi
+ \Hy@backout{#2}%
+}
+\AtBeginDocument{%
+ \@ifundefined{NAT@parse}{%
+ \global\let\BRorg@Latincitex\@Latincitex
+ \global\let\@Latincitex\BR@Latincitex
+ }{%
+ \@ifpackageloaded{hyperref}{}{%
+ \def\hyper@natlinkstart#1{\Hy@backout{#1}}%
+ }%
+ \PackageInfo{backref}{** backref set up for natbib **}%
+ }%
+}%
%%
%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/color-localise.def b/Master/texmf-dist/tex/xelatex/xepersian/color-localise.def
index 6134556b78b..45293b1eaf9 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/color-localise.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/color-localise.def
@@ -12,7 +12,7 @@
%% License information appended.
%%
%%
-\آماده‌سازی‌پرونده{color-localise.def}[2011/01/01 v0.1 localising color package]
+\آماده‌سازی‌پرونده{color-localise.def}[2011/03/01 v0.1 localising color package]
\تعریف‌رنگ{سیاه}{rgb}{0,0,0}
\تعریف‌رنگ{سفید}{rgb}{1,1,1}
\تعریف‌رنگ{قرمز}{rgb}{1,0,0}
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def
index aaff60c8920..426b73bdb1f 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/commands-xepersian.def
@@ -32,7 +32,7 @@
\eqcommand{پانویس‌عنوان}{LTRthanks}
\eqcommand{قلم‌پارسی}{persianfont}
\eqcommand{اعدادفرمولهاپارسی}{PersianMathsDigits}
-\eqcommand{علامت‌چپ‌نقل‌قول‌پارسی‌}{plq}
+\eqcommand{علامت‌چپ‌نقل‌قول‌پارسی}{plq}
\eqcommand{علامت‌راست‌نقل‌قول‌پارسی}{prq}
\eqcommand{خط‌زیرنویس‌راست}{rightfootnoterule}
\eqcommand{متن‌پارسی}{rl}
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/empheq-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/empheq-xepersian.def
new file mode 100644
index 00000000000..759b7631be9
--- /dev/null
+++ b/Master/texmf-dist/tex/xelatex/xepersian/empheq-xepersian.def
@@ -0,0 +1,31 @@
+%%
+%% This is file `empheq-xepersian.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xepersian.dtx (with options: `empheq-xepersian.def')
+%%
+%% ______________________________________
+%% Copyright © 2008–2011 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\ProvidesFile{empheq-xepersian.def}[2011/03/01 v0.1 adaptations for empheq package]
+\def\tagform@#1{\maketag@@@{\if@Latin\else\beginR\fi(\ignorespaces#1\unskip\@@italiccorr)\if@Latin\else\endR\fi}}
+\def\text#1{\@@text{\if@Latin\else\beginR\fi#1\if@Latin\else\endR\fi}}
+%%
+%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
+%%
+%% 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 “author-maintained” (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%% End of file `empheq-xepersian.def'.
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def
index 7127a2bd166..d39a5406908 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/environments-xepersian.def
@@ -16,9 +16,13 @@
\eqenvironment{لاتین}{latin}
\eqenvironment{متن‌چپ}{LTR}
\eqenvironment{دسته‌بندی‌چپ}{LTRitems}
+\eqenvironment{شعرنو}{modernpoem}
+\eqenvironment{شعرنو*}{modernpoem*}
\eqenvironment{پارسی}{persian}
\eqenvironment{متن‌راست}{RTL}
\eqenvironment{دسته‌بندی‌راست}{RTLitems}
+\eqenvironment{شعرسنتی}{traditionalpoem}
+\eqenvironment{شعرسنتی*}{traditionalpoem*}
%%
%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
index 75476b1a491..c419fa26e19 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
@@ -53,7 +53,9 @@
\XeTeXinterchartoks \L \R = {\kashida}
\XeTeXinterchartoks \L \A = {}
-\XeTeXinterchartokenstate=1
+\newcommand{\KashidaOn}{\XeTeXinterchartokenstate=1}
+\newcommand{\KashidaOff}{\XeTeXinterchartokenstate=0}
+\KashidaOn
%%
%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/messages-localise.def b/Master/texmf-dist/tex/xelatex/xepersian/messages-localise.def
index 14e62ae0d3d..4677c792928 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/messages-localise.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/messages-localise.def
@@ -12,7 +12,7 @@
%% License information appended.
%%
%%
-\آماده‌سازی‌پرونده{messages-localise.def}[2011/01/01 v0.1 localising LaTeX2e messages]
+\آماده‌سازی‌پرونده{messages-localise.def}[2011/03/01 v0.1 localising LaTeX2e messages]
%%
%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
%%
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/misc-localise-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/misc-localise-xepersian.def
index af3aad507a4..8a3cb25e416 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/misc-localise-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/misc-localise-xepersian.def
@@ -12,7 +12,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{misc-localise-xepersian.def}[2011/01/01 v0.1 miscellaneous Persian localisation of LaTeX2e]
+\ProvidesFile{misc-localise-xepersian.def}[2011/03/01 v0.1 miscellaneous Persian localisation of LaTeX2e]
\تر\گرجدید#1{%
\شمار@\نویسه‌ویژه \نویسه‌ویژه\من@ا
\بگذار#1\گرنادرست
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/packages-localise-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/packages-localise-xepersian.def
index 1574e0c2bec..cc5d95c7844 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/packages-localise-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/packages-localise-xepersian.def
@@ -12,7 +12,7 @@
%% License information appended.
%%
%%
-\آماده‌سازی‌پرونده{packages-localise-xepersian.def}[2011/01/01 v0.1 localising LaTeX2e Packages]
+\آماده‌سازی‌پرونده{packages-localise-xepersian.def}[2011/03/01 v0.1 localising LaTeX2e Packages]
\@گرسبک‌فراخوانی‌شده{color}{\ورودی{color-localise.def}}{}
%%
%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty
index eb6978c849a..9206e637651 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xepersian-mathsdigitspec}
- [2011/01/01 v0.6b Unicode Persian maths digits in XeLaTeX]
+ [2011/03/01 v0.9 Unicode Persian maths digits in XeLaTeX]
\ExplSyntaxOn
\bool_set_false:N \g_fontspec_math_bool
\ExplSyntaxOff
@@ -37,27 +37,90 @@
\XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
\newcommand\SetMathCharDef[4]{%
\XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax}
+\ExplSyntaxOn
+\cs_new_eq:NN \orig_mathbf:n \mathbf
+\cs_new_eq:NN \orig_mathit:n \mathit
+\cs_new_eq:NN \orig_mathrm:n \mathrm
+\cs_new_eq:NN \orig_mathsf:n \mathsf
+\cs_new_eq:NN \orig_mathtt:n \mathtt
+\NewDocumentCommand \new@mathbf { m } {
+ \orig_mathbf:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathbf@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathit { m } {
+ \orig_mathit:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathit@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathrm { m } {
+ \orig_mathrm:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathrm@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathsf{ m } {
+ \orig_mathsf:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathsf@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\NewDocumentCommand \new@mathtt{ m } {
+ \orig_mathtt:n {
+ \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
+ \mathcode ##1 = \numexpr "100 * \symnew@mathtt@font@digits + ##1 \relax
+ }
+ #1
+ }
+}
+\ExplSyntaxOff
\newcommand\setdigitfont[2][]{%
\let\glb@currsize\relax
\setkeys*[xepersian-mathsdigitspec]{options}{#1}%
- \edef\@tempa{\noexpand\zf@fontspec{%
+ \edef\@tempa{\noexpand\zf@fontspec{Mapping=parsidigits,%
\XKV@rm}{#2}}\@tempa
\xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
\DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n}
+ \DeclareSymbolFont{new@mathbf@font@digits}{EU1}{\zf@family}{bx}{n}
+ \DeclareSymbolFont{new@mathit@font@digits}{EU1}{\zf@family}{m}{it}
+ \DeclareSymbolFont{new@mathrm@font@digits}{EU1}{\zf@family}{m}{n}
\def\persianmathsdigits{%
- \SetMathCode{`0}{\mathord}{OPERATORS}{"06F0}
- \SetMathCode{`1}{\mathord}{OPERATORS}{"06F1}
- \SetMathCode{`2}{\mathord}{OPERATORS}{"06F2}
- \SetMathCode{`3}{\mathord}{OPERATORS}{"06F3}
- \SetMathCode{`4}{\mathord}{OPERATORS}{"06F4}
- \SetMathCode{`5}{\mathord}{OPERATORS}{"06F5}
- \SetMathCode{`6}{\mathord}{OPERATORS}{"06F6}
- \SetMathCode{`7}{\mathord}{OPERATORS}{"06F7}
- \SetMathCode{`8}{\mathord}{OPERATORS}{"06F8}
- \SetMathCode{`9}{\mathord}{OPERATORS}{"06F9}
+ \SetMathCode{`0}{\mathalpha}{OPERATORS}{`0}
+ \SetMathCode{`1}{\mathalpha}{OPERATORS}{`1}
+ \SetMathCode{`2}{\mathalpha}{OPERATORS}{`2}
+ \SetMathCode{`3}{\mathalpha}{OPERATORS}{`3}
+ \SetMathCode{`4}{\mathalpha}{OPERATORS}{`4}
+ \SetMathCode{`5}{\mathalpha}{OPERATORS}{`5}
+ \SetMathCode{`6}{\mathalpha}{OPERATORS}{`6}
+ \SetMathCode{`7}{\mathalpha}{OPERATORS}{`7}
+ \SetMathCode{`8}{\mathalpha}{OPERATORS}{`8}
+ \SetMathCode{`9}{\mathalpha}{OPERATORS}{`9}
\SetMathCode{`\%}{\mathbin}{OPERATORS}{`٪}
- \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}}
+ \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B}
+ \let\mathbf\new@mathbf
+ \let\mathit\new@mathit
+ \let\mathrm\new@mathrm}
}
+\newcommand*\setmathsfdigitfont[2][]{%
+\zf@fontspec{Mapping=parsidigits,#1}{#2}%
+\let\zf@sfmaths\zf@family
+\DeclareSymbolFont{new@mathsf@font@digits}{EU1}{\zf@family}{m}{n}
+\def\persianmathsfdigits{\let\mathsf\new@mathsf}}
+\newcommand*\setmathttdigitfont[2][]{%
+\zf@fontspec{Mapping=parsidigits,#1}{#2}%
+\let\zf@ttmaths\zf@family
+\DeclareSymbolFont{new@mathtt@font@digits}{EU1}{\zf@family}{m}{n}
+\def\persianmathttdigits{\let\mathtt\new@mathtt}}
\ifx\newcommand\undefined\else
\newcommand{\ZifferAn}{}
\fi
@@ -90,12 +153,17 @@
\mathcode`.="8000\relax
\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi}
\def\DefaultMathsDigits{\def\SetMathsDigits{}}
-\def\PersianMathsDigits{\def\SetMathsDigits{\ifx\persianmathsdigits\undefied\else\persianmathsdigits\fi}}
-\def\AutoMathsDigits{\def\SetMathsDigits{\ifx\persianmathsdigits\undefied\else\if@Latin\else\persianmathsdigits\fi\fi}}
+\def\PersianMathsDigits{\def\SetMathsDigits{%
+\ifx\persianmathsdigits\undefied\else\persianmathsdigits\fi%
+\ifx\persianmathsfdigits\undefied\else\persianmathsfdigits\fi%
+\ifx\persianmathttdigits\undefied\else\persianmathttdigits\fi}}
+\def\AutoMathsDigits{\def\SetMathsDigits{%
+\ifx\persianmathsdigits\undefied\else\if@Latin\else\persianmathsdigits\fi\fi%
+\ifx\persianmathsfdigits\undefied\else\if@Latin\else\persianmathsfdigits\fi\fi%
+\ifx\persianmathttdigits\undefied\else\if@Latin\else\persianmathttdigits\fi\fi}}
\AutoMathsDigits
-\everymath{\SetMathsDigits}
-\g@addto@macro\document{\everydisplay{\predisplaydirection=0 \SetMathsDigits}
-\@ifpackageloaded{amsmath}{\everydisplay\@xp{\the\everydisplay \@displaytrue}}{}}
+\everymath\expandafter{\the\everymath\SetMathsDigits}
+\g@addto@macro\document{\everydisplay\expandafter{\the\everydisplay\SetMathsDigits}}
%%
%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
%%
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
%%