diff options
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx')
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx | 65 |
1 files changed, 53 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx index 2d033c5e5c2..73c54043960 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 -v22.3 +v22.4 The xepersian package provides a convenient interface for typesetting Persian and English texts in LaTeX, using XeTeX @@ -22,7 +22,7 @@ In doing so, please always explain your issue well enough, and always include a minimal working example showing the issue. -Current version release date: 2018/12/12 +Current version release date: 2018/12/14 ______________ Vafa Khalighi @@ -152,7 +152,7 @@ by Vafa Khalighi. \documentclass{ltxdoc} \input{xepersian-doc-preamble.ltx} \hypersetup{% - pdftitle={Source documentation for version 22.3 of the XePersian + pdftitle={Source documentation for version 22.4 of the XePersian package}% } \EnableCrossrefs @@ -171,7 +171,7 @@ by Vafa Khalighi. % \GetFileInfo{\jobname.dtx} % \title{\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}}\\ %\LARGE Persian for \LaTeXe, using {\XeTeX} engine\\[5pt] -%\large Source documentation for \textcolor{blue!65!black}{version 22.3}} +%\large Source documentation for \textcolor{blue!65!black}{version 22.4}} % \author{Vafa Khalighi} %\setcounter{page}{0} %\thispagestyle{empty} @@ -181,7 +181,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}} % %\Large -%Source documentation for \textcolor{blue!65!black}{version 22.3}} +%Source documentation for \textcolor{blue!65!black}{version 22.4}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -215,7 +215,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{10947} +%% \CheckSum{10996} %% \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 @@ -1901,7 +1901,7 @@ by Vafa Khalighi. %\fi % \section{File \texttt{fontspec-xepersian.def}} % \begin{macrocode} -\ProvidesFile{fontspec-xepersian.def}[2018/11/26 v0.2 fontspec changes] +\ProvidesFile{fontspec-xepersian.def}[2018/12/14 v0.3 fontspec changes] \ExplSyntaxOn \cs_new:Npn \__xepersian_error:nx { \msg_error:nnx {xepersian} } \char_set_catcode_space:n {32} @@ -1912,7 +1912,7 @@ by Vafa Khalighi. The font "#1" cannot be loaded by the xepersian package. } { - Select another font and rerun "xelatex". + Select another font and rerun xelatex. } \char_set_catcode_ignore:n {32} \prg_new_conditional:Nnn \__xepersian_font_if_cannot_be_loaded:Nn {p,TF,T,F} @@ -3457,8 +3457,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \section{File \texttt{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersian@version{22.3} -\def\xepersiandate{2018/12/12} +\def\xepersian@version{22.4} +\def\xepersiandate{2018/12/14} \ProvidesPackage{xepersian}[\xepersiandate\space v\xepersian@version\space Persian typesetting in XeLaTeX] \RequirePackage{fontspec} @@ -4272,7 +4272,7 @@ Persian typesetting in XeLaTeX] \newcommand*{\@xepersian@pdfcustomproperties}{% This is the xepersian package, Version \xepersian@version, - Released December 12, 2018. + Released December 14, 2018. } \newcommand\twocolumnstableofcontents{% @@ -5859,7 +5859,7 @@ indexblock environment may only appear inside frontpage environment. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xepersian-mathsdigitspec} - [2018/01/01 v1.1.5 Unicode Persian maths digits in XeLaTeX] + [2018/12/14 v1.1.6 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{% @@ -5986,6 +5986,44 @@ indexblock environment may only appear inside frontpage environment. } } +\cs_new:Npn \__xepersian_mathsdigitspec_error:nxx { \msg_error:nnxx {xepersian-mathsdigitspec} } +\cs_new:Nn \__xepersian_mathsdigitspec_msg_new:nnnn + { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } } +\char_set_catcode_space:n {32} +\__xepersian_mathsdigitspec_msg_new:nnnn {xepersian-mathsdigitspec} {char-not-exist} + { + The font "#1" does not contain U+#2. + } + { + Select another font and rerun xelatex. + } +\char_set_catcode_ignore:n {32} + +\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: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + +\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 } } + } + \DeclareDocumentCommand \setmathdigitfont { O{} m O{} } { \__xepersian_main_setmathdigitfont:nn {#1,#3} {#2} @@ -6000,6 +6038,7 @@ indexblock environment may only appear inside frontpage environment. \DeclareSymbolFont{new@mathbf@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathdigitsfamily_tl}{bx}{n} \DeclareSymbolFont{new@mathit@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathdigitsfamily_tl}{m}{it} \DeclareSymbolFont{new@mathrm@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathdigitsfamily_tl}{m}{n} + \__xepersian_mathsdigitspec_char_not_exist_error:n { #2 } \def\persianmathsdigits{% \SetMathCode{`0}{\mathalpha}{OPERATORS}{`0} \SetMathCode{`1}{\mathalpha}{OPERATORS}{`1} @@ -6029,6 +6068,7 @@ indexblock environment may only appear inside frontpage environment. \fontspec_set_family:Nnn \g__xepersian_mathsfdigitfamily_tl {Ligatures=PersianTeX,#1} {#2} \__xepersian_setmathsfdigitfont_hook:nn {#1} {#2} \DeclareSymbolFont{new@mathsf@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathsfdigitfamily_tl}{m}{n} + \__xepersian_mathsdigitspec_char_not_exist_error:n { #2 } \def\persianmathsfdigits{\tl_set_eq:NN \mathsf \new@mathsf} } @@ -6043,6 +6083,7 @@ indexblock environment may only appear inside frontpage environment. \fontspec_set_family:Nnn \g__xepersian_mathttdigitfamily_tl {Ligatures=PersianTeX,#1} {#2} \__xepersian_setmathttdigitfont_hook:nn {#1} {#2} \DeclareSymbolFont{new@mathtt@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathttdigitfamily_tl}{m}{n} + \__xepersian_mathsdigitspec_char_not_exist_error:n { #2 } \def\persianmathttdigits{\tl_set_eq:NN \mathtt \new@mathtt} } |