diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-14 22:21:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-14 22:21:29 +0000 |
commit | 89f262f929d503e3d1fdda159cc410f3a8c26add (patch) | |
tree | 7563f94c0f41172bdf4609660fb97ecf9955091a /Master/texmf-dist/source/xelatex | |
parent | 212490225178a301cd0756b00c5f85d64952e409 (diff) |
xepersian (14sep11)
git-svn-id: svn://tug.org/texlive/trunk@23954 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx | 189 | ||||
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.ins | 12 |
2 files changed, 107 insertions, 94 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx index f3c8f8b7f98..56059aa6b88 100644 --- a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx +++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx @@ -5,10 +5,10 @@ %<*readme> _________________ The XePersian package -v1.1.8 +v1.2.0 XePersian is a package written for XeLaTeX that allows users to typeset -Persian easily. The current version is 1.1.8 and it will be developed to +Persian easily. The current version is 1.2.0 and it will be developed to meet the needs of Persian typesetting properly. The XePersian package is independent of any operating system, meaning it @@ -23,7 +23,7 @@ in the documentation. To get help, please explore http://forum.parsilatex.com ______________ -Vafa Khalighi +VAFA KHALIGHI vafaklg@gmail.com Copyright © 2008–2011 @@ -33,7 +33,7 @@ version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt This work is “author-maintained” (as per LPPL maintenance status) -by Vafa Khalighi. +by VAFA KHALIGHI. %</readme> %<*internal> \fi @@ -46,7 +46,7 @@ by Vafa Khalighi. \preamble ______________________________________ - Copyright © 2008–2011 Vafa Khalighi + Copyright © 2008–2011 VAFA KHALIGHI License information appended. @@ -54,14 +54,14 @@ by Vafa Khalighi. \endpreamble \postamble -Copyright © 2008–2011 Vafa Khalighi <vafaklg@gmail.com> +Copyright © 2008–2011 VAFA KHALIGHI <vafaklg@gmail.com> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt This work is “author-maintained” (as per LPPL maintenance status) -by Vafa Khalighi. +by VAFA KHALIGHI. @@ -155,7 +155,7 @@ by Vafa Khalighi. \usepackage{bidicode} \usepackage[numbered]{hypdoc} \definecolor{myred}{rgb}{0.65,0.04,0.07} -\hypersetup{pdftitle={The XePersian Package (Persian for \LaTeXe{} over XeTeX)},pdfauthor={Vafa Khalighi <vafaklg@gmail.com>}} +\hypersetup{pdftitle={The XePersian Package (Persian for \LaTeXe{} over XeTeX)},pdfauthor={VAFA KHALIGHI <vafaklg@gmail.com>}} \usepackage{bidi} \setlength\columnseprule{.4pt} \newfontfamily\ParsiFont[Script=Arabic]{Iranian Sans} @@ -205,9 +205,9 @@ by Vafa Khalighi. % \makeatletter % \title{The \textsf{\XePersian} Package\\[5pt] % Persian for \LaTeXe{} over \XeTeX} -% \author{Vafa Khalighi\\ +% \author{VAFA KHALIGHI\\ % \url{vafaklg@gmail.com}} -% \date{\today\qquad Version 1.1.8} +% \date{\today\qquad Version 1.2.0} %\maketitle %\tableofcontents %\section{Introduction} @@ -226,8 +226,8 @@ by Vafa Khalighi. %xepersian package (Persian for LaTeX over XeTeX) %Description: The package supports Persian %typesetting, using fonts provided in the distribution. -%Copyright © 2008-2011 Vafa Khalighi -%v1.1.8, 2011/09/16 +%Copyright © 2008-2011 VAFA KHALIGHI +%v1.2.0, 2011/09/16 %License: LaTeX Project Public License, version 1.3c or higher (your choice) %Location on CTAN: /macros/xetex/latex/xepersian %\end{lstlisting} @@ -5322,7 +5322,6 @@ by Vafa Khalighi. %\fi % \subsection{\textsf{parsidigits.map}} % \begin{macrocode} -; Vafa Khalighi ... LHSName "Digits" RHSName "ParsiDigits" @@ -5566,7 +5565,7 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \subsection{\textsf{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersianversion{v1.1.8} +\def\xepersianversion{v1.2.0} \def\xepersiandate{2011/09/16} \ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space Persian typesetting in XeLaTeX] @@ -5579,7 +5578,7 @@ Persian typesetting in XeLaTeX] xepersian package (Persian for LaTeX over XeTeX)^^J Description: The package supports Persian^^J typesetting, using fonts provided in the distribution.^^J -Copyright © 2008–2011 Vafa Khalighi^^J +Copyright © 2008–2011 VAFA KHALIGHI^^J \xepersianversion, \xepersiandate^^J License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J Location on CTAN: /macros/xetex/latex/xepersian} @@ -5615,35 +5614,50 @@ Location on CTAN: /macros/xetex/latex/xepersian} \fi \newfontscript{Parsi}{arab} \newfontlanguage{Parsi}{FAR} -\newcommand*\settextfont[2][]{% -\newfontfamily\persianfont[Script=Parsi,Language=Parsi,Mapping=parsidigits,#1]{#2} -\let\rmdefault\zf@family +\ExplSyntaxOn +\DeclareDocumentCommand \settextfont { O{} m } { + \fontspec_select:nn{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \use:x { + \exp_not:N \DeclareRobustCommand \exp_not:N \persianfont { + \exp_not:N \fontencoding {\g_fontspec_encoding_tl} + \exp_not:N \fontfamily {\l_fontspec_family_tl} \exp_not:N \selectfont + } + } + \cs_set_eq:NN \rmdefault \l_fontspec_family_tl \normalfont } -\settextfont[ExternalLocation,BoldFont={persian-modern-bold},BoldItalicFont={persian-modern-bolditalic},ItalicFont={persian-modern-italic},SlantedFont={persian-modern-oblique},BoldSlantedFont={persian-modern-boldoblique},Language=Default]{persian-modern-regular} -\setdigitfont[ExternalLocation,BoldFont={persian-modern-bold},BoldItalicFont={persian-modern-bolditalic},ItalicFont={persian-modern-italic},SlantedFont={persian-modern-oblique},BoldSlantedFont={persian-modern-boldoblique},Language=Default]{persian-modern-regular} -\newcommand*\setlatintextfont[2][]{% -\newfontfamily\latinfont[Mapping=tex-text,#1]{#2} +\settextfont[ExternalLocation,BoldFont={persian-modern-bold},BoldItalicFont={persian-modern-bolditalic},ItalicFont={persian-modern-italic},SlantedFont={persian-modern-oblique},BoldSlantedFont={persian-modern-boldoblique}]{persian-modern-regular} +\setdigitfont[ExternalLocation,BoldFont={persian-modern-bold},BoldItalicFont={persian-modern-bolditalic},ItalicFont={persian-modern-italic},SlantedFont={persian-modern-oblique},BoldSlantedFont={persian-modern-boldoblique}]{persian-modern-regular} +\DeclareDocumentCommand \setlatintextfont { O{} m } { + \fontspec_select:nn{Mapping=tex-text,#1}{#2} + \use:x { + \exp_not:N \DeclareRobustCommand \exp_not:N \latinfont { + \exp_not:N \fontencoding {\g_fontspec_encoding_tl} + \exp_not:N \fontfamily {\l_fontspec_family_tl} \exp_not:N \selectfont + } + } } \setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic},SmallCapsFont={lmromancaps10-regular},SlantedFont={lmromanslant10-regular},BoldSlantedFont={lmromanslant10-bold}]{lmroman10-regular} -\let\setlatinsansfont\setsansfont -\let\setlatinmonofont\setmonofont -\newcommand*\defpersianfont[1]{% - \@ifnextchar[{\defpersianfont@i#1}{\defpersianfont@i#1[]}} -\def\defpersianfont@i#1[#2]#3{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#2}{#3}% - \edef\@tempa{% - \noexpand\DeclareRobustCommand\noexpand#1 - {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}% - \@tempa} -\newcommand*\deflatinfont[1]{% - \@ifnextchar[{\deflatinfont@i#1}{\deflatinfont@i#1[]}} -\def\deflatinfont@i#1[#2]#3{% - \zf@fontspec{Mapping=tex-text,#2}{#3}% - \edef\@tempa{% - \noexpand\DeclareRobustCommand\noexpand#1 - {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}% - \@tempa} +\cs_set_eq:NN \setlatinsansfont \setsansfont +\cs_set_eq:NN \setlatinmonofont \setmonofont +\DeclareDocumentCommand \defpersianfont { m O{} m } { + \fontspec_select:nn{Script=Parsi,Language=Parsi,Mapping=parsidigits,#2}{#3} + \use:x { + \exp_not:N \DeclareRobustCommand \exp_not:N #1 { + \exp_not:N \fontencoding {\g_fontspec_encoding_tl} + \exp_not:N \fontfamily {\l_fontspec_family_tl} \exp_not:N \selectfont + } + } +} +\DeclareDocumentCommand \deflatinfont { m O{} m } { + \fontspec_select:nn{Mapping=tex-text,#2}{#3} + \use:x { + \exp_not:N \DeclareRobustCommand \exp_not:N #1 { + \exp_not:N \fontencoding {\g_fontspec_encoding_tl} + \exp_not:N \fontfamily {\l_fontspec_family_tl} \exp_not:N \selectfont + } + } +} \newcommand\persiansfdefault{} \newcommand\persianttdefault{} \newcommand\iranicdefault{} @@ -5674,33 +5688,34 @@ Location on CTAN: /macros/xetex/latex/xepersian} \DeclareTextFontCommand{\textnavar}{\navarfamily} \DeclareTextFontCommand{\textpook}{\pookfamily} \DeclareTextFontCommand{\textsayeh}{\sayehfamily} -\newcommand*\setpersiansansfont[2][]{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2}% - \let\persiansfdefault\zf@family - \normalfont} -\newcommand*\setpersianmonofont[2][]{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2}% - \let\persianttdefault\zf@family - \normalfont} -\newcommand*\setnavarfont[2][]{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2}% - \let\navardefault\zf@family - \normalfont} -\newcommand*\setpookfont[2][]{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2}% - \let\pookdefault\zf@family - \normalfont} -\setpookfont[ExternalLocation,ItalicFont={persian-modern-italicoutline},SlantedFont={persian-modern-obliqueoutline},BoldSlantedFont={persian-modern-obliqueoutline},Language=Default]{persian-modern-outline} -\newcommand*\setsayehfont[2][]{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2}% - \let\sayehdefault\zf@family - \normalfont} -\setsayehfont[ExternalLocation,ItalicFont={persian-modern-italicshadow},SlantedFont={persian-modern-obliqueshadow},BoldSlantedFont={persian-modern-obliqueshadow},Language=Default]{persian-modern-shadow} -\newcommand*\setiranicfont[2][]{% - \zf@fontspec{Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2}% - \let\iranicdefault\zf@family - \normalfont} -\setiranicfont[ExternalLocation,BoldFont={persian-modern-boldoblique},BoldItalicFont={persian-modern-bolditalic},Language=Default]{persian-modern-oblique} +\DeclareDocumentCommand \setpersiansansfont { O{} m } { + \fontspec_set_family:Nnn \persiansfdefault {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \normalfont +} +\DeclareDocumentCommand \setpersianmonofont { O{} m } { + \fontspec_set_family:Nnn \persianttdefault {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \normalfont +} +\DeclareDocumentCommand \setnavarfont { O{} m } { + \fontspec_set_family:Nnn \navardefault {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \normalfont +} +\DeclareDocumentCommand \setpookfont { O{} m } { + \fontspec_set_family:Nnn \pookdefault {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \normalfont +} +\setpookfont[ExternalLocation,ItalicFont={persian-modern-italicoutline},SlantedFont={persian-modern-obliqueoutline}]{persian-modern-outline} +\DeclareDocumentCommand \setsayehfont { O{} m } { + \fontspec_set_family:Nnn \sayehdefault {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \normalfont +} +\setsayehfont[ExternalLocation,ItalicFont={persian-modern-italicshadow},SlantedFont={persian-modern-obliqueshadow}]{persian-modern-shadow} +\DeclareDocumentCommand \setiranicfont { O{} m } { + \fontspec_set_family:Nnn \iranicdefault {Script=Parsi,Language=Parsi,Mapping=parsidigits,#1}{#2} + \normalfont +} +\ExplSyntaxOff +\setiranicfont[ExternalLocation,BoldFont={persian-modern-boldoblique}]{persian-modern-oblique} \def\resetlatinfont{% \let\normalfont\latinfont% \latinfont} @@ -6898,17 +6913,14 @@ indexblock environment may only appear inside frontpage environment. #1 } } -\ExplSyntaxOff \newcommand\setdigitfont[2][]{% \let\glb@currsize\relax - \setkeys*[xepersian-mathsdigitspec]{options}{#1}% - \edef\@tempa{\noexpand\zf@fontspec{Mapping=parsidigits,% - \XKV@rm}{#2}}\@tempa + \fontspec_set_family:Nnn \xepersian@digits@family {Mapping=parsidigits,#1}{#2} \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'} - \DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n} - \DeclareSymbolFont{new@mathbf@font@digits}{EU1}{\zf@family}{bx}{n} - \DeclareSymbolFont{new@mathit@font@digits}{EU1}{\zf@family}{m}{it} - \DeclareSymbolFont{new@mathrm@font@digits}{EU1}{\zf@family}{m}{n} + \DeclareSymbolFont{OPERATORS} {EU1}{\xepersian@digits@family} {m}{n} + \DeclareSymbolFont{new@mathbf@font@digits}{EU1}{\xepersian@digits@family}{bx}{n} + \DeclareSymbolFont{new@mathit@font@digits}{EU1}{\xepersian@digits@family}{m}{it} + \DeclareSymbolFont{new@mathrm@font@digits}{EU1}{\xepersian@digits@family}{m}{n} \def\persianmathsdigits{% \SetMathCode{`0}{\mathalpha}{OPERATORS}{`0} \SetMathCode{`1}{\mathalpha}{OPERATORS}{`1} @@ -6922,20 +6934,21 @@ indexblock environment may only appear inside frontpage environment. \SetMathCode{`9}{\mathalpha}{OPERATORS}{`9} \SetMathCode{`\%}{\mathbin}{OPERATORS}{`٪} \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B} - \let\mathbf\new@mathbf - \let\mathit\new@mathit - \let\mathrm\new@mathrm} + \cs_set_eq:NN \mathbf \new@mathbf + \cs_set_eq:NN \mathit \new@mathit + \cs_set_eq:NN \mathrm \new@mathrm} +} +\DeclareDocumentCommand \setmathsfdigitfont { O{} m } { + \fontspec_set_family:Nnn \g_fontspec_mathsf_tl {Mapping=parsidigits,#1}{#2} + \DeclareSymbolFont{new@mathsf@font@digits}{EU1}{\g_fontspec_mathsf_tl}{m}{n} + \def\persianmathsfdigits{\cs_set_eq:NN \mathsf \new@mathsf} } -\newcommand*\setmathsfdigitfont[2][]{% -\zf@fontspec{Mapping=parsidigits,#1}{#2}% -\let\zf@sfmaths\zf@family -\DeclareSymbolFont{new@mathsf@font@digits}{EU1}{\zf@family}{m}{n} -\def\persianmathsfdigits{\let\mathsf\new@mathsf}} -\newcommand*\setmathttdigitfont[2][]{% -\zf@fontspec{Mapping=parsidigits,#1}{#2}% -\let\zf@ttmaths\zf@family -\DeclareSymbolFont{new@mathtt@font@digits}{EU1}{\zf@family}{m}{n} -\def\persianmathttdigits{\let\mathtt\new@mathtt}} +\DeclareDocumentCommand \setmathttdigitfont { O{} m } { + \fontspec_set_family:Nnn \g_fontspec_mathtt_tl {Mapping=parsidigits,#1}{#2} + \DeclareSymbolFont{new@mathtt@font@digits}{EU1}{\g_fontspec_mathtt_tl}{m}{n} + \def\persianmathttdigits{\cs_set_eq:NN \mathtt \new@mathtt} +} +\ExplSyntaxOff \ifx\newcommand\undefined\else \newcommand{\ZifferAn}{} \fi diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins b/Master/texmf-dist/source/xelatex/xepersian/xepersian.ins index 33408685dd9..846c5b1a205 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 © 2008–2011 Vafa Khalighi +%% Copyright © 2008–2011 VAFA KHALIGHI %% %% License information appended. %% @@ -18,21 +18,21 @@ \preamble ______________________________________ - Copyright © 2008–2011 Vafa Khalighi + Copyright © 2008–2011 VAFA KHALIGHI License information appended. \endpreamble \postamble -Copyright © 2008–2011 Vafa Khalighi <vafaklg@gmail.com> +Copyright © 2008–2011 VAFA KHALIGHI <vafaklg@gmail.com> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt This work is “author-maintained” (as per LPPL maintenance status) -by Vafa Khalighi. +by VAFA KHALIGHI. \endpostamble \askforoverwritefalse @@ -97,14 +97,14 @@ by Vafa Khalighi. \generate{\file{xepersian-persiancal.sty}{\from{\jobname.dtx}{xepersian-persiancal.sty}}} \endbatchfile %% -%% Copyright © 2008–2011 Vafa Khalighi <vafaklg@gmail.com> +%% Copyright © 2008–2011 VAFA KHALIGHI <vafaklg@gmail.com> %% %% It may be distributed and/or modified under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% %% This work is “author-maintained” (as per LPPL maintenance status) -%% by Vafa Khalighi. +%% by VAFA KHALIGHI. %% %% %% |