summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty32
1 files changed, 28 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian.sty
index f3dcdfcfb28..2ff9bfa21f2 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{9517}
+%% \CheckSum{9558}
%% \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{v19.7}
-\def\xepersiandate{2017/12/20}
+\def\xepersianversion{v19.8}
+\def\xepersiandate{2017/12/24}
\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space
Persian typesetting in XeLaTeX]
\RequirePackage{fontspec}
@@ -358,11 +358,17 @@ Persian typesetting in XeLaTeX]
\ExplSyntaxOff
\def\resetlatinfont{%
\let\@xepersian@@fontsize@scale\xepersian@@fontsize@scale%
+\let\@xepersian@@baselineskip@scale\xepersian@@baselineskip@scale%
\def\xepersian@@fontsize@scale{%
\strip@pt\dimexpr 1pt * \dimexpr
\xepersian@@latin@fontsize@scale pt\relax
/ \dimexpr \@xepersian@@fontsize@scale pt\relax\relax
}%
+\def\xepersian@@baselineskip@scale{%
+ \strip@pt\dimexpr 1pt * \dimexpr
+ \xepersian@@latin@baselineskip@scale pt\relax
+ / \dimexpr \@xepersian@@baselineskip@scale pt\relax\relax
+}%
\@nonlatinfalse%
\let\normalfont\latinfont%
\let\reset@font\normalfont%
@@ -370,10 +376,13 @@ Persian typesetting in XeLaTeX]
\fontsize\f@size\f@baselineskip%
\selectfont%
\let\xepersian@@fontsize@scale\xepersian@@latin@fontsize@scale%
+\let\xepersian@@baselineskip@scale\xepersian@@latin@baselineskip@scale%
}
\def\setpersianfont{%
\let\@xepersian@@fontsize@scale\xepersian@@fontsize@scale%
+\let\@xepersian@@baselineskip@scale\xepersian@@baselineskip@scale%
\let\xepersian@@fontsize@scale\@ne%
+\let\xepersian@@baselineskip@scale\@ne%
\@nonlatintrue%
\let\normalfont\persianfont%
\let\reset@font\normalfont%
@@ -381,6 +390,7 @@ Persian typesetting in XeLaTeX]
\fontsize\f@size\f@baselineskip%
\selectfont%
\let\xepersian@@fontsize@scale\@xepersian@@fontsize@scale%
+\let\xepersian@@baselineskip@scale\@xepersian@@baselineskip@scale%
}
\bidi@newrobustcmd*{\lr}[1]{\LRE{\resetlatinfont#1}}
\bidi@newrobustcmd*{\rl}[1]{\RLE{\setpersianfont#1}}
@@ -968,6 +978,14 @@ number is 999,999,999.}%
\def\xepersian@@latin@fontsize@scale{#1}%
}
+\DeclareOptionX{baselineskipscale}{%
+ \def\xepersian@@baselineskip@scale{#1}%
+ }
+
+\DeclareOptionX{latinbaselineskipscale}{%
+ \def\xepersian@@latin@baselineskip@scale{#1}%
+ }
+
\define@choicekey{xepersian.sty}{computeautoilg}[\xepersian@tempa\xepersian@tempb]{on,off}[on]{%
\ifcase\xepersian@tempb\relax
\@xepersian@@computeautoilgtrue
@@ -999,7 +1017,9 @@ number is 999,999,999.}%
DetectColumn=off,
fontsizescale=\@ne,
latinfontsizescale=\@ne,
- mathfontsizescale=\@ne
+ mathfontsizescale=\@ne,
+ baselineskipscale=\@ne,
+ latinbaselineskipscale=\@ne
}
\ProcessOptionsX
@@ -1013,6 +1033,10 @@ number is 999,999,999.}%
\@tempdimb\xepersian@@fontsize@scale\dimexpr#2pt\relax
}{}{}
+\bidi@patchcmd{\set@fontsize}{\@tempskipa#3pt}{%
+ \@tempskipa\xepersian@@baselineskip@scale\dimexpr#3pt\relax
+}{}{}
+
\newcommand*{\xepersian@@update@math@fontsize}[1]{%
\strip@pt\dimexpr\xepersian@@math@fontsize@scale
\dimexpr 1pt * \dimexpr #1 pt\relax /