diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty index bfaa076e8c6..9b147193c61 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty +++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty @@ -7,7 +7,7 @@ %% xepersian.dtx (with options: `table,xepersian.sty') %% %% __________________________________________________ -%% Copyright (c) 2008--2016 Vafa Khalighi <persian-tex@tug.org> +%% Copyright (c) 2008--2017 Vafa Khalighi <persian-tex@tug.org> %% %% It may be distributed and/or modified under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{10160} +%% \CheckSum{10207} %% \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 @@ -35,8 +35,8 @@ %% Right brace \} Tilde \~} %% \NeedsTeXFormat{LaTeX2e} -\def\xepersianversion{v17.1} -\def\xepersiandate{2016/11/30} +\def\xepersianversion{v17.2} +\def\xepersiandate{2017/01/16} \ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space Persian typesetting in XeLaTeX] \RequirePackage{fontspec} @@ -51,7 +51,7 @@ Persian typesetting in XeLaTeX] * typesetting, using fonts provided in the^^J% * distribution.^^J% * ^^J% -* Copyright (c) 2008--2016 Vafa Khalighi^^J% +* Copyright (c) 2008--2017 Vafa Khalighi^^J% * ^^J% * \xepersianversion, \xepersiandate^^J% * ^^J% @@ -67,6 +67,25 @@ Persian typesetting in XeLaTeX] \typeout{\@xepersian@info} \edef\xepersian@everyjob{\the\everyjob} \everyjob{\xepersian@everyjob\typeout{\@xepersian@info}} +\edef\@bidi@strip@v@xepersianversion{\expandafter\@gobble\xepersianversion} +\newcommand*{\IfxepersianPackageVersionLater}[1]{% + \ifdim\@bidi@strip@v@xepersianversion pt > #1 pt % + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*{\IfxepersianPackageVersionBefore}[1]{% + \ifdim\@bidi@strip@v@xepersianversion pt < #1 pt % + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*{\IfxepersianPackageVersion}[1]{% + \ifdim\@bidi@strip@v@xepersianversion pt = #1 pt % + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} \def\prq{«} \def\plq{»} \def\xepersian@cmds@temp#1{% @@ -308,9 +327,17 @@ Persian typesetting in XeLaTeX] \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\@thehead\@evenhead - \let\@thefoot\@evenfoot \let\@themargin\evensidemargin + \else + \let\@themargin\evensidemargin + \fi \fi \ifx\@thehead\@empty \let\@thehead\hfil \fi \ifx\@thefoot\@empty \let\@thefoot\hfil \fi |