diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-04 23:46:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-04 23:46:17 +0000 |
commit | 07dd0643536047c519668c16337eab65a182f3e4 (patch) | |
tree | 86f30cd189d90a1a14e1a4dcc20b71c5e8f59691 /Master/texmf-dist/source/xelatex/xepersian | |
parent | 196751def71387e14be5101a1953d0add736328e (diff) |
xepersian (4jan18)
git-svn-id: svn://tug.org/texlive/trunk@46218 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xepersian')
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx index 2c63453d0a7..5c16312ebda 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 -v20.3 +v20.5 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: 2018/01/03 +Current version release date: 2018/01/04 ______________ Vafa Khalighi persian-tex@tug.org @@ -273,7 +273,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 20.3}} +%\large Documentation for \textcolor{blue!65!black}{version 20.5}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -284,7 +284,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}} % %\Large -%Documentation for \textcolor{blue!65!black}{version 20.3}} +%Documentation for \textcolor{blue!65!black}{version 20.5}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -339,7 +339,7 @@ by Vafa Khalighi. %* %* Copyright (c) 2008--2018 Vafa Khalighi %* -%* v20.3, 2018/01/03 +%* v20.5, 2018/01/04 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -2361,7 +2361,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{10452} +%% \CheckSum{10521} %% \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 @@ -4030,20 +4030,23 @@ by Vafa Khalighi. %\fi % \subsection{\textsf{kashida-xepersian.def}} % \begin{macrocode} -\ProvidesFile{kashida-xepersian.def}[2018/01/03 v0.6 implementation of Kashida for xepersian package] +\ProvidesFile{kashida-xepersian.def}[2018/01/04 v0.6 implementation of Kashida for xepersian package] +\chardef\xepersian@zwj="200D % zero-width joiner \chardef\xepersian@kashidachar="0640 % kashida \chardef\xepersian@D=10 % dual-joiner class \chardef\xepersian@L=11 % lam \chardef\xepersian@R=12 % right-joiner \chardef\xepersian@A=13 % alef +\chardef\xepersian@H=14 % heh \chardef\xepersian@V=4096 % vowel or other combining mark (to be ignored) % \end{macrocode} %\changes{v13.6}{2013/11/15}{Used \cs{XeTeXglyphbounds} to find the true height and depth of the Kashida character.} % \begin{macrocode} \newif\if@Kashida@on -\def\xepersian@kashida{\if@Kashida@on\xepersian@kashidachar\nobreak% - \leaders\hrule height \XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@kashidachar depth \XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@kashidachar \hskip0pt plus 0.5em \xepersian@kashidachar\relax\fi} +\newif\if@Kashida@XB@fix +\def\xepersian@kashida{\if@Kashida@on\xepersian@zwj\nobreak% + \leaders\hrule height \XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@kashidachar depth \XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@kashidachar \hskip0pt plus 0.5em \xepersian@zwj\fi} \def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}% \expandafter\dosetclass\charlist,\end} @@ -4059,22 +4062,33 @@ by Vafa Khalighi. \setclass \xepersian@R {0624,0629,062F,0630,0631,0632,0648,0698} \setclass \xepersian@D {0626,0628,062A,062B,062C,062D,062E} \setclass \xepersian@D {0633,0634,0635,0636,0637,0638,0639,063A} -\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0647,0649,064A} +%\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0647,0649,064A} +\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0649,064A} +\XeTeXcharclass "0647 \xepersian@H \setclass \xepersian@D {067E,0686,06A9,06AF,06CC} \setclass \xepersian@L {0644} \setclass \xepersian@V {064B,064C,064D,064E,064F,0650,0651,0652} \XeTeXinterchartoks \xepersian@D \xepersian@D = {\xepersian@kashida} +\XeTeXinterchartoks \xepersian@H \xepersian@D = {\if@Kashida@XB@fix\else\xepersian@kashida\fi} +\XeTeXinterchartoks \xepersian@D \xepersian@H = {\xepersian@kashida} \XeTeXinterchartoks \xepersian@L \xepersian@D = {\xepersian@kashida} \XeTeXinterchartoks \xepersian@D \xepersian@L = {\xepersian@kashida} +\XeTeXinterchartoks \xepersian@L \xepersian@H = {\xepersian@kashida} +\XeTeXinterchartoks \xepersian@H \xepersian@L = {\if@Kashida@XB@fix\else\xepersian@kashida\fi} \XeTeXinterchartoks \xepersian@L \xepersian@L = {\xepersian@kashida} \XeTeXinterchartoks \xepersian@D \xepersian@R = {\xepersian@kashida} +\XeTeXinterchartoks \xepersian@H \xepersian@R = {\if@Kashida@XB@fix\else\xepersian@kashida\fi} \XeTeXinterchartoks \xepersian@D \xepersian@A = {\xepersian@kashida} +\XeTeXinterchartoks \xepersian@H \xepersian@A = {\if@Kashida@XB@fix\else\xepersian@kashida\fi} \XeTeXinterchartoks \xepersian@L \xepersian@R = {\xepersian@kashida} \XeTeXinterchartoks \xepersian@L \xepersian@A = {} \newcommand{\KashidaOn}{\@Kashida@ontrue} \newcommand{\KashidaOff}{\@Kashida@onfalse} + +\newcommand{\KashidaXBFixOn}{\@Kashida@XB@fixtrue} +\newcommand{\KashidaXBFixOff}{\@Kashida@XB@fixfalse} \KashidaOn % \end{macrocode} % \iffalse @@ -5289,8 +5303,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \subsection{\textsf{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersianversion{v20.3} -\def\xepersiandate{2018/01/03} +\def\xepersianversion{v20.5} +\def\xepersiandate{2018/01/04} \ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space Persian typesetting in XeLaTeX] \RequirePackage{fontspec} @@ -5424,6 +5438,8 @@ Persian typesetting in XeLaTeX] \XeTeXinterchartoks \bidi@digits@charclass \xepersian@A = {\xepersian@@stop@switch@textdigitfont} \XeTeXinterchartoks \xepersian@R \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} \XeTeXinterchartoks \bidi@digits@charclass \xepersian@R = {\xepersian@@stop@switch@textdigitfont} + \XeTeXinterchartoks \xepersian@H \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} + \XeTeXinterchartoks \bidi@digits@charclass \xepersian@H = {\xepersian@@stop@switch@textdigitfont} } \newcommand*{\xepersian@@start@switch@textdigitfont}{\ifx\f@family\ttdefault\else\if@nonlatin\if@@textdigitfont@on\bgroup\xepersian@textdigitfont\else\fi\fi\fi} \newcommand*{\xepersian@@stop@switch@textdigitfont}{\ifx\f@family\ttdefault\else\if@nonlatin\if@@textdigitfont@on\egroup\else\fi\fi\fi} @@ -6493,6 +6509,12 @@ number is 999,999,999.}% \ifcase\xepersian@tempb\relax \input{kashida-xepersian.def} \fi} +\define@choicekey{xepersian.sty}{KashidaXBFix}[\xepersian@tempa\xepersian@tempb]{on,off}[on]{% + \ifcase\xepersian@tempb\relax + \@Kashida@XB@fixtrue + \or + \@Kashida@XB@fixfalse + \fi} \define@choicekey{xepersian.sty}{localise}[\xepersian@tempa\xepersian@tempb]{on,off}[on]{% \ifcase\xepersian@tempb\relax \input{localise-xepersian.def} |