summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-05-12 22:29:17 +0000
committerKarl Berry <karl@freefriends.org>2007-05-12 22:29:17 +0000
commitced53342f3cb2c76e09f7c7c352f47406c5676a1 (patch)
tree7ec044f3ffff75ed16021c9a582540ad2b3c0a30 /Master/texmf-dist/tex
parent93ea72b1e370ead6127c322de9056d1a9da9286a (diff)
arabxetex 1.1 (10may07)
git-svn-id: svn://tug.org/texlive/trunk@4277 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty192
1 files changed, 105 insertions, 87 deletions
diff --git a/Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty b/Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty
index 61534afa2cd..f3c0ddd5ba0 100644
--- a/Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty
+++ b/Master/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{arabxetex}
- [2007/04/14 v1.0 ArabTeX-like interface for XeLaTeX]
+ [2007/05/10 v1.1 ArabTeX-like interface for XeLaTeX]
\DeclareOption{fullvoc}{\def\ax@mode{fullvoc}}
\DeclareOption{voc}{\def\ax@mode{voc}}
\DeclareOption{novoc}{\def\ax@mode{novoc}}
@@ -41,14 +41,29 @@
\RequirePackage{amsmath}%because of macro \overline used in \aemph
\RequirePackage{fontspec}
\AtBeginDocument{\ifdefined\arabicfont\relax\else%
-\newfontfamily\arabicfont[Script=Arabic,Scale=2]{Scheherazade}\fi}%
+\PackageWarning{arabxetex}{\arabicfont is not defined! I will try to load Scheherazade}%
+\newfontfamily\arabicfont[Script=Arabic,Scale=2]{Scheherazade}\fi
+}%
\def\ax@trans@style{\itshape}%
-\newcommand{\SetTransliterationStyle}[1]{\def\ax@trans@style{#1}}
+\newcommand{\SetTranslitStyle}[1]{\def\ax@trans@style{#1}}
\newcommand{\SetAllahWithAlif}{\def\ax@font@allah{fdf2alif}}
\newcommand{\SetAllahWithoutAlif}{\def\ax@font@allah{fdf2noalif}}
\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
-%%%
+\def\UC{\char"E000} % This is used to capitalize the following letter (ignoring
+ % article al-) in transliteration mode
+%%%Font setup
+\def\ax@farsi@font{\ifdefined\farsifont\farsifont\else\arabicfont\fi}
+\def\ax@urdu@font{\ifdefined\urdufont\urdufont\else\arabicfont\fi}
+\def\ax@pashto@font{\ifdefined\pashtofont\pashtofont\else\arabicfont\fi}
+\def\ax@maghribi@font{\ifdefined\maghribifont\maghribifont\else\arabicfont\fi}
+\def\ax@sindhi@font{\ifdefined\sindhifont\sindhifont\else\arabicfont\fi}
+\def\ax@kashmiri@font{\ifdefined\kashmirifont\kashmirifont\else\arabicfont\fi}
+\def\ax@ottoman@font{\ifdefined\ottomanfont\ottomanfont\else\arabicfont\fi}
+\def\ax@kurdish@font{\ifdefined\kurdishfont\kurdishfont\else\arabicfont\fi}
+\def\ax@malay@font{\ifdefined\malayfont\malayfont\else\arabicfont\fi}
+\def\ax@uighur@font{\ifdefined\uighurfont\uighurfont\else\arabicfont\fi}
+\def\ax@urdu@font{\ifdefined\urdufont\urdufont\else\arabicfont\fi}
+
\newenvironment{arab}[1][\ax@mode]%
{\edef\@tempa{#1}%
\def\ax@lang{arab}%
@@ -65,7 +80,7 @@
\addfontfeature{Mapping=arabtex-\ax@font@allah-\@tempa}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
+\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}%
\par\setRL\arabicfont\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-\ax@mode}%
\fi}
@@ -82,14 +97,14 @@
\addfontfeature{Mapping=arabtex-trans}%
\else%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@maghribi@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@maghribi@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\@tempa}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{\ifx\@tempa\ax@mode@trans\relax\else\unsetRL\fi\par}
@@ -104,14 +119,14 @@
\addfontfeature{Mapping=arabtex-farsi-trans}%
\else%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@farsi@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@farsi@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\@tempa}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{\ifx\@tempa\ax@mode@trans\relax\else\unsetRL\fi\par}
@@ -127,14 +142,14 @@
\addfontfeature{Mapping=arabtex-urdu-trans}%
\else%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Language=Urdu}%Mapping=arabtex-utf}%
+\par\setRL\ax@urdu@font\addfontfeature{Language=Urdu}%Mapping=arabtex-utf}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@urdu@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\@tempa}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{\ifx\@tempa\ax@mode@trans\relax\else\unsetRL\fi\par}
@@ -149,14 +164,14 @@
\addfontfeature{Mapping=arabtex-pashto-trans}%
\else%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@pashto@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@pashto@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\@tempa}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{\ifx\@tempa\ax@mode@trans\relax\else\unsetRL\fi\par}
@@ -171,45 +186,45 @@
\addfontfeature{Mapping=arabtex-sindhi-trans}%
\else%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Language=Sindhi}%Mapping=arabtex-utf}%
+\par\setRL\ax@sindhi@font\addfontfeature{Language=Sindhi}%Mapping=arabtex-utf}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@sindhi@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\@tempa,Language=Sindhi}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{\ifx\@tempa\ax@mode@trans\relax\else\unsetRL\fi\par}
%%%
-\newenvironment{turk}[1][\ax@mode]%
+\newenvironment{ottoman}[1][\ax@mode]%
{\edef\@tempa{#1}%
-\def\ax@lang{turk}%
+\def\ax@lang{ottoman}%
\ax@ismode@defined{\@tempa}%
\ifax@mode@defined%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@ottoman@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@ottoman@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\@tempa}%
\fi%\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{%\ifx\@tempa\ax@mode@trans\relax\else
\unsetRL%\fi
\par}
-\let\ottoman=\turk
+\let\turk=\ottoman
%%%
\newenvironment{kurdish}[1][]%
{\def\ax@lang{kurdish}%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Language=Kurdish}%Mapping=arabtex-utf}%
+\par\setRL\ax@kurdish@font\addfontfeature{Language=Kurdish}%Mapping=arabtex-utf}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@kurdish@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-kurdish,Language=Kurdish}%
\fi}
{%\ifx\@tempa\ax@mode@trans\relax\else
@@ -222,14 +237,14 @@
\ax@ismode@defined{\@tempa}%
\ifax@mode@defined%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@kashmiri@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@kashmiri@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\@tempa}%
\fi%\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{%\ifx\@tempa\ax@mode@trans\relax\else
@@ -242,14 +257,14 @@
\ax@ismode@defined{\@tempa}%
\ifax@mode@defined%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@malay@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@malay@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\@tempa}%
\fi%\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\par\setRL\arabicfont\arabtex@codes%
+\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}%
\fi}
{%\ifx\@tempa\ax@mode@trans\relax\else
@@ -261,9 +276,9 @@
{%\edef\@tempa{#1}%
\def\ax@lang{uighur}%
\ifx\@tempa\ax@mode@utf%
-\par\setRL\arabicfont\addfontfeature{Mapping=arabicfixes}%
+\par\setRL\ax@uighur@font\addfontfeature{Mapping=arabicfixes}%
\else%
-\par\setRL\arabicfont\arabtex@codes%
+\par\setRL\ax@uighur@font\arabtex@codes%
\addfontfeature{Mapping=arabtex-\ax@font@allah-uighur}%
\fi}
{%\ifx\@tempa\ax@mode@trans\relax\else
@@ -278,8 +293,8 @@
\def\texturdu{\bgroup\arabtex@codes\text@urdu}
\def\textsindhi{\bgroup\arabtex@codes\text@sindhi}
\def\textpashto{\bgroup\arabtex@codes\text@pashto}
-\def\textturk{\bgroup\arabtex@codes\text@turk}
-\let\textottoman=\textturk
+\def\textottoman{\bgroup\arabtex@codes\text@ottoman}
+\let\textturk=\textottoman
\def\textkurdish{\bgroup\arabtex@codes\text@kurdish}
\def\textkashmiri{\bgroup\arabtex@codes\text@kashmiri}
\def\textmalay{\bgroup\arabtex@codes\text@malay}
@@ -299,7 +314,7 @@
\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-\@tempa}#2}%
\fi\fi
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
+\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \@ax@mode}%
\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-\ax@mode}#2}%
\fi\egroup}
\newcommand\text@maghribi[2][\ax@mode]{%
@@ -311,14 +326,14 @@
{\ax@trans@style\addfontfeature{Mapping=arabtex-trans}#2}%
\else%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@maghribi@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@maghribi@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\@tempa}#2}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-maghribi-\ax@mode}#2}%
+\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}
\newcommand\text@farsi[2][\ax@mode]{%
\edef\@tempa{#1}%
@@ -329,14 +344,14 @@
{\ax@trans@style\addfontfeature{Mapping=arabtex-farsi-trans}#2}%
\else%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@farsi@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@farsi@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\@tempa}#2}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-farsi-\ax@mode}#2}%
+\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}
\newcommand\text@urdu[2][\ax@mode]{%
\edef\@tempa{#1}%
@@ -347,14 +362,14 @@
{\ax@trans@style\addfontfeature{Mapping=arabtex-urdu-trans}#2}%
\else%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Language=Urdu}#2}%eventually Mapping=arabtex-utf
+\RL{\ax@urdu@font\addfontfeature{Language=Urdu}#2}%eventually Mapping=arabtex-utf
\else%
-\RL{\arabicfont%
+\RL{\ax@urdu@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\@tempa,Language=Urdu}#2}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-urdu-\ax@mode,Language=Urdu}#2}%
+\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}
\newcommand\text@sindhi[2][\ax@mode]{%
\edef\@tempa{#1}%
@@ -365,14 +380,14 @@
{\ax@trans@style\addfontfeature{Mapping=arabtex-sindhi-trans}#2}%
\else%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Language=Sindhi} #2}%eventually Mapping=arabtex-utf
+\RL{\ax@sindhi@font\addfontfeature{Language=Sindhi} #2}%eventually Mapping=arabtex-utf
\else%
-\RL{\arabicfont%
+\RL{\ax@sindhi@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\@tempa,Language=Sindhi}#2}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-sindhi-\ax@mode,Language=Sindhi}#2}%
+\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}
\newcommand\text@pashto[2][\ax@mode]{%
\edef\@tempa{#1}%
@@ -383,37 +398,37 @@
{\ax@trans@style\addfontfeature{Mapping=arabtex-pashto-trans}#2}%
\else%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@pashto@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@pashto@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\@tempa}#2}%
\fi\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-pashto-\ax@mode}#2}%
+\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}
-\newcommand\text@turk[2][\ax@mode]{%
+\newcommand\text@ottoman[2][\ax@mode]{%
\edef\@tempa{#1}%
-\def\ax@lang{turk}%
+\def\ax@lang{ottoman}%
\ax@ismode@defined{\@tempa}%
\ifax@mode@defined%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@ottoman@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@ottoman@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\@tempa}#2}%
\fi%\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-turk-\ax@mode}#2}%
+\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}
\newcommand\text@kurdish[2][]{%
\edef\@tempa{#1}%
\def\ax@lang{kurdish}%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@kurdish@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@kurdish@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-kurdish,Language=Kurdish}#2}%
\fi%\fi%
\egroup}
@@ -423,14 +438,14 @@
\ax@ismode@defined{\@tempa}%
\ifax@mode@defined%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@kashmiri@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@kashmiri@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\@tempa}#2}%
\fi%\fi%
\else%
-\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-kashmiri-\ax@mode}#2}%
+\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}
\newcommand\text@malay[2][\ax@mode]{%
\edef\@tempa{#1}%
@@ -438,27 +453,30 @@
\ax@ismode@defined{\@tempa}%
\ifax@mode@defined%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@malay@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@malay@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\@tempa}#2}%
\fi%\fi%
\else%
\PackageWarning{arabxetex}{Mode \@tempa\ not defined, defaulting to \ax@mode}%
-\RL{\arabicfont\addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\ax@mode}#2}%
+\RL{\ax@malay@font\addfontfeature{Mapping=arabtex-\ax@font@allah-malay-\ax@mode}#2}%
\fi\egroup}
\newcommand\text@uighur[2][]{%
\edef\@tempa{#1}%
\def\ax@lang{uighur}%
\ifx\@tempa\ax@mode@utf%
-\RL{\arabicfont\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
+\RL{\ax@uighur@font\addfontfeature{Mapping=arabicfixes} #2}%evtl {Mapping=arabtex-utf}
\else%
-\RL{\arabicfont%
+\RL{\ax@uighur@font%
\addfontfeature{Mapping=arabtex-\ax@font@allah-uighur}#2}%
\fi%\fi%
\egroup}
-\newcommand{\textlatin}[1]{\LR{\rmfamily #1}}
-%% implement a parameter \ax@lang
+\newcommand{\textroman}[1]{\LR{\rmfamily #1}}
+\@ifpackageloaded{babel}{%
+\renewcommand{\textlatin}[1]{\textroman{#1}}
+\PackageWarning{babel}{You have loaded Babel. ArabXeTeX has now redefined \textlatin !}}%
+{\newcommand{\textlatin}[1]{\textroman{#1}}}%
\newcommand{\aemph}[1]{%
\edef\@tempb{\expandafter\noexpand\csname text\ax@lang\endcsname}%
$\overline{\text{\@tempb{#1}}}$}