summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/xepersian
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-30 22:25:45 +0000
committerKarl Berry <karl@freefriends.org>2016-11-30 22:25:45 +0000
commit9983ff9172f6303d0f1ab89e32bff21b6d26e985 (patch)
tree8e8fbf305567214b745dcc35851240b826261497 /Master/texmf-dist/source/xelatex/xepersian
parentd3aa19f2fc5afa9977b1c1091de42262fc8c772c (diff)
xepersian (30nov16)
git-svn-id: svn://tug.org/texlive/trunk@42612 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xepersian')
-rw-r--r--Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx91
1 files changed, 58 insertions, 33 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
index 9e2b6c2d5b0..6930dd0574c 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
+v17.1
XePersian is a package written for XeLaTeX that allows users to typeset
Persian easily.
@@ -22,13 +22,13 @@ If you want to report any bugs or typos and corrections in the documentation,
or ask for any new features, or suggest any improvements, or ask any questions
about the package, then please do not send any direct email to me; I will not
answer any direct email. Instead please use the issue tracker:
- <https://github.com/vafa/xepersian/issues>
+ <https://github.com/tex-xet/xepersian/issues>
In doing so, please always explain your issue well enough, always include
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: 2016/11/25
+Current version release date: 2016/11/30
______________
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}}
+%\large Documentation for \textcolor{blue!65!black}{version 17.1}}
% \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}}
+%Documentation for \textcolor{blue!65!black}{version 17.1}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -296,7 +296,7 @@ by Vafa Khalighi.
%answer any direct email. Instead please use the issue tracker:
%
%\medskip
-% \centerline{\url{https://github.com/vafa/xepersian/issues}}
+% \centerline{\url{https://github.com/tex-xet/xepersian/issues}}
%
%\medskip
%In doing so, please always explain your issue well enough, always include
@@ -338,14 +338,14 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2008--2016 Vafa Khalighi
%*
-%* v17, 2016/11/25
+%* v17.1, 2016/11/30
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
%*
%* Location on CTAN: /macros/xetex/latex/xepersian
%*
-%* Issue tracker: https://github.com/vafa/xepersian/issues
+%* Issue tracker: https://github.com/tex-xet/xepersian/issues
%*
%* Support: persian-tex@tug.org
%****************************************************
@@ -2359,7 +2359,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{10112}
+%% \CheckSum{10160}
%% \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
@@ -2423,7 +2423,7 @@ by Vafa Khalighi.
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark}%
\@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\unskip\strut\par}}}
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\unskip\strut\par}}}
@@ -2432,6 +2432,7 @@ by Vafa Khalighi.
\long\def\@RTLfootnotetext#1{%
\insert\footins{%
\@RTLtrue%
+ \@nonlatintrue%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
@@ -2451,6 +2452,7 @@ by Vafa Khalighi.
\long\def\@LTRfootnotetext#1{%
\insert\footins{%
\@RTLfalse%
+ \@nonlatinfalse%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
@@ -2492,7 +2494,7 @@ by Vafa Khalighi.
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark}%
\@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\unskip\strut\par}}}
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\unskip\strut\par}}}
@@ -2501,6 +2503,7 @@ by Vafa Khalighi.
\long\def\@RTLfootnotetext#1{%
\insert\footins{%
\@RTLtrue%
+ \@nonlatintrue%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
@@ -2520,6 +2523,7 @@ by Vafa Khalighi.
\long\def\@LTRfootnotetext#1{%
\insert\footins{%
\@RTLfalse%
+ \@nonlatinfalse%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
@@ -2643,7 +2647,7 @@ by Vafa Khalighi.
% \subsection{\textsf{bidituftesidenote-xepersian.def}}
% \begin{macrocode}
\ProvidesFile{bidituftesidenote-xepersian.def}[2014/12/28 v0.2 xepersian changes to bidituftesidenote package]
-\setLTRcitationfont{\@bidituftesidenote@marginfont\latinfont}
+\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
@@ -2656,14 +2660,14 @@ by Vafa Khalighi.
% no specific footnote number provided
\stepcounter\@mpfn%
\protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark\@LTRfootnotetext[\@bidituftesidenote@sidenote@vertical@offset]{\latinfont#3}%
+ \@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]{\latinfont#3}%
+ \@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
@@ -2683,14 +2687,14 @@ by Vafa Khalighi.
% no specific footnote number provided
\stepcounter\@mpfn%
\protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark\@RTLfootnotetext[\@bidituftesidenote@sidenote@vertical@offset]{\persianfont#3}%
+ \@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]{\persianfont#3}%
+ \@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
@@ -2701,14 +2705,14 @@ by Vafa Khalighi.
\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\latinfont\@bidituftesidenote@marginnote@justification\@bidituftesidenote@margin@par\vspace*{-1\baselineskip}\noindent #2}%
+ \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\persianfont\@bidituftesidenote@marginnote@justification\@bidituftesidenote@margin@par\vspace*{-1\baselineskip}\noindent #2}%
+ \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
}
@@ -4004,9 +4008,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\latinfont\fi}
-\renewcommand{\LTRfoottextfont}{\footnotesize\latinfont}
-\renewcommand{\RTLfoottextfont}{\footnotesize\persianfont}
+\renewcommand{\foottextfont}{\footnotesize\if@RTL@footnote\else\@nonlatinfalse\latinfont\fi}
+\renewcommand{\LTRfoottextfont}{\@nonlatinfalse\footnotesize\latinfont}
+\renewcommand{\RTLfoottextfont}{\@nonlatintrue\footnotesize\persianfont}
% \end{macrocode}
% \iffalse
%</extrafootnotefeatures-xepersian.def>
@@ -4080,7 +4084,7 @@ by Vafa Khalighi.
}%
\color@begingroup
\@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\@finalstrut\strutbox}%
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\@finalstrut\strutbox}%
\color@endgroup}}%
@@ -4089,6 +4093,7 @@ by Vafa Khalighi.
\long\def\@RTLfootnotetext#1{\insert\footins{%
\@RTLtrue%
+ \@nonlatintrue%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
@@ -4108,6 +4113,7 @@ by Vafa Khalighi.
\long\def\@LTRfootnotetext#1{\insert\footins{%
\@RTLfalse%
+ \@nonlatinfalse%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
@@ -4138,7 +4144,7 @@ by Vafa Khalighi.
{\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
\@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\@finalstrut\strutbox}%
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\@finalstrut\strutbox}%
\color@endgroup}}
@@ -4147,7 +4153,7 @@ by Vafa Khalighi.
\long\def\@mpRTLfootnotetext#1{%
\ifbidi@autofootnoterule\ifnum\c@mpfootnote=\@ne\global\let\bidi@mpfootnoterule\right@footnoterule\fi\fi%
- \global\setbox\@mpfootins\vbox{\@RTLtrue%
+ \global\setbox\@mpfootins\vbox{\@RTLtrue\@nonlatintrue%
\unvbox\@mpfootins
\reset@font\footnotesize
\hsize\columnwidth
@@ -4162,7 +4168,7 @@ by Vafa Khalighi.
\long\def\@mpLTRfootnotetext#1{%
\ifbidi@autofootnoterule\ifnum\c@mpfootnote=\@ne\global\let\bidi@mpfootnoterule\left@footnoterule\fi\fi%
- \global\setbox\@mpfootins\vbox{\@RTLfalse%
+ \global\setbox\@mpfootins\vbox{\@RTLfalse\@nonlatinfalse%
\unvbox\@mpfootins
\reset@font\footnotesize
\hsize\columnwidth
@@ -4319,7 +4325,7 @@ by Vafa Khalighi.
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark}%
\@makefntext{%
- \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\latinfont#1\fi\unskip\strut\par}}}
+ \rule\z@\footnotesep\ignorespaces\if@RTL@footnote#1\else\@nonlatinfalse\latinfont#1\fi\unskip\strut\par}}}
@@ -4328,6 +4334,7 @@ by Vafa Khalighi.
\long\def\@RTLfootnotetext#1{%
\insert\footins{%
\@RTLtrue%
+ \@nonlatintrue%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
@@ -4347,6 +4354,7 @@ by Vafa Khalighi.
\long\def\@LTRfootnotetext#1{%
\insert\footins{%
\@RTLfalse%
+ \@nonlatinfalse%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
@@ -4759,7 +4767,7 @@ by Vafa Khalighi.
\long\def\@iiiparbox#1#2[#3]#4#5{%
\leavevmode
\@pboxswfalse
- \if@RTLtab\@bidi@list@minipage@parbox@not@nobtrue\fi
+ \if@hboxRconstruct\@bidi@list@minipage@parbox@not@nobtrue\fi
\if@RTL\if#1t\@bidi@list@minipage@parboxtrue\else\if#1b\@bidi@list@minipage@parboxtrue\else\if#1ز\@bidi@list@minipage@parboxtrue\else\if#1ب\@bidi@list@minipage@parboxtrue\fi\fi\fi\fi\fi
\setlength\@tempdima{#4}%
\@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
@@ -4781,7 +4789,7 @@ by Vafa Khalighi.
\def\@iiiminipage#1#2[#3]#4{%
\leavevmode
\@pboxswfalse
- \if@RTLtab\@bidi@list@minipage@parbox@not@nobtrue\fi
+ \if@hboxRconstruct\@bidi@list@minipage@parbox@not@nobtrue\fi
\if@RTL\if#1t\@bidi@list@minipage@parboxtrue\else\if#1b\@bidi@list@minipage@parboxtrue\else\if#1ز\@bidi@list@minipage@parboxtrue\else\if#1ب\@bidi@list@minipage@parboxtrue\fi\fi\fi\fi\fi
\setlength\@tempdima{#4}%
\def\@mpargs{{#1}{#2}[#3]{#4}}%
@@ -5668,8 +5676,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
% \subsection{\textsf{xepersian.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\xepersianversion{v17}
-\def\xepersiandate{2016/11/25}
+\def\xepersianversion{v17.1}
+\def\xepersiandate{2016/11/30}
\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space
Persian typesetting in XeLaTeX]
\RequirePackage{fontspec}
@@ -5693,7 +5701,7 @@ Persian typesetting in XeLaTeX]
* ^^J%
* Location on CTAN: /macros/xetex/latex/xepersian^^J%
* ^^J%
-* Issue tracker: https://github.com/vafa/xepersian/issues^^J%
+* Issue tracker: https://github.com/tex-xet/xepersian/issues^^J%
* ^^J%
* Support: persian-tex@tug.org^^J%
****************************************************}
@@ -5904,6 +5912,7 @@ Persian typesetting in XeLaTeX]
\def\today{\rl{\persiantoday}}
\def \@LTRmarginparreset {%
\reset@font
+ \@nonlatinfalse
\latinfont
\normalsize
\@minipagetrue
@@ -5952,7 +5961,7 @@ Persian typesetting in XeLaTeX]
\fi
\reset@font
\normalsize
- \if@RTLmain\setpersianfont\else\resetlatinfont\fi
+ \if@RTLmain\@nonlatintrue\setpersianfont\else\@nonlatinfalse\resetlatinfont\fi
\normalsfcodes
\let\label\@gobble
\let\index\@gobble
@@ -6347,6 +6356,21 @@ number is 999,999,999.}%
\@RTLfalse
\fi}
+\define@choicekey{xepersian.sty}{documentdirection}[\xepersian@tempa\xepersian@tempb]{righttoleft,lefttoright}{%
+ \ifcase\xepersian@tempb\relax
+ \@RTLtrue
+ \or
+ \@RTLfalse
+ \fi}
+
+
+\define@choicekey{xepersian.sty}{tabledirection}[\xepersian@tempa\xepersian@tempb]{righttoleft,lefttoright}{%
+ \ifcase\xepersian@tempb\relax
+ \@RTLtabtrue
+ \or
+ \@RTLtabfalse
+ \fi}
+
\define@choicekey{xepersian.sty}{script}[\xepersian@tempa\xepersian@tempb]{latin,nonlatin}[latin]{%
\ifcase\xepersian@tempb\relax
\@nonlatinfalse
@@ -6454,7 +6478,8 @@ number is 999,999,999.}%
}
\ExecuteOptionsX{%
- RTLdocument=on,
+ documentdirection=righttoleft,
+ tabledirection=righttoleft,
script=nonlatin,
footnotedirection=righttoleft,
footnoterule=automatic,