diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx | 128 | ||||
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.ins | 4 |
2 files changed, 96 insertions, 36 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx index a55998d739c..b8f157802c0 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.0 +v20.2 XePersian is a package written for XeLaTeX that allows users to typeset Persian easily. @@ -28,12 +28,12 @@ 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: 2017/12/28 +Current version release date: 2018/01/02 ______________ Vafa Khalighi persian-tex@tug.org -Copyright (c) 2008--2017 +Copyright (c) 2008--2018 Distributed under the LaTeX Project Public License It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of @@ -53,7 +53,7 @@ by Vafa Khalighi. \preamble __________________________________________________ - Copyright (c) 2008--2017 Vafa Khalighi <persian-tex@tug.org> + Copyright (c) 2008--2018 Vafa Khalighi <persian-tex@tug.org> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of @@ -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.0}} +%\large Documentation for \textcolor{blue!65!black}{version 20.2}} % \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.0}} +%Documentation for \textcolor{blue!65!black}{version 20.2}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -308,7 +308,7 @@ by Vafa Khalighi. % %\vskip 0pt plus 3fill % -%Copyright (c) 2008--2017 Vafa Khalighi +%Copyright (c) 2008--2018 Vafa Khalighi % %\medskip %Permission is granted to distribute and/or modify \emph{both the documentation and the code} under the conditions of the \LaTeX{} Project Public License, either version 1.3c of this license or (at your option) any later version. @@ -337,9 +337,9 @@ by Vafa Khalighi. %* typesetting, using fonts provided in the %* distribution. %* -%* Copyright (c) 2008--2017 Vafa Khalighi +%* Copyright (c) 2008--2018 Vafa Khalighi %* -%* v20.0, 2017/12/28 +%* v20.2, 2018/01/02 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1463,7 +1463,7 @@ by Vafa Khalighi. %\bicsintabular{علامتبین}{SepMark} %\bicsintabular{بگذارمرجوعاتعادی}{setdefaultbibitems} %\bicsintabular{بگذاردرحاشیهعادی}{setdefaultmarginpar} -%\bicsintabular{گزینشقلماعدادفرمولها}{setdigitfont} +%\bicsintabular{گزینشقلماعدادفرمولها}{setmathdigitfont} %\bicsintabular{بگذارزیرنویسچپ}{setfootnoteLR} %\bicsintabular{بگذارزیرنویسراست}{setfootnoteRL} %\bicsintabular{گزینشقلملاتینمتن}{setlatintextfont} @@ -1749,7 +1749,7 @@ by Vafa Khalighi. %\begin{BDef} %\Lcs{settextfont}\OptArgs\Largb{\Larga{font name}}\\ %\Lcs{setlatintextfont}\OptArgs\Largb{\Larga{font name}}\\ -%\Lcs{setdigitfont}\OptArgs\Largb{\Larga{font name}}\\ +%\Lcs{setmathdigitfont}\OptArgs\Largb{\Larga{font name}}\\ %\Lcs{setmathsfdigitfont}\OptArgs\Largb{\Larga{font name}}\\ %\Lcs{setmathttdigitfont}\OptArgs\Largb{\Larga{font name}} %\end{BDef} @@ -1757,7 +1757,7 @@ by Vafa Khalighi. %\item Options in any font command in this documentation are anything that \textsf{fontspec} package provides as the option of loading fonts, except \texttt{Script} and \texttt{Mapping}. %\item \Lcs{settextfont} will choose the default font for Persian texts of your document. %\item \Lcs{setlatintextfont} will choose the font for Latin texts of your document. If you do not use this command at all, the default \TeX\ font (fonts used in this documentation) will be used for Latin texts of your document. -%\item \Lcs{setdigitfont} will choose the Persian font for digits in math mode. By default, digits in math mode will appear in Persian form. +%\item \Lcs{setmathdigitfont} will choose the Persian font for digits in math mode. By default, digits in math mode will appear in Persian form. %\item \Lcs{setmathsfdigitfont} will choose the Persian font for digits in math mode inside \Lcs{mathsf}. By using this command, digits in math mode inside \Lcs{mathsf} will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode inside \Lcs{mathsf} and digits appear in their original form (Western). %\item \Lcs{setmathttdigitfont} will choose the Persian font for digits in math mode inside \Lcs{mathtt}. By using this command, digits in math mode inside \Lcs{mathtt} will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode inside \Lcs{mathtt} and digits appear in their original form (Western). %\end{itemize} @@ -1891,15 +1891,15 @@ by Vafa Khalighi. %\item For \texttt{adadi} and \texttt{tartibi} counters, if you give an integer less than 0 (a negative integer), then \texttt{adadi} and \texttt{tartibi} counters return \textbf{adadi} and \textbf{tartibi} form of the integer 0, respectively. %\item \Lcs{harfinumeral} returns the \textbf{harfi} form of \Larga{integer}, where $1\leq integer\leq32$ and \Lcs{adadinumeral}, and \Lcs{tartibinumeral} return \textbf{adadi}, and \textbf{tartibi} form of \Larga{integer} respectively, where $0\leq integer\leq 999,999,999$. %\end{itemize} -%\subsection{Things To Know About \Lcs{setdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}} +%\subsection{Things To Know About \Lcs{setmathdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}} %\begin{BDef} %\Lcs{DefaultMathsDigits}\quad\Lcs{PersianMathsDigits}\quad\Lcs{AutoMathsDigits} %\end{BDef} %\begin{itemize} -% \item As we discussed before, \Lcs{setdigitfont} will choose the Persian font for digits in math mode. By default, digits in math mode will appear in Persian form. +% \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. %\item As we discussed before, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont} will choose the Persian sans serif and typewriter fonts for digits in math mode. By using this command, digits in math mode will appear in Persian form and if you do not use this command at all, you will get default \TeX\ font for digits in math mode and digits appear in their original form (Western). % -%If you use \Lcs{setdigitfont}, \Lcs{setmathsfdigitfont}, and \Lcs{setmathttdigitfont}, then you should know that: +%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. @@ -2361,7 +2361,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{10317} +%% \CheckSum{10449} %% \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 @@ -3684,7 +3684,7 @@ by Vafa Khalighi. \eqcommand{علامتبین}{SepMark} \eqcommand{بگذارمرجوعاتعادی}{setdefaultbibitems} \eqcommand{بگذاردرحاشیهعادی}{setdefaultmarginpar} -\eqcommand{گزینشقلماعدادفرمولها}{setdigitfont} +\eqcommand{گزینشقلماعدادفرمولها}{setmathdigitfont} \eqcommand{بگذارزیرنویسچپ}{setfootnoteLR} \eqcommand{بگذارزیرنویسراست}{setfootnoteRL} \eqcommand{گزینشقلملاتینمتن}{setlatintextfont} @@ -5289,8 +5289,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \subsection{\textsf{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersianversion{v20.0} -\def\xepersiandate{2017/12/28} +\def\xepersianversion{v20.2} +\def\xepersiandate{2018/01/02} \ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space Persian typesetting in XeLaTeX] \RequirePackage{fontspec} @@ -5305,7 +5305,7 @@ Persian typesetting in XeLaTeX] * typesetting, using fonts provided in the^^J% * distribution.^^J% * ^^J% -* Copyright (c) 2008--2017 Vafa Khalighi^^J% +* Copyright (c) 2008--2018 Vafa Khalighi^^J% * ^^J% * \xepersianversion, \xepersiandate^^J% * ^^J% @@ -5392,6 +5392,49 @@ Persian typesetting in XeLaTeX] \normalfont \ignorespaces } + +\DeclareDocumentCommand \settextdigitfont { O{} m O{} } + { + \__xepersian_main_settextdigitfont:nnn {#1} {#2} {#3} + } +\cs_set:Nn \__xepersian_main_settextdigitfont:nnn + { + \fontspec_set_family:Nnn \g__xepersian_textdigitfont_family {Mapping=parsidigits,#1,#3} {#2} + \use:x + { + \exp_not:n { \DeclareRobustCommand \xepersian@textdigitfont } + { + \exp_not:N \fontfamily { \g__xepersian_textdigitfont_family } + \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl } + \exp_not:N \selectfont + } + } + \XeTeXinterchartoks \e@alloc@intercharclass@top \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} + \XeTeXinterchartoks \bidi@digits@charclass \e@alloc@intercharclass@top = {\xepersian@@stop@switch@textdigitfont} + \XeTeXinterchartoks \z@ \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} + \XeTeXinterchartoks \bidi@digits@charclass \z@ = {\xepersian@@stop@switch@textdigitfont} + \XeTeXinterchartoks \bidi@digits@charclass \bidi@sepmark@charclass = {\DigitsDotDashInterCharToks\xepersian@@stop@switch@textdigitfont} + \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks\xepersian@@start@switch@textdigitfont} + \if@bidi@csundef{xepersian@D}{}{% + \XeTeXinterchartoks \xepersian@D \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} + \XeTeXinterchartoks \bidi@digits@charclass \xepersian@D = {\xepersian@@stop@switch@textdigitfont} + \XeTeXinterchartoks \xepersian@L \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} + \XeTeXinterchartoks \bidi@digits@charclass \xepersian@L = {\xepersian@@stop@switch@textdigitfont} + \XeTeXinterchartoks \xepersian@A \bidi@digits@charclass = {\xepersian@@start@switch@textdigitfont} + \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} + } + \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} + } + +\DeclareDocumentCommand \setdigitfont { O{} m O{} } + { + \__xepersian_main_settextdigitfont:nnn {#1} {#2} {#3} + \__xepersian_main_setmathdigitfont:nnn {#1} {#2} {#3} + } + \DeclareDocumentCommand \setlatintextfont { O{} m O{} } { @@ -5724,6 +5767,13 @@ Persian typesetting in XeLaTeX] % \fi } +\newif\if@@textdigitfont@on + +\newcommand{\TextDigitFontOn}{\@@textdigitfont@ontrue} +\newcommand{\TextDigitFontOff}{\@@textdigitfont@onfalse} + +\TextDigitFontOn + \newcommand*\xepersian@setlength[4]{% \ifdim #2<\ifdim #2=\z@ \z@ \else \p@\fi \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi @@ -6554,6 +6604,16 @@ number is 999,999,999.}% \fi} +\define@choicekey{xepersian.sty}{debugtextdigitfont}[\xepersian@tempa\xepersian@tempb]{on,off}[on]{% + \ifcase\xepersian@tempb\relax + \bidi@AtEndPreamble{% + \bidi@patchcmd{\xepersian@@start@switch@textdigitfont}% + {\xepersian@textdigitfont}{\addfontfeature{Color=C71585}}{}{}% + } + \or + \relax + \fi} + \ExecuteOptionsX{% documentdirection=righttoleft, tabledirection=righttoleft, @@ -7516,7 +7576,7 @@ indexblock environment may only appear inside frontpage environment. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xepersian-mathsdigitspec} - [2017/09/02 v1.1.4 Unicode Persian maths digits in XeLaTeX] + [2018/01/01 v1.1.5 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{% @@ -7643,19 +7703,19 @@ indexblock environment may only appear inside frontpage environment. } } -\DeclareDocumentCommand \setdigitfont { O{} m O{} } +\DeclareDocumentCommand \setmathdigitfont { O{} m O{} } { - \__xepersian_main_setdigitfont:nnn {#1} {#2} {#3} + \__xepersian_main_setmathdigitfont:nnn {#1} {#2} {#3} } -\cs_set:Nn \__xepersian_main_setdigitfont:nnn +\cs_set:Nn \__xepersian_main_setmathdigitfont:nnn { \let\glb@currsize\relax - \fontspec_set_family:Nnn \g__xepersian_digitsfamily_tl {Mapping=parsidigits,#1,#3} {#2} + \fontspec_set_family:Nnn \g__xepersian_mathdigitsfamily_tl {Mapping=parsidigits,#1,#3} {#2} \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'} - \DeclareSymbolFont{OPERATORS} {\g_fontspec_encoding_tl}{\g__xepersian_digitsfamily_tl} {m}{n} - \DeclareSymbolFont{new@mathbf@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_digitsfamily_tl}{bx}{n} - \DeclareSymbolFont{new@mathit@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_digitsfamily_tl}{m}{it} - \DeclareSymbolFont{new@mathrm@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_digitsfamily_tl}{m}{n} + \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} \def\persianmathsdigits{% \SetMathCode{`0}{\mathalpha}{OPERATORS}{`0} \SetMathCode{`1}{\mathalpha}{OPERATORS}{`1} @@ -8114,7 +8174,7 @@ indexblock environment may only appear inside frontpage environment. \usepackage{xepersian} \settextfont[Scale=1]{XB Zar} \setlatintextfont[Scale=1]{Junicode} -\setdigitfont{XB Zar} +\setmathdigitfont{XB Zar} \pagestyle{fancy} \title{مجلهٔ زیپرشین} \author{وفا خلیقی} @@ -8285,7 +8345,7 @@ http://google.com}\\ \usepackage[correction]{xepersian-multiplechoice} \usepackage{xepersian} \settextfont[Scale=1]{XB Zar} -\setdigitfont[Scale=1]{XB Zar} +\setmathdigitfont[Scale=1]{XB Zar} \begin{document} \begin{question}{اگر $A=\{ 1,2\} $ و $B=\{ 2,3\} $ آنگاه حاصل $B^2-A\times B$ کدام است.} \false $\{(3,2),(3,3)\} $ @@ -8325,7 +8385,7 @@ http://google.com}\\ \usepackage{xepersian-multiplechoice} \usepackage{xepersian} \settextfont[Scale=1]{XB Zar} -\setdigitfont[Scale=1]{XB Zar} +\setmathdigitfont[Scale=1]{XB Zar} \begin{document} \begin{question}{اگر $A=\{ 1,2\} $ و $B=\{ 2,3\} $ آنگاه حاصل $B^2-A\times B$ کدام است.} \false $\{(3,2),(3,3)\} $ @@ -8369,7 +8429,7 @@ http://google.com}\\ \usepackage{xepersian-multiplechoice} \usepackage{xepersian} \settextfont[Scale=1]{XB Zar} -\setdigitfont[Scale=1]{XB Zar} +\setmathdigitfont[Scale=1]{XB Zar} \begin{document} \begin{question}{اگر $A=\{ 1,2\} $ و $B=\{ 2,3\} $ آنگاه حاصل $B^2-A\times B$ کدام است.} \false $\{(3,2),(3,3)\} $ @@ -8409,7 +8469,7 @@ http://google.com}\\ \usepackage{xepersian-multiplechoice} \usepackage{xepersian} \settextfont[Scale=1]{XB Zar} -\setdigitfont[Scale=1]{XB Zar} +\setmathdigitfont[Scale=1]{XB Zar} \begin{document} \begin{question}{اگر $A=\{ 1,2\} $ و $B=\{ 2,3\} $ آنگاه حاصل $B^2-A\times B$ کدام است.} \false $\{(3,2),(3,3)\} $ diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins b/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins index dfb5fa9e34e..47069182bb6 100644 --- a/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins +++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins @@ -7,7 +7,7 @@ %% xepersian.dtx (with options: `batchfile') %% %% __________________________________________________ -%% Copyright (c) 2008--2017 Vafa Khalighi <persian-tex@tug.org> +%% Copyright (c) 2008--2018 Vafa Khalighi <persian-tex@tug.org> %% %% It may be distributed and/or modified under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of @@ -23,7 +23,7 @@ \preamble __________________________________________________ - Copyright (c) 2008--2017 Vafa Khalighi <persian-tex@tug.org> + Copyright (c) 2008--2018 Vafa Khalighi <persian-tex@tug.org> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of |