diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/arabxetex.sty (renamed from Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty) | 198 |
1 files changed, 100 insertions, 98 deletions
diff --git a/Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty b/Master/texmf-dist/tex/xelatex/arabxetex.sty index 6afba00b6aa..67e8391b58b 100644 --- a/Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty +++ b/Master/texmf-dist/tex/xelatex/arabxetex.sty @@ -8,13 +8,13 @@ %% %% ____________________________ %% The arabxetex package -%% (C) 2007-2008 François Charette +%% © 2007–2010 François Charette %% License information appended %% %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{arabxetex} - [2008/07/16 v1.1.2 ArabTeX-like interface for XeLaTeX] + [2010/03/04 v1.1.4 ArabTeX-like interface for XeLaTeX] \DeclareOption{fullvoc}{\def\ax@mode{fullvoc}} \DeclareOption{voc}{\def\ax@mode{voc}} \DeclareOption{novoc}{\def\ax@mode{novoc}} @@ -22,6 +22,8 @@ \DeclareOption{utf}{\def\ax@mode{utf}} \DeclareOption{fdf2alif}{\def\ax@font@allah{fdf2alif}} \DeclareOption{fdf2noalif}{\def\ax@font@allah{fdf2noalif}} +\newif\ifmirror@punct\mirror@punctfalse +\DeclareOption{mirrorpunct}{\mirror@puncttrue} \ExecuteOptions{novoc,fdf2alif} \ProcessOptions \def\ax@mode@fullvoc{fullvoc} @@ -33,23 +35,23 @@ \def\ax@ismode@defined#1{% \ifcsname ax@mode@#1\endcsname% \ax@mode@definedtrue% -\else% +\else \ax@mode@definedfalse% \fi} \def\ax@lang{arab}%default language (for macros like \aemph) -\RequirePackage{bidi} \RequirePackage{amsmath}%because of macro \overline used in \aemph \RequirePackage{fontspec} -\AtBeginDocument{\ifdefined\arabicfont\relax\else% -\PackageWarning{arabxetex}{\string\arabicfont\ is not defined!^^JI will try to load Scheherazade}% -\newfontfamily\arabicfont[Script=Arabic,Scale=2]{Scheherazade}\fi -}% +\RequirePackage{bidi} +\AtBeginDocument{\ifdefined\arabicfont\relax\else +\PackageWarning{arabxetex}{\string\arabicfont\ is not defined!^^JI will try to load Scheherazade (scaled 1.5)}% +\newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Scheherazade}\fi}% \def\ax@trans@style{\itshape}% \newcommand{\SetTranslitStyle}[1]{\def\ax@trans@style{#1}} \newcommand{\SetTranslitConvention}[1]{\def\ax@trans@convention{#1}} \def\ax@trans@convention{loc}% Library of Congress is default \newcommand{\SetAllahWithAlif}{\def\ax@font@allah{fdf2alif}} \newcommand{\SetAllahWithoutAlif}{\def\ax@font@allah{fdf2noalif}} +\def\utf@fontfeature{\ifmirror@punct\addfontfeature{Mapping=mirrorpunct}\else\relax\fi} \def\arabtex@codes{\catcode`^=11\relax\catcode`_=11\relax} \def\UC{\char"E000} % This is used to capitalize the following letter (ignoring % article al-) in transliteration mode @@ -74,14 +76,14 @@ \ifx\@tempa\ax@mode@trans% \par\arabtex@codes\ax@trans@style% \addfontfeature{Mapping=arabtex-trans-\ax@trans@convention}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\arabicfont\utf@fontfeature% +\else \par\setRL\arabicfont\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-\@tempa}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\arabicfont\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-\ax@mode}% @@ -97,14 +99,14 @@ \ifx\@tempa\ax@mode@trans% \par\arabtex@codes\ax@trans@style% \addfontfeature{Mapping=arabtex-trans-\ax@trans@convention}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@maghribi@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@maghribi@font\utf@fontfeature% +\else \par\setRL\ax@maghribi@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\@tempa}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@maghribi@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\ax@mode}% @@ -119,14 +121,14 @@ \ifx\@tempa\ax@mode@trans% \par\arabtex@codes\ax@trans@style% \addfontfeature{Mapping=arabtex-farsi-trans-\ax@trans@convention}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@farsi@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@farsi@font\utf@fontfeature% +\else \par\setRL\ax@farsi@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\@tempa}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@farsi@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\ax@mode}% @@ -142,14 +144,14 @@ \ifx\@tempa\ax@mode@trans% \par\arabtex@codes\ax@trans@style% \addfontfeature{Mapping=arabtex-urdu-trans-\ax@trans@convention}% -\else% +\else \ifx\@tempa\ax@mode@utf% \par\setRL\ax@urdu@font\addfontfeature{Language=Urdu}%Mapping=arabtex-utf}% -\else% +\else \par\setRL\ax@urdu@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\@tempa}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@urdu@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\ax@mode}% @@ -164,14 +166,14 @@ \ifx\@tempa\ax@mode@trans% \par\arabtex@codes\ax@trans@style% \addfontfeature{Mapping=arabtex-pashto-trans-\ax@trans@convention}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@pashto@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@pashto@font\utf@fontfeature% +\else \par\setRL\ax@pashto@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\@tempa}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@pashto@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\ax@mode}% @@ -186,14 +188,14 @@ \ifx\@tempa\ax@mode@trans% \par\arabtex@codes\ax@trans@style% \addfontfeature{Mapping=arabtex-sindhi-trans-\ax@trans@convention}% -\else% +\else \ifx\@tempa\ax@mode@utf% \par\setRL\ax@sindhi@font\addfontfeature{Language=Sindhi}%Mapping=arabtex-utf}% -\else% +\else \par\setRL\ax@sindhi@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\@tempa,Language=Sindhi}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@sindhi@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\ax@mode,Language=Sindhi}% @@ -206,12 +208,12 @@ \ax@ismode@defined{\@tempa}% \ifax@mode@defined% \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@ottoman@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@ottoman@font\utf@fontfeature% +\else \par\setRL\ax@ottoman@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\@tempa}% -\fi%\fi% -\else% +\fi%\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@ottoman@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\ax@mode}% @@ -225,7 +227,7 @@ {\def\ax@lang{kurdish}% \ifx\@tempa\ax@mode@utf% \par\setRL\ax@kurdish@font\addfontfeature{Language=Kurdish}%Mapping=arabtex-utf}% -\else% +\else \par\setRL\ax@kurdish@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-kurdish,Language=Kurdish}% \fi} @@ -239,12 +241,12 @@ \ax@ismode@defined{\@tempa}% \ifax@mode@defined% \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@kashmiri@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@kashmiri@font\utf@fontfeature% +\else \par\setRL\ax@kashmiri@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\@tempa}% -\fi%\fi% -\else% +\fi%\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@kashmiri@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\ax@mode}% @@ -259,12 +261,12 @@ \ax@ismode@defined{\@tempa}% \ifax@mode@defined% \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@malay@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@malay@font\utf@fontfeature% +\else \par\setRL\ax@malay@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\@tempa}% -\fi%\fi% -\else% +\fi%\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \par\setRL\ax@malay@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\ax@mode}% @@ -278,8 +280,8 @@ {%\edef\@tempa{#1}% \def\ax@lang{uighur}% \ifx\@tempa\ax@mode@utf% -\par\setRL\ax@uighur@font\addfontfeature{Mapping=arabicfixes}% -\else% +\par\setRL\ax@uighur@font\utf@fontfeature% +\else \par\setRL\ax@uighur@font\arabtex@codes% \addfontfeature{Mapping=arabtex-\ax@font@allah-uighur}% \fi} @@ -309,13 +311,13 @@ \ifax@mode@defined% \ifx\@tempa\ax@mode@trans% {\ax@trans@style\addfontfeature{Mapping=arabtex-trans-\ax@trans@convention}#2}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}% -\else% +\RL{\arabicfont\utf@fontfeature #2}% +\else \RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-\@tempa}#2}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-\ax@mode}#2}% \fi\egroup} @@ -326,14 +328,14 @@ \ifax@mode@defined% \ifx\@tempa\ax@mode@trans% {\ax@trans@style\addfontfeature{Mapping=arabtex-trans-\ax@trans@convention}#2}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\RL{\ax@maghribi@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@maghribi@font\utf@fontfeature #2}% +\else \RL{\ax@maghribi@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\@tempa}#2}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@maghribi@font\addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\ax@mode}#2}% \fi\egroup} @@ -344,14 +346,14 @@ \ifax@mode@defined% \ifx\@tempa\ax@mode@trans% {\ax@trans@style\addfontfeature{Mapping=arabtex-farsi-trans-\ax@trans@convention}#2}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\RL{\ax@farsi@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@farsi@font\utf@fontfeature #2}% +\else \RL{\ax@farsi@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\@tempa}#2}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@farsi@font\addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\ax@mode}#2}% \fi\egroup} @@ -362,14 +364,14 @@ \ifax@mode@defined% \ifx\@tempa\ax@mode@trans% {\ax@trans@style\addfontfeature{Mapping=arabtex-urdu-trans-\ax@trans@convention}#2}% -\else% +\else \ifx\@tempa\ax@mode@utf% \RL{\ax@urdu@font\addfontfeature{Language=Urdu}#2}%eventually Mapping=arabtex-utf -\else% +\else \RL{\ax@urdu@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\@tempa,Language=Urdu}#2}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@urdu@font\addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\ax@mode,Language=Urdu}#2}% \fi\egroup} @@ -380,14 +382,14 @@ \ifax@mode@defined% \ifx\@tempa\ax@mode@trans% {\ax@trans@style\addfontfeature{Mapping=arabtex-sindhi-trans-\ax@trans@convention}#2}% -\else% +\else \ifx\@tempa\ax@mode@utf% \RL{\ax@sindhi@font\addfontfeature{Language=Sindhi} #2}%eventually Mapping=arabtex-utf -\else% +\else \RL{\ax@sindhi@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\@tempa,Language=Sindhi}#2}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@sindhi@font\addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\ax@mode,Language=Sindhi}#2}% \fi\egroup} @@ -398,14 +400,14 @@ \ifax@mode@defined% \ifx\@tempa\ax@mode@trans% {\ax@trans@style\addfontfeature{Mapping=arabtex-pashto-trans-\ax@trans@convention}#2}% -\else% +\else \ifx\@tempa\ax@mode@utf% -\RL{\ax@pashto@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@pashto@font\utf@fontfeature #2}% +\else \RL{\ax@pashto@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\@tempa}#2}% -\fi\fi% -\else% +\fi\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@pashto@font\addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\ax@mode}#2}% \fi\egroup} @@ -415,12 +417,12 @@ \ax@ismode@defined{\@tempa}% \ifax@mode@defined% \ifx\@tempa\ax@mode@utf% -\RL{\ax@ottoman@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@ottoman@font\utf@fontfeature #2}% +\else \RL{\ax@ottoman@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\@tempa}#2}% -\fi%\fi% -\else% +\fi%\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@ottoman@font\addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\ax@mode}#2}% \fi\egroup} @@ -428,11 +430,11 @@ \edef\@tempa{#1}% \def\ax@lang{kurdish}% \ifx\@tempa\ax@mode@utf% -\RL{\ax@kurdish@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@kurdish@font\utf@fontfeature #2}% +\else \RL{\ax@kurdish@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-kurdish,Language=Kurdish}#2}% -\fi%\fi% +\fi%\fi \egroup} \newcommand\text@kashmiri[2][\ax@mode]{% \edef\@tempa{#1}% @@ -440,12 +442,12 @@ \ax@ismode@defined{\@tempa}% \ifax@mode@defined% \ifx\@tempa\ax@mode@utf% -\RL{\ax@kashmiri@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@kashmiri@font\utf@fontfeature #2}% +\else \RL{\ax@kashmiri@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\@tempa}#2}% -\fi%\fi% -\else% +\fi%\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}% \RL{\ax@kashmiri@font\addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\ax@mode}#2}% \fi\egroup} @@ -455,12 +457,12 @@ \ax@ismode@defined{\@tempa}% \ifax@mode@defined% \ifx\@tempa\ax@mode@utf% -\RL{\ax@malay@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@malay@font\utf@fontfeature #2}% +\else \RL{\ax@malay@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\@tempa}#2}% -\fi%\fi% -\else% +\fi%\fi +\else \PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}% \RL{\ax@malay@font\addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\ax@mode}#2}% \fi\egroup} @@ -468,18 +470,18 @@ \edef\@tempa{#1}% \def\ax@lang{uighur}% \ifx\@tempa\ax@mode@utf% -\RL{\ax@uighur@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf} -\else% +\RL{\ax@uighur@font\utf@fontfeature #2}% +\else \RL{\ax@uighur@font% \addfontfeature{Mapping=arabtex-\ax@font@allah-uighur}#2}% -\fi%\fi% +\fi%\fi \egroup} \newcommand{\textLR}[1]{\LR{\rmfamily #1}} \newcommand{\aemph}[1]{% \edef\@tempb{\expandafter\noexpand\csname text\ax@lang\endcsname}% $\overline{\text{\@tempb{#1}}}$} %% -%% Copyright (C) 2007-2008 by François Charette <firmicus at gmx dot net> +%% Copyright © 2007–2010 by François Charette <firmicus at gmx dot net> %% %% Distributable under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of |