summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/xepersian
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-02-05 23:19:42 +0000
committerKarl Berry <karl@freefriends.org>2017-02-05 23:19:42 +0000
commit2ae75220f2bfba98160dfca1c818ec2af90abb1f (patch)
tree3b57655b85a4964cffa1e70d65de2edcf805119c /Master/texmf-dist/source/xelatex/xepersian
parent8e694411f8e4a4860f1120975ac14b0bc6d632de (diff)
xepersian (5feb17)
git-svn-id: svn://tug.org/texlive/trunk@43148 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xepersian')
-rw-r--r--Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx484
1 files changed, 45 insertions, 439 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
index 5f4c77d24c4..37e508e1156 100644
--- a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
+++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
@@ -5,7 +5,7 @@
%<*readme>
____________________
The XePersian package
-v17.3
+v17.5
XePersian is a package written for XeLaTeX that allows users to typeset
Persian easily.
@@ -28,7 +28,7 @@ a minimal working example showing the issue, and always choose the appropriate
label for your query (i.e. if you are reporting any bugs, choose `Bug' label).
-Current version release date: 2017/02/04
+Current version release date: 2017/02/05
______________
Vafa Khalighi
persian-tex@tug.org
@@ -272,7 +272,7 @@ by Vafa Khalighi.
%\changes{v13.1}{2013/09/23}{Added implementation of the package.}
% \title{\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}}\\
%\LARGE Persian for \LaTeXe, using {\XeTeX} engine\\[5pt]
-%\large Documentation for \textcolor{blue!65!black}{version 17.3}}
+%\large Documentation for \textcolor{blue!65!black}{version 17.5}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -283,7 +283,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}}
%
%\Large
-%Documentation for \textcolor{blue!65!black}{version 17.3}}
+%Documentation for \textcolor{blue!65!black}{version 17.5}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -338,7 +338,7 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2008--2017 Vafa Khalighi
%*
-%* v17.3, 2017/02/04
+%* v17.5, 2017/02/05
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -2359,7 +2359,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{10291}
+%% \CheckSum{9307}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -2406,68 +2406,12 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{amsart-xepersian.def}}
% \begin{macrocode}
-\ProvidesFile{amsart-xepersian.def}[2013/04/26 v0.3 adaptations for amsart class]
+\ProvidesFile{amsart-xepersian.def}[2017/02/04 v0.4 adaptations for amsart class]
\renewcommand \thepart {\@tartibi\c@part}
\def\appendix{\par\c@section\z@ \c@subsection\z@
\let\sectionname\appendixname
\def\thesection{\@harfi\c@section}}
-\long\def\@footnotetext#1{%
- \insert\footins{%
- \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\unskip\strut\par}}}
-
-
-
-
-
-\long\def\@RTLfootnotetext#1{%
- \insert\footins{%
- \@RTLtrue%
- \@nonlatintrue%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\persianfont #1\unskip\strut\par}}}
-
-
-
-
-
-
-
-\long\def\@LTRfootnotetext#1{%
- \insert\footins{%
- \@RTLfalse%
- \@nonlatinfalse%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\latinfont #1\unskip\strut\par}}}
-
-
-\footdir@temp\footdir@ORG@xepersian@amsart@footnotetext\@footnotetext{\bidi@footdir@footnote}%
-\footdir@temp\footdir@ORG@xepersian@amsart@RTLfootnotetext\@RTLfootnotetext{R}%
-\footdir@temp\footdir@ORG@xepersian@amsart@LTRfootnotetext\@LTRfootnotetext{L}%
-
% \end{macrocode}
% \iffalse
%</amsart-xepersian.def>
@@ -2475,7 +2419,7 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{amsbook-xepersian.def}}
% \begin{macrocode}
-\ProvidesFile{amsbook-xepersian.def}[2013/04/26 v0.4 adaptations for amsbook class]
+\ProvidesFile{amsbook-xepersian.def}[2017/02/04 v0.5 adaptations for amsbook class]
\def\frontmatter{\cleardoublepage\pagenumbering{harfi}}
\renewcommand \thepart {\@tartibi\c@part}
\def\appendix{\par
@@ -2483,60 +2427,6 @@ by Vafa Khalighi.
\let\chaptername\appendixname
\def\thechapter{\@harfi\c@chapter}}
-\long\def\@footnotetext#1{%
- \insert\footins{%
- \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\unskip\strut\par}}}
-
-
-
-
-
-\long\def\@RTLfootnotetext#1{%
- \insert\footins{%
- \@RTLtrue%
- \@nonlatintrue%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\persianfont #1\unskip\strut\par}}}
-
-
-
-
-
-
-
-\long\def\@LTRfootnotetext#1{%
- \insert\footins{%
- \@RTLfalse%
- \@nonlatinfalse%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\latinfont #1\unskip\strut\par}}}
-
-\footdir@temp\footdir@ORG@xepersian@amsbook@footnotetext\@footnotetext{\bidi@footdir@footnote}%
-\footdir@temp\footdir@ORG@xepersian@amsbook@RTLfootnotetext\@RTLfootnotetext{R}%
-\footdir@temp\footdir@ORG@xepersian@amsbook@LTRfootnotetext\@LTRfootnotetext{L}%
% \end{macrocode}
% \iffalse
@@ -2646,76 +2536,15 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{bidituftesidenote-xepersian.def}}
% \begin{macrocode}
-\ProvidesFile{bidituftesidenote-xepersian.def}[2014/12/28 v0.2 xepersian changes to bidituftesidenote package]
-\setLTRcitationfont{\@bidituftesidenote@marginfont\@nonlatinfalse\latinfont}
-\long\def\@LTRbidituftesidenote@sidenote[#1][#2]#3{%
- \let\cite\@bidituftesidenote@infootnote@cite% use the in-sidenote \cite command
- \gdef\@bidituftesidenote@citations{}% clear out any old citations
- \ifthenelse{\NOT\isempty{#2}}{%
- \gsetlength{\@bidituftesidenote@sidenote@vertical@offset}{#2}%
- }{%
- \gsetlength{\@bidituftesidenote@sidenote@vertical@offset}{0pt}%
- }%
- \ifthenelse{\isempty{#1}}{%
- % no specific footnote number provided
- \stepcounter\@mpfn%
- \protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark\@LTRfootnotetext[\@bidituftesidenote@sidenote@vertical@offset]{\@nonlatinfalse\latinfont#3}%
- }{%
- % specific footnote number provided
- \begingroup%
- \csname c@\@mpfn\endcsname #1\relax%
- \unrestored@protected@xdef\@thefnmark{\thempfn}%
- \endgroup%
- \@footnotemark\@LTRfootnotetext[\@bidituftesidenote@sidenote@vertical@offset]{\@nonlatinfalse\latinfont#3}%
- }%
- \@bidituftesidenote@print@citations% print any citations
- \let\cite\@bidituftesidenote@normal@cite% go back to using normal in-text \cite command
- \unskip\ignorespaces% remove extra white space
- \kern-\multiplefootnotemarker% remove \kern left behind by sidenote
- \kern\multiplefootnotemarker\relax% add new \kern here to replace the one we yanked
-}
-\long\def\@RTLbidituftesidenote@sidenote[#1][#2]#3{%
- \let\cite\@bidituftesidenote@infootnote@cite% use the in-sidenote \cite command
- \gdef\@bidituftesidenote@citations{}% clear out any old citations
- \ifthenelse{\NOT\isempty{#2}}{%
- \gsetlength{\@bidituftesidenote@sidenote@vertical@offset}{#2}%
- }{%
- \gsetlength{\@bidituftesidenote@sidenote@vertical@offset}{0pt}%
- }%
- \ifthenelse{\isempty{#1}}{%
- % no specific footnote number provided
- \stepcounter\@mpfn%
- \protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark\@RTLfootnotetext[\@bidituftesidenote@sidenote@vertical@offset]{\@nonlatintrue\persianfont#3}%
- }{%
- % specific footnote number provided
- \begingroup%
- \csname c@\@mpfn\endcsname #1\relax%
- \unrestored@protected@xdef\@thefnmark{\thempfn}%
- \endgroup%
- \@footnotemark\@RTLfootnotetext[\@bidituftesidenote@sidenote@vertical@offset]{\@nonlatintrue\persianfont#3}%
- }%
- \@bidituftesidenote@print@citations% print any citations
- \let\cite\@bidituftesidenote@normal@cite% go back to using normal in-text \cite command
- \unskip\ignorespaces% remove extra white space
- \kern-\multiplefootnotemarker% remove \kern left behind by sidenote
- \kern\multiplefootnotemarker\relax% add new \kern here to replace the one we yanked
-}
-\renewcommand\LTRmarginnote[2][0pt]{%
- \let\cite\@bidituftesidenote@infootnote@cite% use the in-sidenote \cite command
- \gdef\@bidituftesidenote@citations{}% clear out any old citations
- \LTRbidituftesidenotemarginpar{\hbox{}\vspace*{#1}\@bidituftesidenote@marginnote@font\@nonlatinfalse\latinfont\@bidituftesidenote@marginnote@justification\@bidituftesidenote@margin@par\vspace*{-1\baselineskip}\noindent #2}%
- \@bidituftesidenote@print@citations% print any citations
- \let\cite\@bidituftesidenote@normal@cite% go back to using normal in-text \cite command
-}
-\renewcommand\RTLmarginnote[2][0pt]{%
- \let\cite\@bidituftesidenote@infootnote@cite% use the in-sidenote \cite command
- \gdef\@bidituftesidenote@citations{}% clear out any old citations
- \RTLbidituftesidenotemarginpar{\hbox{}\vspace*{#1}\@bidituftesidenote@marginnote@font\@nonlatintrue\persianfont\@bidituftesidenote@marginnote@justification\@bidituftesidenote@margin@par\vspace*{-1\baselineskip}\noindent #2}%
- \@bidituftesidenote@print@citations% print any citations
- \let\cite\@bidituftesidenote@normal@cite% go back to using normal in-text \cite command
-}
+\ProvidesFile{bidituftesidenote-xepersian.def}[2017/02/04 v0.3 xepersian changes to bidituftesidenote package]
+
+\setLTRcitationfont{\resetlatinfont\footnotesize}
+
+\renewcommand*{\@bidituftesidenote@LTRmarginfont}{\resetlatinfont\footnotesize}
+
+\renewcommand*{\@bidituftesidenote@RTLmarginfont}{\setpersianfont\footnotesize}
+
+
% \end{macrocode}
% \iffalse
%</bidituftesidenote-xepersian.def>
@@ -4008,9 +3837,9 @@ by Vafa Khalighi.
% \subsection{\textsf{extrafootnotefeatures-xepersian.def}}
% \begin{macrocode}
\ProvidesFile{extrafootnotefeatures-xepersian.def}[2012/01/01 v0.2 footnote macros for extrafootnotefeatures option of xepersian package]
-\renewcommand{\foottextfont}{\footnotesize\if@RTL@footnote\else\@nonlatinfalse\latinfont\fi}
-\renewcommand{\LTRfoottextfont}{\@nonlatinfalse\footnotesize\latinfont}
-\renewcommand{\RTLfoottextfont}{\@nonlatintrue\footnotesize\persianfont}
+\renewcommand{\foottextfont}{\footnotesize\if@RTL@footnote\else\resetlatinfont\fi}
+\renewcommand{\LTRfoottextfont}{\footnotesize\resetlatinfont}
+\renewcommand{\RTLfoottextfont}{\footnotesize\setpersianfont}
% \end{macrocode}
% \iffalse
%</extrafootnotefeatures-xepersian.def>
@@ -4068,117 +3897,14 @@ by Vafa Khalighi.
%\fi
% \subsection{\textsf{footnote-xepersian.def}}
% \begin{macrocode}
-\ProvidesFile{footnote-xepersian.def}[2013/04/26 v0.4 footnote macros for xepersian package]
+\ProvidesFile{footnote-xepersian.def}[2017/02/04 v0.5 footnote macros for xepersian package]
-
-
-\long\def\@footnotetext#1{\insert\footins{%
- \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\@finalstrut\strutbox}%
- \color@endgroup}}%
-
-
+\renewcommand*{\bidi@@footnotetext@font}{\if@RTL@footnote\reset@font\else\resetlatinfont\fi\footnotesize}
-
-
-\long\def\@RTLfootnotetext#1{\insert\footins{%
- \@RTLtrue%
- \@nonlatintrue%
- \reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\persianfont #1\@finalstrut\strutbox}%
- \color@endgroup}}%
-
-
-
-
-
-\long\def\@LTRfootnotetext#1{\insert\footins{%
- \@RTLfalse%
- \@nonlatinfalse%
- \reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\latinfont #1\@finalstrut\strutbox}%
- \color@endgroup}}%
-
-\footdir@temp\footdir@ORG@xepersian@footnotetext\@footnotetext{\bidi@footdir@footnote}%
-\footdir@temp\footdir@ORG@xepersian@RTLfootnotetext\@RTLfootnotetext{R}%
-\footdir@temp\footdir@ORG@xepersian@LTRfootnotetext\@LTRfootnotetext{L}%
-
-
-
-\long\def\@mpfootnotetext#1{%
- \ifbidi@autofootnoterule\ifnum\c@mpfootnote=\@ne\if@RTL@footnote\global\let\bidi@mpfootnoterule\right@footnoterule\else\global\let\bidi@mpfootnoterule\left@footnoterule\fi\fi\fi%
- \global\setbox\@mpfootins\vbox{\if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\@finalstrut\strutbox}%
- \color@endgroup}}
-
-
+\renewcommand*{\bidi@@LTRfootnotetext@font}{\resetlatinfont\footnotesize}
+\renewcommand*{\bidi@@RTLfootnotetext@font}{\setpersianfont\footnotesize}
-
-\long\def\@mpRTLfootnotetext#1{%
- \ifbidi@autofootnoterule\ifnum\c@mpfootnote=\@ne\global\let\bidi@mpfootnoterule\right@footnoterule\fi\fi%
- \global\setbox\@mpfootins\vbox{\@RTLtrue\@nonlatintrue%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\persianfont #1\@finalstrut\strutbox}%
- \color@endgroup}}
-
-
-\long\def\@mpLTRfootnotetext#1{%
- \ifbidi@autofootnoterule\ifnum\c@mpfootnote=\@ne\global\let\bidi@mpfootnoterule\left@footnoterule\fi\fi%
- \global\setbox\@mpfootins\vbox{\@RTLfalse\@nonlatinfalse%
- \unvbox\@mpfootins
- \reset@font\footnotesize
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel
- {\csname p@mpfootnote\endcsname\@thefnmark}%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\latinfont #1\@finalstrut\strutbox}%
- \color@endgroup}}
% \end{macrocode}
% \iffalse
%</footnote-xepersian.def>
@@ -4312,62 +4038,7 @@ by Vafa Khalighi.
\raise.9ex\hbox{\fontsize\sf@size\z@\normalfont\@thefnmark}%
}
-
-
-\long\def\@footnotetext#1{%
- \insert\footins{%
- \if@RTL@footnote\@RTLtrue\else\@RTLfalse\fi%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\unskip\strut\par}}}
-
-
-
-
-
-\long\def\@RTLfootnotetext#1{%
- \insert\footins{%
- \@RTLtrue%
- \@nonlatintrue%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\persianfont #1\unskip\strut\par}}}
-
-
-
-
-
-
-
-\long\def\@LTRfootnotetext#1{%
- \insert\footins{%
- \@RTLfalse%
- \@nonlatinfalse%
- \normalfont\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
- \floatingpenalty\@MM \hsize\columnwidth
- \@parboxrestore \parindent\normalparindent \sloppy
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces\latinfont #1\unskip\strut\par}}}
-
-\footdir@temp\footdir@ORG@xepersian@imsproc@footnotetext\@footnotetext{\bidi@footdir@footnote}%
-\footdir@temp\footdir@ORG@xepersian@imsproc@RTLfootnotetext\@RTLfootnotetext{R}%
-\footdir@temp\footdir@ORG@xepersian@imsproc@LTRfootnotetext\@LTRfootnotetext{L}%
+
\def\part{\@startsection{part}{0}%
\z@{\linespacing\@plus\linespacing}{.5\linespacing}%
@@ -5676,8 +5347,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
% \subsection{\textsf{xepersian.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\xepersianversion{v17.3}
-\def\xepersiandate{2017/02/04}
+\def\xepersianversion{v17.5}
+\def\xepersiandate{2017/02/05}
\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space
Persian typesetting in XeLaTeX]
\RequirePackage{fontspec}
@@ -5778,7 +5449,6 @@ Persian typesetting in XeLaTeX]
\DeclareDocumentCommand \setlatintextfont { O{} m O{} }
{
\fontspec_set_family:Nnn \g__xepersian_latinfont_family {Mapping=tex-text,#1,#3} {#2}
- \tl_set_eq:NN \rmdefault \g__xepersian_latinfont_family
\use:x { \exp_not:n { \DeclareRobustCommand \latinfont }
{
\exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
@@ -5959,28 +5629,29 @@ Persian typesetting in XeLaTeX]
\ExplSyntaxOff
\def\resetlatinfont{%
+\@nonlatinfalse%
\let\normalfont\latinfont%
\let\reset@font\normalfont%
\latinfont}
\def\setpersianfont{%
+\@nonlatintrue%
\let\normalfont\persianfont%
\let\reset@font\normalfont%
\persianfont}
-\bidi@newrobustcmd*{\lr}[1]{\LRE{\@nonlatinfalse\latinfont#1}}
-\bidi@newrobustcmd*{\rl}[1]{\RLE{\@nonlatintrue\persianfont#1}}
-\def\latin{\LTR\LatinAlphs\@nonlatinfalse\@RTL@footnotefalse\resetlatinfont}
+\bidi@newrobustcmd*{\lr}[1]{\LRE{\resetlatinfont#1}}
+\bidi@newrobustcmd*{\rl}[1]{\RLE{\setpersianfont#1}}
+\def\latin{\LTR\LatinAlphs\@RTL@footnotefalse\resetlatinfont}
\def\endlatin{\endLTR}
-\def\persian{\RTL\PersianAlphs\@nonlatintrue\@RTL@footnotetrue\setpersianfont}
+\def\persian{\RTL\PersianAlphs\@RTL@footnotetrue\setpersianfont}
\def\endpersian{\endRTL}
-\newenvironment{latinitems}{\begin{LTRitems}\LatinAlphs\@nonlatinfalse\@RTL@footnotefalse\resetlatinfont}{\end{LTRitems}}
-\newenvironment{parsiitems}{\begin{RTLitems}\PersianAlphs\@nonlatintrue\@RTL@footnotetrue\setpersianfont}{\end{RTLitems}}
+\newenvironment{latinitems}{\begin{LTRitems}\LatinAlphs\@RTL@footnotefalse\resetlatinfont}{\end{LTRitems}}
+\newenvironment{parsiitems}{\begin{RTLitems}\PersianAlphs\@RTL@footnotetrue\setpersianfont}{\end{RTLitems}}
\let\originaltoday=\today
\def\latintoday{\lr{\originaltoday}}
\def\today{\rl{\persiantoday}}
\def \@LTRmarginparreset {%
\reset@font
- \@nonlatinfalse
- \latinfont
+ \resetlatinfont
\normalsize
\@minipagetrue
\everypar{\@minipagefalse\everypar{}\beginL}%
@@ -5998,76 +5669,10 @@ Persian typesetting in XeLaTeX]
\@latex@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\@cite@ofmt{\csname b@\@citeb\endcsname}}}}}{#1}}
-\def\@outputpage{%
-\begingroup % the \endgroup is put in by \aftergroup
- \let \protect \noexpand
- \@resetactivechars
- \global\let\@@if@newlist\if@newlist
- \global\@newlistfalse
- \@parboxrestore
- \shipout \vbox{%
- \set@typeset@protect
- \aftergroup \endgroup
- \aftergroup \set@typeset@protect
- % correct? or just restore by ending
- % the group?
- \if@specialpage
- \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
- \fi
- \if@twoside
- \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
- \if@RTLmain
- \let\@themargin\evensidemargin
- \else
- \let\@themargin\oddsidemargin
- \fi
- \else \let\@thehead\@evenhead \let\@thefoot\@evenfoot
- \if@RTLmain
- \let\@themargin\oddsidemargin
- \else
- \let\@themargin\evensidemargin
- \fi
- \fi
- \ifx\@thehead\@empty \let\@thehead\hfil \fi
- \ifx\@thefoot\@empty \let\@thefoot\hfil \fi
- \else %% not @twoside
- \ifx\@oddhead\@empty \let\@thehead\hfil \fi
- \ifx\@oddfoot\@empty \let\@thefoot\hfil \fi
- \fi
- \reset@font
- \normalsize
- \if@RTLmain\@nonlatintrue\setpersianfont\else\@nonlatinfalse\resetlatinfont\fi
- \normalsfcodes
- \let\label\@gobble
- \let\index\@gobble
- \let\glossary\@gobble
- \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
- \@begindvi
- \vskip \topmargin
- \moveright\@themargin \vbox {%
- \setbox\@tempboxa \vbox to\headheight{%
- \vfil
- \color@hbox
- \normalcolor
- \hb@xt@\textwidth{\if@RTLmain\@RTLtrue\beginR\else\@RTLfalse\beginL\fi\@thehead\if@RTLmain\endR\else\endL\fi}%
- \color@endbox
- }% %% 22 Feb 87
- \dp\@tempboxa \z@
- \box\@tempboxa
- \vskip \headsep
- \box\@outputbox
- \baselineskip \footskip
- \color@hbox
- \normalcolor
- \hb@xt@\textwidth{\if@RTLmain\@RTLtrue\beginR\else\@RTLfalse\beginL\fi\@thefoot\if@RTLmain\endR\else\endL\fi}%
- \color@endbox
- }%
- }%
- \global\let\if@newlist\@@if@newlist
- \global \@colht \textheight
- \stepcounter{page}%
- \let\firstmark\botmark
-}
+
+\renewcommand*{\bidi@font@@outputpage}{\if@RTLmain\setpersianfont\else\resetlatinfont\fi}
+
+
\newcommand\twocolumnstableofcontents{%
\if@bidi@csundef{multi@column@out}{%
\PackageError{xepersian}{Oops! you should load multicol package before xepersian package for being able to use this command}{}}{%
@@ -6376,13 +5981,14 @@ number is 999,999,999.}%
for the main Persian text}{Use `\settextfont' to load a font.}%
}{}}
\@ifdefinitionfileloaded{loadingorder-xetex-bidi}{\input{loadingorder-xepersian.def}}{}
+\@ifdefinitionfileloaded{footnote-xetex-bidi}{\input{footnote-xepersian.def}}{}
\@ifpackageloaded{appendix}{\input{appendix-xepersian.def}}{}
\@ifpackageloaded{listings}{\input{listings-xepersian.def}}{}
\@ifpackageloaded{algorithmic}{\input{algorithmic-xepersian.def}}{}
\@ifpackageloaded{algorithm}{\input{algorithm-xepersian.def}}{}
\@ifpackageloaded{backref}{\input{backref-xepersian.def}}{}
\@ifpackageloaded{flowfram}{\input{flowfram-xepersian.def}}{}
-\@ifpackageloaded{bidituftesidenote}{\input{bidituftesidenote-xepersian.def}}{\input{footnote-xepersian.def}}
+\@ifpackageloaded{bidituftesidenote}{\input{bidituftesidenote-xepersian.def}}{}
\@ifpackageloaded{breqn}{\input{breqn-xepersian.def}}{}
\@ifpackageloaded{enumerate}{\input{enumerate-xepersian.def}}{}
\@ifpackageloaded{framed}{\input{framed-xepersian.def}}{}
@@ -7584,7 +7190,7 @@ indexblock environment may only appear inside frontpage environment.
\DeclareDocumentCommand \setdigitfont { O{} m O{} }
{
\let\glb@currsize\relax
- \fontspec_set_family:Nnn \g__xepersian_digitsfamily_family {Mapping=parsidigits,#1} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_digitsfamily_family {Mapping=parsidigits,#1,#3} {#2}
\xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'}
\DeclareSymbolFont{OPERATORS} {\g_fontspec_encoding_tl}{\g__xepersian_digitsfamily_family} {m}{n}
\DeclareSymbolFont{new@mathbf@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_digitsfamily_family}{bx}{n}
@@ -7614,7 +7220,7 @@ indexblock environment may only appear inside frontpage environment.
\DeclareDocumentCommand \setmathsfdigitfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Mapping=parsidigits,#1} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Mapping=parsidigits,#1,#3} {#2}
\DeclareSymbolFont{new@mathsf@font@digits}{\g_fontspec_encoding_tl}{\g__fontspec_mathsf_tl}{m}{n}
\def\persianmathsfdigits{\tl_set_eq:NN \mathsf \new@mathsf}
}
@@ -7623,7 +7229,7 @@ indexblock environment may only appear inside frontpage environment.
\DeclareDocumentCommand \setmathttdigitfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Mapping=parsidigits,#1} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Mapping=parsidigits,#1,#3} {#2}
\DeclareSymbolFont{new@mathtt@font@digits}{\g_fontspec_encoding_tl}{\g__fontspec_mathtt_tl}{m}{n}
\def\persianmathttdigits{\tl_set_eq:NN \mathtt \new@mathtt}
}