diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-21 23:30:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-21 23:30:37 +0000 |
commit | 98c763edecfc1cfd423ffc9886ebb999d164c15c (patch) | |
tree | 241719a460f968f76a04d8315c85d67917e830f7 /Master/texmf-dist/source | |
parent | f864e5a185e8909b156eea67942cf33fac35ee5d (diff) |
xepersian (21feb17)
git-svn-id: svn://tug.org/texlive/trunk@43290 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx | 81 |
1 files changed, 55 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx index 22cef47bd58..d0bf7aaf448 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.7 +v17.9 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/20 +Current version release date: 2017/02/21 ______________ 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.7}} +%\large Documentation for \textcolor{blue!65!black}{version 17.9}} % \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.7}} +%Documentation for \textcolor{blue!65!black}{version 17.9}} % %\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.7, 2017/02/20 +%* v17.9, 2017/02/21 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -2359,7 +2359,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{9363} +%% \CheckSum{9408} %% \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 @@ -4105,7 +4105,7 @@ by Vafa Khalighi. % \begin{macrocode} \newif\if@Kashida@on \def\xepersian@kashida{\if@Kashida@on\xepersian@zwj\nobreak% - \leaders\hrule height \XeTeXglyphbounds2 \the\XeTeXcharglyph"0640 depth \XeTeXglyphbounds4 \the\XeTeXcharglyph"0640 \hskip0pt plus 0.5em \xepersian@zwj\fi} + \leaders\hrule height \XeTeXglyphbounds\tw@ \the\XeTeXcharglyph"0640 depth \XeTeXglyphbounds\f@ur \the\XeTeXcharglyph"0640 \hskip0pt plus 0.5em \xepersian@zwj\fi} \def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}% \expandafter\dosetclass\charlist,\end} @@ -5347,8 +5347,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \subsection{\textsf{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersianversion{v17.7} -\def\xepersiandate{2017/02/20} +\def\xepersianversion{v17.9} +\def\xepersiandate{2017/02/21} \ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space Persian typesetting in XeLaTeX] \RequirePackage{fontspec} @@ -5632,12 +5632,12 @@ Persian typesetting in XeLaTeX] \@nonlatinfalse% \let\normalfont\latinfont% \let\reset@font\normalfont% -\latinfont} +\latinfont\normalsize} \def\setpersianfont{% \@nonlatintrue% \let\normalfont\persianfont% \let\reset@font\normalfont% -\persianfont} +\persianfont\normalsize} \bidi@newrobustcmd*{\lr}[1]{\LRE{\resetlatinfont#1}} \bidi@newrobustcmd*{\rl}[1]{\RLE{\setpersianfont#1}} \def\latin{\LTR\LatinAlphs\@RTL@footnotefalse\resetlatinfont} @@ -5671,25 +5671,30 @@ Persian typesetting in XeLaTeX] {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}}{#1}} \renewcommand*{\bidi@font@@outputpage}{\if@RTLmain\setpersianfont\else\resetlatinfont\fi} - + +\newif\if@xepersian@@computeautoilg \newcount\xepersian@tcl \newdimen\xepersian@ilg \newdimen\xepersian@strutilg -\newbox\xepersian@wbox -\newcommand*{\computeautoilg}{% compute the interline glue - \xepersian@tcl=1536\xepersian@ilg=0pt\xepersian@strutilg=0pt - \loop\setbox\xepersian@wbox=\hbox{\char\xepersian@tcl} - \ifdim\ht\xepersian@wbox>\xepersian@ilg\xepersian@ilg=\ht\xepersian@wbox\fi - \ifdim\dp\xepersian@wbox>\xepersian@strutilg\xepersian@strutilg=\dp\xepersian@wbox\fi - \advance\xepersian@tcl by 1 - \ifnum\xepersian@tcl<1792\repeat - \advance\xepersian@strutilg by \xepersian@ilg - \ifdim\xepersian@strutilg>\baselineskip - \PackageInfo{xepersian}{character with height+depth greater than current baselineskip found in font} - \PackageInfo{xepersian}{baselineskip changed to that height+depth!} - \linespread{\strip@pt\dimexpr 1pt * \xepersian@strutilg / \baselineskip\relax} - \selectfont +\chardef\f@ur=4 +\newcommand*{\xepersian@computeautoilg}{% compute the interline glue + \xepersian@tcl=1536\xepersian@ilg\z@\xepersian@strutilg\z@ + \loop + \ifdim\XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@tcl>\xepersian@ilg + \xepersian@ilg=\XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@tcl \fi + \ifdim\XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@tcl>\xepersian@strutilg + \xepersian@strutilg=\XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@tcl + \fi + \advance\xepersian@tcl\@ne + \ifnum\xepersian@tcl<1792\repeat + \advance\xepersian@strutilg\xepersian@ilg +% \ifdim\xepersian@strutilg>\baselineskip +% \PackageInfo{xepersian}{character with height+depth greater than current baselineskip found in font} +% \PackageInfo{xepersian}{baselineskip changed to that height+depth!} +% \linespread{\strip@pt\dimexpr 1pt * \xepersian@strutilg / \baselineskip\relax} +% \selectfont +% \fi } \newcommand\twocolumnstableofcontents{% @@ -6177,6 +6182,16 @@ number is 999,999,999.}% {#1} } + +\define@choicekey{xepersian.sty}{computeautoilg}[\xepersian@tempa\xepersian@tempb]{on,off}[on]{% + \ifcase\xepersian@tempb\relax + \@xepersian@@computeautoilgtrue + \or + \@xepersian@@computeautoilgfalse + \fi} + + + \ExecuteOptionsX{% documentdirection=righttoleft, tabledirection=righttoleft, @@ -6193,6 +6208,20 @@ number is 999,999,999.}% \input{extrafootnotefeatures-xepersian.def} \fi +\if@xepersian@@computeautoilg +\bidi@patchcmd{\set@fontsize}{% +\baselineskip\f@baselineskip\relax +}{% +\baselineskip\f@baselineskip\relax +\xepersian@computeautoilg + \ifdim\xepersian@strutilg>\baselineskip + \PackageInfo{xepersian}{character with height+depth greater than current baselineskip found in font} + \PackageInfo{xepersian}{baselineskip changed to that height+depth!} + \baselineskip\xepersian@strutilg + \fi +}{}{} +\fi + \setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic},SmallCapsFont={lmromancaps10-regular},SlantedFont={lmromanslant10-regular},BoldSlantedFont={lmromanslant10-bold}]{lmroman10-regular}% \PersianAlphs % \end{macrocode} |