diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-17 00:56:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-17 00:56:22 +0000 |
commit | 6daa627c7cb7dfd9e78504d4641c87a0d4248724 (patch) | |
tree | 1faf58108bb4e75b78b027c2fa0421e1e464b20f /Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty | |
parent | 5371eca0a5672238a07a473483cdd4a7eeb4a31f (diff) |
xepersian 1.0.1 (14jul09)
git-svn-id: svn://tug.org/texlive/trunk@14287 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty | 121 |
1 files changed, 63 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty index b2f5b4ec1b2..845b7398b75 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty +++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-mathsdigitspec.sty @@ -1,72 +1,63 @@ -%% This file is xepersian-mathsdigitspec.sty %% -%% Copyright 2009 by Vafa Khalighi +%% This is file `xepersian-mathsdigitspec.sty', +%% generated with the docstrip utility. %% -%%%% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. +%% The original source files were: +%% +%% xepersian.dtx (with options: `xepersian-mathsdigitspec.sty') +%% +%% __________________________________ +%% Copyright © 2008-2009 Vafa Khalighi +%% +%% License information appended. +%% +%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xepersian-mathsdigitspec} - [2009/01/05 v0.2 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)] + [2009/04/22 v1.0.1 Unicode Persian maths digits in XeLaTeX (Author: Vafa Khalighi)] \@zf@mathfalse -\newif\if@um@fontspec@feature -\def\um@Loop#1\um@Pool{#1\um@Loop#1\um@Pool} -\def\um@Break#1\um@Pool{} -\long\def\um@FOR#1=[#2:#3]\do#4{% - #1=#2\relax - \um@Loop #4% - \advance#1\@ne - \ifnum#1>#3\relax - \expandafter\um@Break - \fi - \um@Pool} -\newcommand\um@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}} -\def\um@usv@num{`\0} +\def\@preamblecmds{} +\newcommand\not@onlypreamble[1]{{% + \def\do##1{\ifx#1##1\else\noexpand\do\noexpand##1\fi}% + \xdef\@preamblecmds{\@preamblecmds}}} +\def\gm@notprerr{ can be used only in preamble (\on@line)} +\AtBeginDocument{% + \def\do#1{\noexpand\do\noexpand#1}% + \edef\@preamblecmds{% + \def\noexpand\do##1{% + \def##1{\noexpand\PackageError{gmutils/LaTeX}% + {\noexpand\string##1 \noexpand\gm@notprerr}\noexpand\@eha}}% + \@preamblecmds}} +\def\nocite#1{% + \@bsphack{\setbox0=\hbox{\cite{#1}}}\@esphack} +\newcommand\xepersian@PackageInfo[1]{\PackageInfo{xepersian-mathsdigitspec}{#1}} \newcommand\SetMathCode[4]{% \XeTeXmathcode#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax} \newcommand\SetMathCharDef[4]{% \XeTeXmathchardef#1="\mathchar@type#2 \csname sym#3\endcsname #4\relax} \newcommand\setdigitfont[2][]{% - \csname S@\f@size\endcsname - \def\um@ScriptFeatures{ScriptStyle}% - \def\um@ScriptScriptFeatures{ScriptScriptStyle}% - \def\um@ScriptFont{#2}% - \def\um@ScriptScriptFont{#2}% - \setkeys*[um]{options}{#1}% + \let\glb@currsize\relax + \setkeys*[xepersian-mathsdigitspec]{options}{#1}% \edef\@tempa{\noexpand\zf@fontspec{% - Mapping=parsidigits,SizeFeatures={% - {Size=\tf@size-},% - {Size=\sf@size-\tf@size,% - Font=\um@ScriptFont,% - \um@ScriptFeatures},% - {Size=-\sf@size,% - Font=\um@ScriptScriptFont,% - \um@ScriptScriptFeatures}},% \XKV@rm}{#2}}\@tempa - \def\um@digitfont{um@digitfont}% - \um@PackageInfo{Defining the default Persian maths digits font as '#2'}% - \DeclareSymbolFont{momayez}{EU1}{\zf@family}{m}{n}% - \SetMathCharDef{\momayez}{\mathpunct}{momayez}{"066B}% -\DeclareSymbolFont{\um@digitfont} - {\encodingdefault}{\zf@family}{\mddefault}{\updefault}% -\um@def@numbers + \xepersian@PackageInfo{Defining the default Persian maths digits font as '#2'} + \DeclareSymbolFont{OPERATORS} {EU1}{\zf@family} {m}{n} + \SetSymbolFont{OPERATORS}{bold}{EU1}{\zf@family} {bx}{n} + \DeclareMathAlphabet {\mathit}{EU1}{\zf@family}{m}{it} + \DeclareSymbolFontAlphabet{\mathrm} {OPERATORS} + \DeclareMathAlphabet {\mathbf}{EU1}{\zf@family}{bx}{n} + \SetMathCode{`0}{\mathalpha}{OPERATORS}{"06F0} + \SetMathCode{`1}{\mathalpha}{OPERATORS}{"06F1} + \SetMathCode{`2}{\mathalpha}{OPERATORS}{"06F2} + \SetMathCode{`3}{\mathalpha}{OPERATORS}{"06F3} + \SetMathCode{`4}{\mathalpha}{OPERATORS}{"06F4} + \SetMathCode{`5}{\mathalpha}{OPERATORS}{"06F5} + \SetMathCode{`6}{\mathalpha}{OPERATORS}{"06F6} + \SetMathCode{`7}{\mathalpha}{OPERATORS}{"06F7} + \SetMathCode{`8}{\mathalpha}{OPERATORS}{"06F8} + \SetMathCode{`9}{\mathalpha}{OPERATORS}{"06F9} + \SetMathCharDef{\decimalseparator}{\mathpunct}{OPERATORS}{"066B} } -\newcommand\um@zf@feature[2]{% - \define@key[zf]{options}{#1}[]{% - \if@um@fontspec@feature - #2 - \fi}} -\um@zf@feature{ScriptStyle}{% - \zf@update@ff{+ssty=0}} -\um@zf@feature{ScriptScriptStyle}{% - \zf@update@ff{+ssty=1}} -\newcommand\um@setmathcode[3][1]{% - \@for\um@inp:=#2\do{% - \um@FOR\@tempcnta=[1:#1]\do{% - \SetMathCode{\numexpr\um@inp+\@tempcnta-1\relax} - {\mathalpha}{\um@digitfont}{\numexpr#3+\@tempcnta-1\relax}}}} -\newcommand\um@def@numbers{% - \um@setmathcode[10]{\um@usv@num}{\um@usv@num}} \ifx\newcommand\undefined\else \newcommand{\ZifferAn}{} \fi @@ -97,5 +88,19 @@ \fi \fi} \mathcode`.="8000\relax -\def\ZifferLeer{\ifx\momayez\undefied .\else \momayez\fi} -\endinput +\def\ZifferLeer{\ifx\decimalseparator\undefied .\else \decimalseparator\fi} +%% +%% Copyright © 2008-2009 by Vafa Khalighi <vafa@users.berlios.de> +%% +%% Distributable 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 "maintained" (as per LPPL maintenance status) +%% by Vafa Khalighi. +%% +%% +%% +%% +%% +%% End of file `xepersian-mathsdigitspec.sty'. |