diff options
author | Norbert Preining <norbert@preining.info> | 2022-02-05 03:00:59 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-02-05 03:00:59 +0000 |
commit | 08ccf305ee79ab8e5ba9d1a8f3d22e74dccedd80 (patch) | |
tree | 814254dfa55b15022a4361ba4e12cccdcdac1f2a /macros/xetex/latex/xepersian | |
parent | b7a48c5e229d2c195b6a32bfd73a1036a31f2df3 (diff) |
CTAN sync 202202050300
Diffstat (limited to 'macros/xetex/latex/xepersian')
-rw-r--r-- | macros/xetex/latex/xepersian/README | 13 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc-basics.ltx | 6 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc-envcs.ltx | 8 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc-intro.ltx | 4 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc-pkgs.ltx | 2 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc-title.ltx | 16 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc.ltx | 2 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian-doc.pdf | bin | 242527 -> 246658 bytes | |||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian.dtx | 279 | ||||
-rw-r--r-- | macros/xetex/latex/xepersian/xepersian.pdf | bin | 757400 -> 765803 bytes |
10 files changed, 228 insertions, 102 deletions
diff --git a/macros/xetex/latex/xepersian/README b/macros/xetex/latex/xepersian/README index 07503c065c..6bcea9c873 100644 --- a/macros/xetex/latex/xepersian/README +++ b/macros/xetex/latex/xepersian/README @@ -1,6 +1,6 @@ ____________________ The XePersian package -v23.2 +v23.3 The xepersian package provides a convenient interface for typesetting Persian and English texts in LaTeX, using XeTeX @@ -16,7 +16,16 @@ please use the issue tracker: In doing so, please always explain your issue well enough, and always include a minimal working example showing the issue. -Current version release date: 2022/02/01 +You may also have conversations, ask questions and post answers +without opening issues using the Discussions space: + + <https://github.com/tex-persian/xepersian/discussions> + +The announcements for the new releases of the package will +also appear in the Discussions space under the Announcements +category. + +Current version release date: 2022/02/04 ___________________________________________ Vafa Khalighi tex-persian@vafa.ac diff --git a/macros/xetex/latex/xepersian/xepersian-doc-basics.ltx b/macros/xetex/latex/xepersian/xepersian-doc-basics.ltx index 9e9ec6cce0..44452ea407 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc-basics.ltx +++ b/macros/xetex/latex/xepersian/xepersian-doc-basics.ltx @@ -1077,8 +1077,8 @@ However there is more; you can localise any other commands/environments you want \tablelasttail{\hline} \begin{supertabular}{lr} \bicsintabular{خطزیرنویسخودکار}{autofootnoterule} -\bicsintabular{اعدادفرمولهاخودکار}{AutoMathsDigits} -\bicsintabular{اعدادفرمولهالاتین}{DefaultMathsDigits} +\bicsintabular{اعدادفرمولهاخودکار}{AutoMathDigits} +\bicsintabular{اعدادفرمولهالاتین}{DefaultMathDigits} \bicsintabular{تعریفقلملاتین}{deflatinfont} \bicsintabular{تعریفقلمپارسی}{defpersianfont} \bicsintabular{کادراچپ}{hboxL} @@ -1096,7 +1096,7 @@ However there is more; you can localise any other commands/environments you want \bicsintabular{پانویسعنوان}{LTRthanks} \bicsintabular{روزپارسی}{persianday} \bicsintabular{قلمپارسی}{persianfont} -\bicsintabular{اعدادفرمولهاپارسی}{PersianMathsDigits} +\bicsintabular{اعدادفرمولهاپارسی}{PersianMathDigits} \bicsintabular{ماهپارسی}{persianmonth} \bicsintabular{سالپارسی}{persianyear} \bicsintabular{علامتچپنقلقولپارسی}{plq} diff --git a/macros/xetex/latex/xepersian/xepersian-doc-envcs.ltx b/macros/xetex/latex/xepersian/xepersian-doc-envcs.ltx index 002d8f380c..0712b5929e 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc-envcs.ltx +++ b/macros/xetex/latex/xepersian/xepersian-doc-envcs.ltx @@ -74,7 +74,7 @@ \end{itemize} \subsection{Things To Know About \Lcs{setmathdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}} \begin{BDef} -\Lcs{DefaultMathsDigits}\quad\Lcs{PersianMathsDigits}\quad\Lcs{AutoMathsDigits} +\Lcs{DefaultMathDigits}\quad\Lcs{PersianMathDigits}\quad\Lcs{AutoMathDigits} \end{BDef} \begin{itemize} \item As we discussed before, \Lcs{setmathdigitfont} will choose the Persian font for digits in math mode. By default, digits in math mode will appear in Persian form. @@ -82,9 +82,9 @@ If you use \Lcs{setmathdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}, then you should know that: \begin{itemize} -\item By default, \Lcs{AutoMathsDigits} is active, which means that in Persian mode, you get Persian digits in math mode and in Latin mode, you get \TeX's default font and digits in math mode. -\item If you use \Lcs{PersianMathsDigits} anywhere, you will overwrite \XePersian's default behaviour and you will always get Persian digits in math mode. -\item If you use \Lcs{DefaultMathsDigits} anywhere, again you will overwrite \XePersian's default behaviour and you will always get \TeX's default font and digits in math mode. +\item By default, \Lcs{AutoMathDigits} is active, which means that in Persian mode, you get Persian digits in math mode and in Latin mode, you get \TeX's default font and digits in math mode. +\item If you use \Lcs{PersianMathDigits} anywhere, you will overwrite \XePersian's default behaviour and you will always get Persian digits in math mode. +\item If you use \Lcs{DefaultMathDigits} anywhere, again you will overwrite \XePersian's default behaviour and you will always get \TeX's default font and digits in math mode. \end{itemize} \end{itemize} \end{document}
\ No newline at end of file diff --git a/macros/xetex/latex/xepersian/xepersian-doc-intro.ltx b/macros/xetex/latex/xepersian/xepersian-doc-intro.ltx index 0f4f219472..e6421f36bc 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc-intro.ltx +++ b/macros/xetex/latex/xepersian/xepersian-doc-intro.ltx @@ -25,7 +25,7 @@ If you use \textsf{\XePersian} package to write any input \TeX\ document, and th * Copyright (c) 2008--2022 Vafa Khalighi * Copyright (c) 2018--2020 bidi-tex GitHub Organization * -* v23.2, 2022/02/01 +* v23.3, 2022/02/04 * * License: LaTeX Project Public License, version * 1.3c or higher (your choice) @@ -34,6 +34,8 @@ If you use \textsf{\XePersian} package to write any input \TeX\ document, and th * * Issue tracker: https://github.com/tex-persian/xepersian/issues * +* Discussions: https://github.com/tex-persian/xepersian/discussions +* * Support Email: tex-persian@vafa.ac * * Primary author of xepersian package: Vafa Khalighi. diff --git a/macros/xetex/latex/xepersian/xepersian-doc-pkgs.ltx b/macros/xetex/latex/xepersian/xepersian-doc-pkgs.ltx index 2df22a0ad2..328d53d617 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc-pkgs.ltx +++ b/macros/xetex/latex/xepersian/xepersian-doc-pkgs.ltx @@ -6,7 +6,7 @@ \subsubsection{Introduction} \textsf{xepersian-magazine} class allows you to create magazines, newspapers and any other types of papers. The output document has a front page and as many inner pages as desired. Articles appear one after another, telling the type, number of columns, heading, subheading, images, author and so forth. It is possible to change the aspect of (almost) everything therefore it is highly customisable. Commands to add different titles, headings and footers are also provided. \subsubsection{Usage} -To create\footnote{For a sample file, please look at \texttt{magazine-sample.tex} in the \textsf{doc} folder} a magazine just load the class as usual\footnote{You also need to load \textsf{graphicx}, \textsf{xunicode} and \textsf{xepersian} packages respectively, after loading the document class and choose fonts for the main text, Latin text and digits in maths formulas. For more detail see \autoref{basics} of the documentation.}, with +To create\footnote{For a sample file, please look at \texttt{magazine-sample.tex} in the \textsf{doc} folder} a magazine just load the class as usual\footnote{You also need to load \textsf{graphicx}, \textsf{xunicode} and \textsf{xepersian} packages respectively, after loading the document class and choose fonts for the main text, Latin text and digits in math formulas. For more detail see \autoref{basics} of the documentation.}, with \begin{BDef} \Lcs{documentclass}\OptArgs\Largb{xepersian-magazine} \end{BDef} diff --git a/macros/xetex/latex/xepersian/xepersian-doc-title.ltx b/macros/xetex/latex/xepersian/xepersian-doc-title.ltx index 51011e39b9..3cfd1346fa 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc-title.ltx +++ b/macros/xetex/latex/xepersian/xepersian-doc-title.ltx @@ -3,7 +3,7 @@ \begin{document} \title{\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}}\\ \LARGE Persian for \LaTeXe, using {\XeTeX} engine\\[5pt] -\large User documentation for \textcolor{blue!65!black}{version 23.2}} +\large User documentation for \textcolor{blue!65!black}{version 23.3}} \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}\\ \url{tex-persian@vafa.ac}} \setcounter{page}{0} @@ -14,7 +14,7 @@ \textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}} \Large -User documentation for \textcolor{blue!65!black}{version 23.2}} +User documentation for \textcolor{blue!65!black}{version 23.3}} \vskip 0pt plus 3fill \textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -30,6 +30,18 @@ or ask for any new features, or suggest any improvements, or ask any questions a \medskip In doing so, please always explain your issue well enough, and always include a minimal working example showing the issue. + +\bigskip +You may also have conversations, ask questions and post answers +without opening issues using the Discussions space: + +\medskip + \centerline{\url{https://github.com/tex-persian/xepersian/discussions}} + +\medskip +The announcements for the new releases of the package will +also appear in the Discussions space under the Announcements +category. \end{minipage} }} diff --git a/macros/xetex/latex/xepersian/xepersian-doc.ltx b/macros/xetex/latex/xepersian/xepersian-doc.ltx index 5cd43a84e7..e1058567db 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc.ltx +++ b/macros/xetex/latex/xepersian/xepersian-doc.ltx @@ -1,7 +1,7 @@ \documentclass{ltxdoc} \input{xepersian-doc-preamble.ltx} \hypersetup{% - pdftitle={User documentation for version 23.2 of the XePersian + pdftitle={User documentation for version 23.3 of the XePersian package}% } \begin{document} diff --git a/macros/xetex/latex/xepersian/xepersian-doc.pdf b/macros/xetex/latex/xepersian/xepersian-doc.pdf Binary files differindex 1f79bb2306..650074eee7 100644 --- a/macros/xetex/latex/xepersian/xepersian-doc.pdf +++ b/macros/xetex/latex/xepersian/xepersian-doc.pdf diff --git a/macros/xetex/latex/xepersian/xepersian.dtx b/macros/xetex/latex/xepersian/xepersian.dtx index fb740c00a5..cef2486b84 100644 --- a/macros/xetex/latex/xepersian/xepersian.dtx +++ b/macros/xetex/latex/xepersian/xepersian.dtx @@ -5,7 +5,7 @@ %<*readme> ____________________ The XePersian package -v23.2 +v23.3 The xepersian package provides a convenient interface for typesetting Persian and English texts in LaTeX, using XeTeX @@ -20,9 +20,18 @@ please use the issue tracker: In doing so, please always explain your issue well enough, and always include a minimal working example showing the issue. - -Current version release date: 2022/02/01 +You may also have conversations, ask questions and post answers +without opening issues using the Discussions space: + + <https://github.com/tex-persian/xepersian/discussions> + +The announcements for the new releases of the package will +also appear in the Discussions space under the Announcements +category. + + +Current version release date: 2022/02/04 ___________________________________________ Vafa Khalighi tex-persian@vafa.ac @@ -117,6 +126,7 @@ by Vafa Khalighi. } \usepostamble\mapping@postamble \generate{\file{persian-tex-text.map}{\from{\jobname.dtx}{persian-tex-text.map}}} +\generate{\file{persian-tex-text-nonumbers.map}{\from{\jobname.dtx}{persian-tex-text-nonumbers.map}}} \let\MetaPrefix\DoubleperCent \usepostamble\org@postamble \generate{\file{rapport1-xepersian.def}{\from{\jobname.dtx}{table,rapport1-xepersian.def}}} @@ -133,7 +143,7 @@ by Vafa Khalighi. \generate{\file{varioref-xepersian.def}{\from{\jobname.dtx}{table,varioref-xepersian.def}}} \generate{\file{xepersian.sty}{\from{\jobname.dtx}{table,xepersian.sty}}} \generate{\file{xepersian-magazine.cls}{\from{\jobname.dtx}{table,xepersian-magazine.cls}}} -\generate{\file{xepersian-mathsdigitspec.sty}{\from{\jobname.dtx}{table,xepersian-mathsdigitspec.sty}}} +\generate{\file{xepersian-mathdigitspec.sty}{\from{\jobname.dtx}{table,xepersian-mathdigitspec.sty}}} \generate{\file{xepersian-multiplechoice.sty}{\from{\jobname.dtx}{table,xepersian-multiplechoice.sty}}} \generate{\file{xepersian-persiancal.sty}{\from{\jobname.dtx}{table,xepersian-persiancal.sty}}} %</batchfile> @@ -158,7 +168,7 @@ by Vafa Khalighi. \documentclass{ltxdoc} \input{xepersian-doc-preamble.ltx} \hypersetup{% - pdftitle={Source documentation for version 23.2 of the XePersian + pdftitle={Source documentation for version 23.3 of the XePersian package}% } \EnableCrossrefs @@ -177,7 +187,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 23.2}} +%\large Source documentation for \textcolor{blue!65!black}{version 23.3}} % \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}\\ % \url{tex-persian@vafa.ac}} %\setcounter{page}{0} @@ -188,7 +198,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{\XePersian} \textit{Package}} % %\Large -%Source documentation for \textcolor{blue!65!black}{version 23.2}} +%Source documentation for \textcolor{blue!65!black}{version 23.3}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -204,6 +214,18 @@ by Vafa Khalighi. %\medskip %In doing so, please always explain your issue well enough, and always include %a minimal working example showing the issue. +% +%\bigskip +%You may also have conversations, ask questions and post answers +%without opening issues using the Discussions space: +% +%\medskip +% \centerline{\url{https://github.com/tex-persian/xepersian/discussions}} +% +%\medskip +%The announcements for the new releases of the package will +%also appear in the Discussions space under the Announcements +%category. %\end{minipage} %}} % @@ -224,7 +246,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{10887} +%% \CheckSum{10959} %% \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 @@ -1512,8 +1534,8 @@ by Vafa Khalighi. % \begin{macrocode} \ProvidesFile{xepersian-localise-commands-xepersian.def}[2012/07/25 v0.2 Persian localisation of XePersian commands] \eqcommand{خطزیرنویسخودکار}{autofootnoterule} -\eqcommand{اعدادفرمولهاخودکار}{AutoMathsDigits} -\eqcommand{اعدادفرمولهالاتین}{DefaultMathsDigits} +\eqcommand{اعدادفرمولهاخودکار}{AutoMathDigits} +\eqcommand{اعدادفرمولهالاتین}{DefaultMathDigits} \eqcommand{معادل@کلید}{keyval@eq@alias@key} \eqcommand{تعریفقلملاتین}{deflatinfont} \eqcommand{تعریفقلمپارسی}{defpersianfont} @@ -1531,7 +1553,7 @@ by Vafa Khalighi. \eqcommand{پانویسعنوان}{LTRthanks} \eqcommand{روزپارسی}{persianday} \eqcommand{قلمپارسی}{persianfont} -\eqcommand{اعدادفرمولهاپارسی}{PersianMathsDigits} +\eqcommand{اعدادفرمولهاپارسی}{PersianMathDigits} \eqcommand{ماهپارسی}{persianmonth} \eqcommand{سالپارسی}{persianyear} \eqcommand{علامتچپنقلقولپارسی}{plq} @@ -3091,6 +3113,39 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \end{macrocode} % \iffalse %</persian-tex-text.map> +%<*persian-tex-text-nonumbers.map> +%\fi +% \section{File \texttt{persian-tex-text-nonumbers.map}} +% \begin{macrocode} +LHSName "persian-TeX-text-nonumbers" +RHSName "Unicode" + +pass(Unicode) +U+002C <> U+060C ; comma > arabic comma +U+003F <> U+061F ; question mark -> arabic qm +U+003B <> U+061B ; semicolon -> arabic semicolon + +; ligatures from Knuth's original CMR fonts +U+002D U+002D <> U+2013 ; -- -> en dash +U+002D U+002D U+002D <> U+2014 ; --- -> em dash + +U+0027 <> U+2019 ; ' -> right single quote +U+0027 U+0027 <> U+201D ; '' -> right double quote +U+0022 > U+201D ; " -> right double quote + +U+0060 <> U+2018 ; ` -> left single quote +U+0060 U+0060 <> U+201C ; `` -> left double quote + +U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam +U+003F U+0060 <> U+00BF ; ?` -> inverted question + +; additions supported in T1 encoding +U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK +U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET +U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET +% \end{macrocode} +% \iffalse +%</persian-tex-text-nonumbers.map> %<*rapport1-xepersian.def> %\fi % \section{File \texttt{rapport1-xepersian.def}} @@ -3423,13 +3478,13 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \section{File \texttt{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersian@version{23.2} -\def\xepersiandate{2022/02/01} +\def\xepersian@version{23.3} +\def\xepersiandate{2022/02/04} \ProvidesPackage{xepersian}[\xepersiandate\space v\xepersian@version\space Persian typesetting in XeLaTeX] \RequirePackage{fontspec} \RequirePackage{xepersian-persiancal} -\RequirePackage{xepersian-mathsdigitspec} +\RequirePackage{xepersian-mathdigitspec} \RequirePackage{bidi} \edef\@xepersian@info{****************************************************^^J% * ^^J% @@ -3451,6 +3506,8 @@ Persian typesetting in XeLaTeX] * ^^J% * Issue tracker: https://github.com/tex-persian/xepersian/issues^^J% * ^^J% +* Discussions: https://github.com/tex-persian/xepersian/discussions^^J% +* ^^J% * Support Email: tex-persian@vafa.ac^^J% * ^^J% * Primary author of xepersian package: Vafa Khalighi.^^J% @@ -3524,6 +3581,21 @@ Persian typesetting in XeLaTeX] \tl_set:Nn \l__fontspec_mapping_tl { persian-tex-text } } } + +\keys_define:nn {fontspec-opentype} + { + Ligatures / PersianTeXNoNumbers .code:n = { \tl_set:Nn \l__fontspec_mapping_tl {persian-tex-text-nonumbers} }, + Ligatures / PersianTeXNoNumbersOff .code:n = { \tl_clear:N \l__fontspec_mapping_tl }, + Ligatures / PersianTeXNoNumbersReset .code:n = { \tl_clear:N \l__fontspec_mapping_tl }, + } + +\keys_define:nn {fontspec-aat} + { + Ligatures / PersianTeXNoNumbers .code:n = + { + \tl_set:Nn \l__fontspec_mapping_tl { persian-tex-text-nonumbers } + } + } \DeclareDocumentCommand \settextfont { O{} m O{} } { @@ -3532,7 +3604,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_settextfont:nn { - \fontspec_set_family:Nnn \l__xepersian_persianfont_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_persianfont_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \rmdefault \l__xepersian_persianfont_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \persianfont } { @@ -3556,7 +3628,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_settextdigitfont:nn { - \fontspec_set_family:Nnn \l__xepersian_textdigitfont_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_textdigitfont_family_tl {Ligatures=PersianTeX,#1} {#2} \use:x { \exp_not:n { \DeclareRobustCommand \xepersian@textdigitfont } @@ -3636,7 +3708,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_defpersianfont:NnnN { - \fontspec_set_family:cnn { l__xepersian_ \cs_to_str:N #1 _family_tl } {Script=Persian,Ligatures=PersianTeX,#2} {#3} + \fontspec_set_family:cnn { l__xepersian_ \cs_to_str:N #1 _family_tl } {Ligatures=PersianTeX,#2} {#3} \use:x { \exp_not:N #4 \exp_not:N #1 {} @@ -3710,7 +3782,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_setpersiansansfont:nn { - \fontspec_set_family:Nnn \l__xepersian_persiansffamily_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_persiansffamily_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \persiansfdefault \l__xepersian_persiansffamily_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \persiansffamily } { @@ -3734,7 +3806,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_setpersianmonofont:nn { - \fontspec_set_family:Nnn \l__xepersian_persianttfamily_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_persianttfamily_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \persianttdefault \l__xepersian_persianttfamily_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \persianttfamily } { @@ -3758,7 +3830,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_setnavarfont:nn { - \fontspec_set_family:Nnn \l__xepersian_navarfamily_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_navarfamily_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \navardefault \l__xepersian_navarfamily_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \navarfamily } { @@ -3782,7 +3854,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_setpookfont:nn { - \fontspec_set_family:Nnn \l__xepersian_pookfamily_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_pookfamily_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \pookdefault \l__xepersian_pookfamily_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \pookfamily } { @@ -3806,7 +3878,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_setsayehfont:nn { - \fontspec_set_family:Nnn \l__xepersian_sayehfamily_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_sayehfamily_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \sayehdefault \l__xepersian_sayehfamily_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \sayehfamily } { @@ -3830,7 +3902,7 @@ Persian typesetting in XeLaTeX] } \cs_new:Nn \__xepersian_main_setiranicfont:nn { - \fontspec_set_family:Nnn \l__xepersian_iranicfamily_family_tl {Script=Persian,Ligatures=PersianTeX,#1} {#2} + \fontspec_set_family:Nnn \l__xepersian_iranicfamily_family_tl {Ligatures=PersianTeX,#1} {#2} \tl_set_eq:NN \iranicdefault \l__xepersian_iranicfamily_family_tl \use:x { \exp_not:n { \DeclareRobustCommand \iranicfamily } { @@ -4258,7 +4330,7 @@ Persian typesetting in XeLaTeX] \newcommand*{\@xepersian@pdfcustomproperties}{% This is the xepersian package, Version \xepersian@version, - Released February 1, 2022. + Released February 27, 2022. } \newcommand\twocolumnstableofcontents{% @@ -4632,27 +4704,27 @@ number is 999,999,999.}% \define@choicekey{xepersian.sty}{mathdigits}[\xepersian@tempa\xepersian@tempb]{automatic,default,persian}{% \ifcase\xepersian@tempb\relax - \AutoMathsDigits + \AutoMathDigits \or - \DefaultMathsDigits + \DefaultMathDigits \or - \PersianMathsDigits + \PersianMathDigits \fi} \define@choicekey{xepersian.sty}{inlinemathdigits}[\xepersian@tempa\xepersian@tempb]{automatic,default,persian}{% \ifcase\xepersian@tempb\relax - \AutoInlineMathsDigits + \AutoInlineMathDigits \or - \DefaultInlineMathsDigits + \DefaultInlineMathDigits \or - \PersianInlineMathsDigits + \PersianInlineMathDigits \fi} \define@choicekey{xepersian.sty}{displaymathdigits}[\xepersian@tempa\xepersian@tempb]{automatic,default,persian}{% \ifcase\xepersian@tempb\relax - \AutoDisplayMathsDigits + \AutoDisplayMathDigits \or - \DefaultDisplayMathsDigits + \DefaultDisplayMathDigits \or - \PersianDisplayMathsDigits + \PersianDisplayMathDigits \fi} \define@choicekey{xepersian.sty}{RTLdocument}[\xepersian@tempa\xepersian@tempb]{on,off}[on]{% \ifcase\xepersian@tempb\relax @@ -5815,13 +5887,13 @@ indexblock environment may only appear inside frontpage environment. % \end{macrocode} % \iffalse %</xepersian-magazine.cls> -%<*xepersian-mathsdigitspec.sty> +%<*xepersian-mathdigitspec.sty> %\fi -% \section{File \texttt{xepersian-mathsdigitspec.sty}} +% \section{File \texttt{xepersian-mathdigitspec.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{xepersian-mathsdigitspec} - [2022/02/01 v1.1.8 Unicode Persian maths digits in XeLaTeX] +\ProvidesPackage{xepersian-mathdigitspec} + [2022/02/04 v1.1.9 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{% @@ -5896,7 +5968,7 @@ indexblock environment may only appear inside frontpage environment. \tl_remove_once:Nn \@preamblecmds {\do#1} } \ExplSyntaxOff -\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}} +\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathdigitspec}{#1}} \newcommand\SetMathCode[4]{% \Umathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax} \newcommand\SetMathCharDef[4]{% @@ -5949,11 +6021,11 @@ 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 +\cs_new:Npn \__xepersian_mathdigitspec_error:nxx { \msg_error:nnxx {xepersian-mathdigitspec} } +\cs_new:Nn \__xepersian_mathdigitspec_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} +\__xepersian_mathdigitspec_msg_new:nnnn {xepersian-mathdigitspec} {char-not-exist} { The font "#1" does not contain U+#2. } @@ -5963,7 +6035,7 @@ indexblock environment may only appear inside frontpage environment. \char_set_catcode_ignore:n {32} %\__kernel_primitive:NN \iffontchar \tex_iffontchar:D -\prg_new_conditional:Nnn \__xepersian_mathsdigitspec_primitive_font_char_if_exist:n {p,TF,T,F} +\prg_new_conditional:Nnn \__xepersian_mathdigitspec_primitive_font_char_if_exist:n {p,TF,T,F} { \tex_iffontchar:D \l_fontspec_font "#1 \scan_stop: \prg_return_true: @@ -5972,35 +6044,35 @@ indexblock environment may only appear inside frontpage environment. \fi: } -\clist_new:N \l_xepersian_mathsdigitspec_char_clist +\clist_new:N \l_xepersian_mathdigitspec_char_clist -\cs_new:Nn \__xepersian_mathsdigitspec_char_set_not_exist_error:nn +\cs_new:Nn \__xepersian_mathdigitspec_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 } } + \clist_set:Nn \l_xepersian_mathdigitspec_char_clist { #1 } + \clist_map_inline:Nn \l_xepersian_mathdigitspec_char_clist { + \__xepersian_mathdigitspec_primitive_font_char_if_exist:nF { ##1 }{ \__xepersian_mathdigitspec_error:nxx {char-not-exist} { #2 } { ##1 } } } } -\cs_new:Nn \__xepersian_mathsdigitspec_char_prepend_not_exist_error:nn +\cs_new:Nn \__xepersian_mathdigitspec_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 } } + \clist_put_left:Nn \l_xepersian_mathdigitspec_char_clist { #1 } + \clist_map_inline:Nn \l_xepersian_mathdigitspec_char_clist { + \__xepersian_mathdigitspec_primitive_font_char_if_exist:nF { ##1 }{ \__xepersian_mathdigitspec_error:nxx {char-not-exist} { #2 } { ##1 } } } } -\cs_new:Nn \__xepersian_mathsdigitspec_char_append_not_exist_error:nn +\cs_new:Nn \__xepersian_mathdigitspec_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 } } + \clist_put_right:Nn \l_xepersian_mathdigitspec_char_clist { #1 } + \clist_map_inline:Nn \l_xepersian_mathdigitspec_char_clist { + \__xepersian_mathdigitspec_primitive_font_char_if_exist:nF { ##1 }{ \__xepersian_mathdigitspec_error:nxx {char-not-exist} { #2 } { ##1 } } } } -\cs_new:Nn \__xepersian_mathsdigitspec_char_not_exist_error:n +\cs_new:Nn \__xepersian_mathdigitspec_char_not_exist_error:n { - \__xepersian_mathsdigitspec_char_set_not_exist_error:nn { + \__xepersian_mathdigitspec_char_set_not_exist_error:nn { 06F0 , 06F1 , 06F2 , 06F3 , 06F4 , 06F5 , 06F6 , 06F7 , 06F8 , 06F9 , 066A , 066B } { #1 } @@ -6015,13 +6087,13 @@ indexblock environment may only appear inside frontpage environment. \let\glb@currsize\relax \fontspec_set_family:Nnn \g__xepersian_mathdigitsfamily_tl {Ligatures=PersianTeX,#1} {#2} \__xepersian_setmathdigitfont_hook:nn {#1} {#2} - \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'} + \xepersian@PackageInfo{Defining the default Persian math digits font as '#2'} \DeclareSymbolFont{OPERATORS} {\g_fontspec_encoding_tl}{\g__xepersian_mathdigitsfamily_tl} {m}{n} \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{% + \__xepersian_mathdigitspec_char_not_exist_error:n { #2 } + \def\persianmathdigits{% \SetMathCode{`0}{\mathalpha}{OPERATORS}{`0} \SetMathCode{`1}{\mathalpha}{OPERATORS}{`1} \SetMathCode{`2}{\mathalpha}{OPERATORS}{`2} @@ -6050,7 +6122,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 } + \__xepersian_mathdigitspec_char_not_exist_error:n { #2 } \def\persianmathsfdigits{\tl_set_eq:NN \mathsf \new@mathsf} } @@ -6065,7 +6137,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 } + \__xepersian_mathdigitspec_char_not_exist_error:n { #2 } \def\persianmathttdigits{\tl_set_eq:NN \mathtt \new@mathtt} } @@ -6105,47 +6177,78 @@ indexblock environment may only appear inside frontpage environment. \fi} \mathcode`.="8000\relax \def\ZifferLeer{\ifx\decimalseparator\undefined .\else \decimalseparator\fi} -\def\DefaultInlineMathsDigits{\def\SetInlineMathsDigits{}} -\def\DefaultDisplayMathsDigits{\def\SetDisplayMathsDigits{}} -\def\DefaultMathsDigits{% - \DefaultInlineMathsDigits% - \DefaultDisplayMathsDigits% -} -\def\PersianInlineMathsDigits{\def\SetInlineMathsDigits{% -\ifx\persianmathsdigits\undefined\else\persianmathsdigits\fi% +\def\DefaultZifferLeer{.} +\def\DefaultInlineMathDigits{\def\SetInlineMathDigits{}} +\def\DefaultDisplayMathDigits{\def\SetDisplayMathDigits{}} +\def\DefaultMathDigits{% + \DefaultInlineMathDigits% + \DefaultDisplayMathDigits% +} +\def\PersianInlineMathDigits{\def\SetInlineMathDigits{% +\ifx\persianmathdigits\undefined\else\persianmathdigits\fi% \ifx\persianmathsfdigits\undefined\else\persianmathsfdigits\fi% \ifx\persianmathttdigits\undefined\else\persianmathttdigits\fi}} -\def\PersianDisplayMathsDigits{\def\SetDisplayMathsDigits{% -\ifx\persianmathsdigits\undefined\else\persianmathsdigits\fi% +\def\PersianDisplayMathDigits{\def\SetDisplayMathDigits{% +\ifx\persianmathdigits\undefined\else\persianmathdigits\fi% \ifx\persianmathsfdigits\undefined\else\persianmathsfdigits\fi% \ifx\persianmathttdigits\undefined\else\persianmathttdigits\fi}} -\def\PersianMathsDigits{% - \PersianInlineMathsDigits% - \PersianDisplayMathsDigits% +\def\PersianMathDigits{% + \PersianInlineMathDigits% + \PersianDisplayMathDigits% } -\def\AutoInlineMathsDigits{\def\SetInlineMathsDigits{% -\ifx\persianmathsdigits\undefined\else\if@nonlatin\persianmathsdigits\fi\fi% +\def\AutoInlineMathDigits{\def\SetInlineMathDigits{% +\ifx\persianmathdigits\undefined\else\if@nonlatin\persianmathdigits\fi\fi% \ifx\persianmathsfdigits\undefined\else\if@nonlatin\persianmathsfdigits\fi\fi% \ifx\persianmathttdigits\undefined\else\if@nonlatin\persianmathttdigits\fi\fi}} -\def\AutoDisplayMathsDigits{\def\SetDisplayMathsDigits{% -\ifx\persianmathsdigits\undefined\else\if@nonlatin\persianmathsdigits\fi\fi% +\def\AutoDisplayMathDigits{\def\SetDisplayMathDigits{% +\ifx\persianmathdigits\undefined\else\if@nonlatin\persianmathdigits\fi\fi% \ifx\persianmathsfdigits\undefined\else\if@nonlatin\persianmathsfdigits\fi\fi% \ifx\persianmathttdigits\undefined\else\if@nonlatin\persianmathttdigits\fi\fi}} -\def\AutoMathsDigits{% - \AutoInlineMathsDigits% - \AutoDisplayMathsDigits% +\def\AutoMathDigits{% + \AutoInlineMathDigits% + \AutoDisplayMathDigits% } -\AutoMathsDigits -\everymath\expandafter{\the\everymath\SetInlineMathsDigits% - \let\SetDisplayMathsDigits\relax% +\AutoMathDigits +\everymath\expandafter{\the\everymath\SetInlineMathDigits% + \let\SetDisplayMathDigits\relax% } \everydisplay\expandafter{% - \the\everydisplay\SetDisplayMathsDigits% - \let\SetInlineMathsDigits\relax% + \the\everydisplay\SetDisplayMathDigits% + \let\SetInlineMathDigits\relax% } + +\ExplSyntaxOn +\cs_new_eq:NN \orig_ZifferLeer \ZifferLeer + +\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 \mathbf \orig_mathbf:n + \tl_set_eq:NN \mathit \orig_mathit:n + \tl_set_eq:NN \mathrm \orig_mathrm:n + \tl_set_eq:NN \mathsf \orig_mathsf:n + \tl_set_eq:NN \mathtt \orig_mathtt:n +} + +\NewDocumentCommand \SwitchToPersianMathDigits { } { + \int_step_inline:nnnn { `0 } { \c_one_int } { `9 } { + \SetMathCode{##1}{\mathalpha}{OPERATORS}{##1} + } + \SetMathCode{`\%}{\mathbin}{OPERATORS}{`٪} + \tl_set_eq:NN \ZifferLeer \orig_ZifferLeer + \tl_set_eq:NN \mathbf \new@mathbf + \tl_set_eq:NN \mathit \new@mathit + \tl_set_eq:NN \mathrm \new@mathrm + \tl_set_eq:NN \mathsf \new@mathsf + \tl_set_eq:NN \mathtt \new@mathtt +} +\ExplSyntaxOff % \end{macrocode} % \iffalse -%</xepersian-mathsdigitspec.sty> +%</xepersian-mathdigitspec.sty> %<*xepersian-multiplechoice.sty> %\fi % \section{File \texttt{xepersian-multiplechoice.sty}} diff --git a/macros/xetex/latex/xepersian/xepersian.pdf b/macros/xetex/latex/xepersian/xepersian.pdf Binary files differindex 3f50a1e4f2..a85b285515 100644 --- a/macros/xetex/latex/xepersian/xepersian.pdf +++ b/macros/xetex/latex/xepersian/xepersian.pdf |