summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-07 23:48:29 +0000
committerKarl Berry <karl@freefriends.org>2018-01-07 23:48:29 +0000
commitcf3ee9c18b008105e62e9775003d57a6a582c8c7 (patch)
tree70dbbb791aad9b53283603713c179a44e5d28c25 /Master/texmf-dist/source/xelatex
parent18f0b9b0009fca38c5ac4dc557f05e749b113ed1 (diff)
xepersian (7jan18)
git-svn-id: svn://tug.org/texlive/trunk@46243 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx140
1 files changed, 86 insertions, 54 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx
index 5c16312ebda..cdedd81f91e 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.5
+v20.6
XePersian is a package written for XeLaTeX that allows users to typeset
Persian easily.
@@ -28,7 +28,7 @@ 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: 2018/01/04
+Current version release date: 2018/01/08
______________
Vafa Khalighi
persian-tex@tug.org
@@ -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.5}}
+%\large Documentation for \textcolor{blue!65!black}{version 20.6}}
% \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.5}}
+%Documentation for \textcolor{blue!65!black}{version 20.6}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -339,7 +339,7 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2008--2018 Vafa Khalighi
%*
-%* v20.5, 2018/01/04
+%* v20.6, 2018/01/08
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -2361,7 +2361,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{10521}
+%% \CheckSum{10569}
%% \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
@@ -4064,7 +4064,7 @@ by Vafa Khalighi.
\setclass \xepersian@D {0633,0634,0635,0636,0637,0638,0639,063A}
%\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0649,064A}
-\XeTeXcharclass "0647 \xepersian@H
+\setclass \xepersian@H {0647}
\setclass \xepersian@D {067E,0686,06A9,06AF,06CC}
\setclass \xepersian@L {0644}
\setclass \xepersian@V {064B,064C,064D,064E,064F,0650,0651,0652}
@@ -5303,8 +5303,8 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
% \subsection{\textsf{xepersian.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\xepersianversion{v20.5}
-\def\xepersiandate{2018/01/04}
+\def\xepersianversion{v20.6}
+\def\xepersiandate{2018/01/08}
\ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space
Persian typesetting in XeLaTeX]
\RequirePackage{fontspec}
@@ -5388,11 +5388,11 @@ Persian typesetting in XeLaTeX]
\DeclareDocumentCommand \settextfont { O{} m O{} }
{
- \__xepersian_main_settextfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_settextfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_settextfont:nnn
+\cs_new:Nn \__xepersian_main_settextfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_persianfont_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_persianfont_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \rmdefault \g__xepersian_persianfont_family
\use:x { \exp_not:n { \DeclareRobustCommand \persianfont }
{
@@ -5403,17 +5403,20 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_settextfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+\cs_set_eq:NN \__xepersian_settextfont_hook:nn \use_none:nn
+
\DeclareDocumentCommand \settextdigitfont { O{} m O{} }
{
- \__xepersian_main_settextdigitfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_settextdigitfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_settextdigitfont:nnn
+\cs_new:Nn \__xepersian_main_settextdigitfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_textdigitfont_family {Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_textdigitfont_family {Mapping=parsidigits,#1} {#2}
\use:x
{
\exp_not:n { \DeclareRobustCommand \xepersian@textdigitfont }
@@ -5423,6 +5426,7 @@ Persian typesetting in XeLaTeX]
\exp_not:N \selectfont
}
}
+ \__xepersian_settextdigitfont_hook:nn {#1} {#2}
\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}
@@ -5445,20 +5449,22 @@ Persian typesetting in XeLaTeX]
\newcommand*{\xepersian@@stop@switch@textdigitfont}{\ifx\f@family\ttdefault\else\if@nonlatin\if@@textdigitfont@on\egroup\else\fi\fi\fi}
}
+\cs_set_eq:NN \__xepersian_settextdigitfont_hook:nn \use_none:nn
+
\DeclareDocumentCommand \setdigitfont { O{} m O{} }
{
- \__xepersian_main_settextdigitfont:nnn {#1} {#2} {#3}
- \__xepersian_main_setmathdigitfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_settextdigitfont:nn {#1,#3} {#2}
+ \__xepersian_main_setmathdigitfont:nn {#1,#3} {#2}
}
\DeclareDocumentCommand \setlatintextfont { O{} m O{} }
{
- \__xepersian_main_setlatintextfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setlatintextfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setlatintextfont:nnn
+\cs_new:Nn \__xepersian_main_setlatintextfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_latinfont_family {Mapping=tex-text,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_latinfont_family {Mapping=tex-text,#1} {#2}
\use:x { \exp_not:n { \DeclareRobustCommand \latinfont }
{
\exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
@@ -5468,20 +5474,23 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setlatintextfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+
+\cs_set_eq:NN \__xepersian_setlatintextfont_hook:nn \use_none:nn
\tl_set_eq:NN \setlatinsansfont \setsansfont
\tl_set_eq:NN \setlatinmonofont \setmonofont
\DeclareDocumentCommand \defpersianfont { m O{} m O{} }
{
- \__xepersian_main_defpersianfont:nnnn {#1} {#2} {#3} {#4}
+ \__xepersian_main_defpersianfont:nnn {#1} {#2,#4} {#3}
}
-\cs_set:Nn \__xepersian_main_defpersianfont:nnnn
+\cs_new:Nn \__xepersian_main_defpersianfont:nnn
{
- \fontspec_set_family:cnn { g__xepersian_ \cs_to_str:N #1 _family } {Script=Parsi,Language=Parsi,Mapping=parsidigits,#2,#4} {#3}
+ \fontspec_set_family:cnn { g__xepersian_ \cs_to_str:N #1 _family } {Script=Parsi,Language=Parsi,Mapping=parsidigits,#2} {#3}
\use:x
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
@@ -5495,11 +5504,11 @@ Persian typesetting in XeLaTeX]
\DeclareDocumentCommand \deflatinfont { m O{} m O{} }
{
- \__xepersian_main_deflatinfont:nnnn {#1} {#2} {#3} {#4}
+ \__xepersian_main_deflatinfont:nnn {#1} {#2,#4} {#3}
}
-\cs_set:Nn \__xepersian_main_deflatinfont:nnnn
+\cs_new:Nn \__xepersian_main_deflatinfont:nnn
{
- \fontspec_set_family:cnn { g__xepersian_ \cs_to_str:N #1 _family } {Mapping=tex-text,#2,#4} {#3}
+ \fontspec_set_family:cnn { g__xepersian_ \cs_to_str:N #1 _family } {Mapping=tex-text,#2} {#3}
\use:x
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
@@ -5544,11 +5553,11 @@ Persian typesetting in XeLaTeX]
\DeclareDocumentCommand \setpersiansansfont { O{} m O{} }
{
- \__xepersian_main_setpersiansansfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setpersiansansfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setpersiansansfont:nnn
+\cs_new:Nn \__xepersian_main_setpersiansansfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_persiansffamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_persiansffamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \persiansfdefault \g__xepersian_persiansffamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \persiansffamily }
{
@@ -5559,17 +5568,20 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\persiansfdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setpersiansansfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+\cs_set_eq:NN \__xepersian_setpersiansansfont_hook:nn \use_none:nn
+
\DeclareDocumentCommand \setpersianmonofont { O{} m O{} }
{
- \__xepersian_main_setpersianmonofont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setpersianmonofont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setpersianmonofont:nnn
+\cs_new:Nn \__xepersian_main_setpersianmonofont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_persianttfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_persianttfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \persianttdefault \g__xepersian_persianttfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \persianttfamily }
{
@@ -5580,17 +5592,20 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\persianttdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setpersianmonofont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+
+\cs_set_eq:NN \__xepersian_setpersianmonofont_hook:nn \use_none:nn
\DeclareDocumentCommand \setnavarfont { O{} m O{} }
{
- \__xepersian_main_setnavarfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setnavarfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setnavarfont:nnn
+\cs_new:Nn \__xepersian_main_setnavarfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_navarfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_navarfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \navardefault \g__xepersian_navarfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \navarfamily }
{
@@ -5601,17 +5616,20 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\navardefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setnavarfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+
+\cs_set_eq:NN \__xepersian_setnavarfont_hook:nn \use_none:nn
\DeclareDocumentCommand \setpookfont { O{} m O{} }
{
- \__xepersian_main_setpookfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setpookfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setpookfont:nnn
+\cs_new:Nn \__xepersian_main_setpookfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_pookfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_pookfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \pookdefault \g__xepersian_pookfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \pookfamily }
{
@@ -5622,17 +5640,20 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\pookdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setpookfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+\cs_set_eq:NN \__xepersian_setpookfont_hook:nn \use_none:nn
+
\DeclareDocumentCommand \setsayehfont { O{} m O{} }
{
- \__xepersian_main_setsayehfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setsayehfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setsayehfont:nnn
+\cs_new:Nn \__xepersian_main_setsayehfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_sayehfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_sayehfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \sayehdefault \g__xepersian_sayehfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \sayehfamily }
{
@@ -5643,17 +5664,20 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\sayehdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setsayehfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+
+\cs_set_eq:NN \__xepersian_setsayehfont_hook:nn \use_none:nn
\DeclareDocumentCommand \setiranicfont { O{} m O{} }
{
- \__xepersian_main_setiranicfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setiranicfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setiranicfont:nnn
+\cs_new:Nn \__xepersian_main_setiranicfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_iranicfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_iranicfamily_family {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1} {#2}
\tl_set_eq:NN \iranicdefault \g__xepersian_iranicfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \iranicfamily }
{
@@ -5664,10 +5688,12 @@ Persian typesetting in XeLaTeX]
}
\str_if_eq_x:nnT {\familydefault} {\iranicdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__xepersian_setiranicfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
+\cs_set_eq:NN \__xepersian_setiranicfont_hook:nn \use_none:nn
\ExplSyntaxOff
\def\resetlatinfont{%
@@ -7727,12 +7753,13 @@ indexblock environment may only appear inside frontpage environment.
\DeclareDocumentCommand \setmathdigitfont { O{} m O{} }
{
- \__xepersian_main_setmathdigitfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setmathdigitfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setmathdigitfont:nnn
+\cs_new:Nn \__xepersian_main_setmathdigitfont:nn
{
\let\glb@currsize\relax
- \fontspec_set_family:Nnn \g__xepersian_mathdigitsfamily_tl {Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_mathdigitsfamily_tl {Mapping=parsidigits,#1} {#2}
+ \__xepersian_setmathdigitfont_hook:nn {#1} {#2}
\xepersian@PackageInfo{Defining the default Persian maths 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}
@@ -7759,31 +7786,36 @@ indexblock environment may only appear inside frontpage environment.
\tl_set_eq:NN \mathrm \new@mathrm}
}
+\cs_set_eq:NN \__xepersian_setmathdigitfont_hook:nn \use_none:nn
\DeclareDocumentCommand \setmathsfdigitfont { O{} m O{} }
{
- \__xepersian_main_setmathsfdigitfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setmathsfdigitfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setmathsfdigitfont:nnn
+\cs_new:Nn \__xepersian_main_setmathsfdigitfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_mathsfdigitfamily_tl {Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_mathsfdigitfamily_tl {Mapping=parsidigits,#1} {#2}
+ \__xepersian_setmathsfdigitfont_hook:nn {#1} {#2}
\DeclareSymbolFont{new@mathsf@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathsfdigitfamily_tl}{m}{n}
\def\persianmathsfdigits{\tl_set_eq:NN \mathsf \new@mathsf}
}
-
+\cs_set_eq:NN \__xepersian_setmathsfdigitfont_hook:nn \use_none:nn
\DeclareDocumentCommand \setmathttdigitfont { O{} m O{} }
{
- \__xepersian_main_setmathttdigitfont:nnn {#1} {#2} {#3}
+ \__xepersian_main_setmathttdigitfont:nn {#1,#3} {#2}
}
-\cs_set:Nn \__xepersian_main_setmathttdigitfont:nnn
+\cs_new:Nn \__xepersian_main_setmathttdigitfont:nn
{
- \fontspec_set_family:Nnn \g__xepersian_mathttdigitfamily_tl {Mapping=parsidigits,#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__xepersian_mathttdigitfamily_tl {Mapping=parsidigits,#1} {#2}
+ \__xepersian_setmathttdigitfont_hook:nn {#1} {#2}
\DeclareSymbolFont{new@mathtt@font@digits}{\g_fontspec_encoding_tl}{\g__xepersian_mathttdigitfamily_tl}{m}{n}
\def\persianmathttdigits{\tl_set_eq:NN \mathtt \new@mathtt}
}
+\cs_set_eq:NN \__xepersian_setmathttdigitfont_hook:nn \use_none:nn
+
\ExplSyntaxOff
\ifx\newcommand\undefined\else
\newcommand{\ZifferAn}{}