diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty | 100 |
1 files changed, 17 insertions, 83 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty index 3711c5bd7b1..5477e104d63 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty +++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \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 @@ -35,8 +35,8 @@ %% Right brace \} Tilde \~} %% \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} @@ -137,7 +137,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 } @@ -317,28 +316,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}% @@ -356,76 +356,9 @@ 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}{}}{% @@ -731,13 +664,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}}{} |