diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathdigitspec.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathdigitspec.sty | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathdigitspec.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathdigitspec.sty index 850d96d4290..23ff8169ce9 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathdigitspec.sty +++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathdigitspec.sty @@ -8,7 +8,6 @@ %% %% __________________________________________________ %% Vafa Khalighi -%% tex-persian@vafa.ac %% %% Copyright (c) 2008--2022 Vafa Khalighi %% Copyright (c) 2018--2020 bidi-tex GitHub Organization @@ -21,7 +20,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{10978} +%% \CheckSum{10976} %% \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 @@ -40,7 +39,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xepersian-mathdigitspec} - [2022/02/04 v1.1.9 Unicode Persian math digits in XeLaTeX] + [2022/05/20 v1.2.0 Unicode Persian math digits in XeLaTeX] \def\new@mathgroup{\alloc@8\mathgroup\chardef\@cclvi} \let\newfam\new@mathgroup \def\select@group#1#2#3#4{% @@ -250,7 +249,7 @@ \SetMathCode{`8}{\mathalpha}{OPERATORS}{`8} \SetMathCode{`9}{\mathalpha}{OPERATORS}{`9} \SetMathCode{`\%}{\mathbin}{OPERATORS}{`٪} - \SetMathCharDef{\decimalseparator}{\mathord}{OPERATORS}{"066B} + \SetMathCharDef{\persiandecimalseparator}{\mathord}{OPERATORS}{"066B} \tl_set_eq:NN \mathbf \new@mathbf \tl_set_eq:NN \mathit \new@mathit \tl_set_eq:NN \mathrm \new@mathrm} @@ -289,26 +288,26 @@ \cs_set_eq:NN \__xepersian_setmathttdigitfont_hook:nn \use_none:nn \ExplSyntaxOff -\ifx\newcommand\undefined\else - \newcommand{\ZifferAn}{} -\fi -\mathchardef\ziffer@DotOri="013A -{\ZifferAn - \catcode`\.=\active\gdef.{\begingroup\obeyspaces\futurelet\n\ziffer@dcheck}} -\def\ziffer@dcheck{\ziffer@check\ZifferLeer\ziffer@DotOri} -\def\ziffer@check#1#2{% - \ifx\n1\endgroup#1\else - \ifx\n2\endgroup#1\else - \ifx\n3\endgroup#1\else - \ifx\n4\endgroup#1\else - \ifx\n5\endgroup#1\else - \ifx\n6\endgroup#1\else - \ifx\n7\endgroup#1\else - \ifx\n8\endgroup#1\else - \ifx\n9\endgroup#1\else - \ifx\n0\endgroup#1\else - \ifx\n\overline\endgroup#1\else - \endgroup#2% +\mathchardef\decimalseparator@point="013A +{% + \catcode`\.=\active + \gdef.{\begingroup\obeyspaces\futurelet\@let@token\decimalseparator@pointcheck}} +\def\decimalseparator@pointcheck{\decimalseparator@check\MathDecimalSeparator\decimalseparator@point} +\def\decimalseparator@check#1#2{% + \ifx\@let@token1\endgroup#1\else + \ifx\@let@token2\endgroup#1\else + \ifx\@let@token3\endgroup#1\else + \ifx\@let@token4\endgroup#1\else + \ifx\@let@token5\endgroup#1\else + \ifx\@let@token6\endgroup#1\else + \ifx\@let@token7\endgroup#1\else + \ifx\@let@token8\endgroup#1\else + \ifx\@let@token9\endgroup#1\else + \ifx\@let@token0\endgroup#1\else + \ifx\@let@token\dot\endgroup#1\else + \ifx\@let@token\overline\endgroup#1\else + \endgroup#2% + \fi \fi \fi \fi @@ -321,8 +320,8 @@ \fi \fi} \mathcode`.="8000\relax -\def\ZifferLeer{\ifx\decimalseparator\undefined .\else \decimalseparator\fi} -\def\DefaultZifferLeer{.} +\def\MathDecimalSeparator{\ifx\persiandecimalseparator\undefined .\else \persiandecimalseparator\fi} +\def\DefaultMathDecimalSeparator{.} \def\DefaultInlineMathDigits{\def\SetInlineMathDigits{}} \def\DefaultDisplayMathDigits{\def\SetDisplayMathDigits{}} \def\DefaultMathDigits{% @@ -363,14 +362,14 @@ } \ExplSyntaxOn -\cs_new_eq:NN \orig_ZifferLeer \ZifferLeer +\cs_new_eq:NN \orig_MathDecimalSeparator \MathDecimalSeparator \NewDocumentCommand \SwitchToDefaultMathDigits { } { \int_step_inline:nnnn { `0 } { \c_one_int } { `9 } { \SetMathCode{##1}{\mathalpha}{operators}{##1} } \SetMathCode{`\%}{\mathbin}{operators}{`\%} - \tl_set_eq:NN \ZifferLeer \DefaultZifferLeer + \tl_set_eq:NN \MathDecimalSeparator \DefaultMathDecimalSeparator \tl_set_eq:NN \mathbf \orig_mathbf:n \tl_set_eq:NN \mathit \orig_mathit:n \tl_set_eq:NN \mathrm \orig_mathrm:n @@ -383,7 +382,7 @@ \SetMathCode{##1}{\mathalpha}{OPERATORS}{##1} } \SetMathCode{`\%}{\mathbin}{OPERATORS}{`٪} - \tl_set_eq:NN \ZifferLeer \orig_ZifferLeer + \tl_set_eq:NN \MathDecimalSeparator \orig_MathDecimalSeparator \tl_set_eq:NN \mathbf \new@mathbf \tl_set_eq:NN \mathit \new@mathit \tl_set_eq:NN \mathrm \new@mathrm |