diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty index 91882e8e3b1..9f9d7ca3fff 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty +++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{10996} +%% \CheckSum{10999} %% \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 @@ -36,7 +36,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xepersian-mathsdigitspec} - [2018/12/14 v1.1.6 Unicode Persian maths digits in XeLaTeX] + [2018/12/16 v1.1.7 Unicode Persian maths digits in XeLaTeX] \def\new@mathgroup{\alloc@8\mathgroup\chardef\@cclvi} \let\newfam\new@mathgroup \def\select@group#1#2#3#4{% @@ -178,27 +178,45 @@ \prg_new_conditional:Nnn \__xepersian_mathsdigitspec_primitive_font_char_if_exist:n {p,TF,T,F} { - \etex_iffontchar:D \l_fontspec_font `#1 \scan_stop: + \etex_iffontchar:D \l_fontspec_font "#1 \scan_stop: \prg_return_true: \else: \prg_return_false: \fi: } +\clist_new:N \l_xepersian_mathsdigitspec_char_clist + +\cs_new:Nn \__xepersian_mathsdigitspec_char_set_not_exist_error:nn + { + \clist_set:Nn \l_xepersian_mathsdigitspec_char_clist { #1 } + \clist_map_inline:Nn \l_xepersian_mathsdigitspec_char_clist { + \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF { ##1 }{ \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #2 } { ##1 } } + } + } + +\cs_new:Nn \__xepersian_mathsdigitspec_char_prepend_not_exist_error:nn + { + \clist_put_left:Nn \l_xepersian_mathsdigitspec_char_clist { #1 } + \clist_map_inline:Nn \l_xepersian_mathsdigitspec_char_clist { + \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF { ##1 }{ \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #2 } { ##1 } } + } + } + +\cs_new:Nn \__xepersian_mathsdigitspec_char_append_not_exist_error:nn + { + \clist_put_right:Nn \l_xepersian_mathsdigitspec_char_clist { #1 } + \clist_map_inline:Nn \l_xepersian_mathsdigitspec_char_clist { + \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF { ##1 }{ \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #2 } { ##1 } } + } + } + \cs_new:Nn \__xepersian_mathsdigitspec_char_not_exist_error:n { - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۰ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F0 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۱ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F1 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۲ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F2 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۳ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F3 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۴ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F4 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۵ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F5 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۶ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F6 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۷ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F7 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۸ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F8 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ۹ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 06F9 } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ٫ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 066B } } - \__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ٪ { \__xepersian_mathsdigitspec_error:nxx {char-not-exist} { #1 } { 066A } } + \__xepersian_mathsdigitspec_char_set_not_exist_error:nn { + 06F0 , 06F1 , 06F2 , 06F3 , 06F4 , 06F5 , 06F6 , 06F7 , 06F8 , + 06F9 , 066A , 066B + } { #1 } } \DeclareDocumentCommand \setmathdigitfont { O{} m O{} } |