%
% Copyright (C) 2008-2001 by Azzeddine LAZREK. All rights reserved.
%
% amcomman.tex
% This file belongs to the RyDArab package.
%


% Redéfinition de \m@ath de plain TeX
% au lieu d'utiliser : \makeatletter ... \makeatother
\def\ammath{\mathsurround=0pt}

%
\def\ammathchoice#1{\mathchoice%
 {#1\displaystyle\textstyle}%
 {#1\textstyle\scriptstyle}%
 {#1\scriptstyle\scriptscriptstyle}%
 {#1\scriptscriptstyle\scriptscriptstyle}}

% Inversion du déplacement de la droite vers la gauche
% en mode mathématique
\def\amrl#1{\amreflect#1\empty\tcelferma}
\def\amreflect#1#2\tcelferma{\ifx#1\empty\else\amreflect#2\tcelferma#1\fi}

%
\def\amrlpard#1$${\testr#1\eqno\eqno\testr}
\def\testr#1\eqno#2\eqno#3\testr{\if!#3!\testl#1\leqno\leqno\testl\else\amrl{#1}\eqno#2$$\fi}
\def\testl#1\leqno#2\leqno#3\testl{\if!#3!\amrl{#1}$$\else\amrl{#1}\leqno#2$$\fi}

%
\def\amrlparm#1${\amrl{#1}$}

%
\def\amarabenv{%
%%\funwithdots
\amarabletter
\amarabpunct
\amarabsym
\amcompatibility
}

%
%Définition du mode mathématique arabe
\def\amarabmath{%
\amarabenv
\everydisplay={\amrlpard}
\everymath={\amrlparm}
}

% Définition du mode mathématique roman
\def\amlatinmath{%
\amlatinletter
\amlatinpunct
\amlatinsym
\romanname
\eoption
\enplus
}

%
\def\annulation{%
%%\let\funwithdots=\relax
\let\amarabletter=\relax
\let\amarabpunct=\relax
\let\amarabsym=\relax
\let\amcompatibility=\relax
\let\amrlparm=\relax
}

%
\def\annulationl{%
%%\let\funwithdots=\relax
\let\amarabletter=\relax
\let\amarabpunct=\relax
\let\amarabsym=\relax
\let\amcompatibility=\relax
}

% Roman numerals forms with lower letters
\def\amloromnum#1{\hbox{\rm\romannumeral#1}}

% Roman numerals forms with upper letters
\def\amupromnum#1{\hbox{\rm\uppercase\expandafter{\romannumeral#1}}}

% Time definition
\def\amtime{\number\rmtime}

% Date Definition
\def\amday{\number\rmday}
\def\ammonth{\number\rmmonth}
\def\amyear{\number\rmyear}
\def\amnumtoday{\amyear / \ammonth / \amday}


% New function definition
\def\amnewfunc#1{\ammathpalette{%\novocalize
\hbox{ \araby{#1} }}}

%%
% Based alphabetic symbols with dots
\def\alphwithdots{
 }

%%
% Based alphabetic symbols without dots
\def\alphwithoutdots{
 }


% Définition de l'opérateur somme
\def\amlsum_#1^#2{\null\;\offinterlineskip
 \vcenter{\halign{\hfil${##}$\hfil\cr
 {\scriptstyle\amrl{#2}\hphantom{\ammgmued}}\cr
 {\amhrulefill \ammgmued}\cr
 {\scriptstyle\amrl{#1}\hphantom{\ammgmued}}\cr}}\;}

% Définition de l'opérateur produit
\def\amlprod_#1^#2{\null\;\offinterlineskip
 \vcenter{\halign{\hfil${##}$\hfil\cr
 {\hphantom{\gdaafd}\scriptstyle\amrl{#2}%
  \hphantom{\amgdaad}}\cr
 {\gdaafd\amhrulefill\amgdaad}\cr
 {\hphantom{\gdaafd}\scriptstyle\amrl{#1}%
  \hphantom{\amgdaad}}\cr}}\;}

%%
% Définition de l'opérateur limite
\def\amlim_#1{\null\;\offinterlineskip
 \vcenter{\halign{\hfil${##}$\hfil\cr
 {\hphantom{\amnhaytd}}\cr
 {\nhaytf\amhrulefill\amnhaytd}\cr
 {\hphantom{\nhaytf}\scriptstyle\amrl{#1}%
  \hphantom{\amnhaytd}}\cr}}}

%
\def\amto{\leftarrow}

%
\def\amleqm{\buildrel\scriptscriptstyle\amteryf \over =}
%\def\amleqm{\stackrel{\mbox{<tEr>}}{=}} %en LaTeX

%
\def\amseqm{\mathrel\amrl{:=}}

%
\def\amleqv{\buildrel\scriptscriptstyle\amteryf
 \over {\amLongleftrightarrow}}

% Définition de de l'indice et de l'exposant
\def\amsp#1{^{\amrl{#1}}}
\def\amsb#1{_{\amrl{#1}}}

% Définition de la fraction pour remplacer \over
\def\amfrac#1#2{{{\amrl{#1}} \over {\amrl{#2}}}}
%\def\amfrac#1#2{\rmfrac{\amrl{#1}}{\amrl{#2}}}

% Définition de l'opérateur somme Sigma
\def\amssum{\@ifnextchar _ {\amsbsum}%
 {\@ifnextchar \limits {\amsasum}{\amsumop}}}
\def\amsbsum_#1^#2{\amsb{#1}\amsp{#2\quad}\amsumop}
\def\amsasum\limits_#1^#2{\amsumop\limits\amsb{#1}\amsp{#2}}

% Définition de l'opérateur produit Pi
\def\amsprod{\@ifnextchar _ {\amsbprod}%
 {\@ifnextchar \limits {\amsaprod}{\amprodop}}}
\def\amsbprod_#1^#2{\amsb{#1}\amsp{#2\quad}\amprodop}
\def\amsaprod\limits_#1^#2{\amprodop\limits\amsb{#1}\amsp{#2}}

%%
% Définition de l'opérateur somme Sigma extensible
\def\amgsum_#1^#2{\ammathchoice{\amgsums{#1}{#2}.}}
\newbox\amsumlbox \newbox\amsumhbox \newbox\amsumtbox
\newdimen\wdt
{\catcode`\<=12
\gdef\amgsums#1#2.#3#4{%
 \setbox\amsumlbox=\hbox{$#1$}
 \setbox\amsumhbox=\hbox{$#2$}
 \setbox\amsumtbox=\hbox{$\amgsumop$}
 \ifdim\wd\amsumlbox < \wd\amsumhbox
 \setbox\amsumlbox=\hbox to \wd\amsumhbox{\hfill\box\amsumlbox\hfill}
 \advance\wdt by \wd\amsumhbox \advance\wdt by 1.5pt
% \setbox\amsumtbox=\hbox to \wdt{\box\amsumtbox}
 \setbox\amsumtbox=\hbox to \wdt{\hfill\box\amsumtbox}
 \else
 \setbox\amsumhbox=\hbox to \wd\amsumlbox{\hfill\box\amsumhbox\hfill}
 \advance\wdt by \wd\amsumlbox \advance\wdt by 1.5pt
% \setbox\amsumtbox=\hbox to \wdt{\box\amsumtbox}
 \setbox\amsumtbox=\hbox to \wdt{\hfill\box\amsumtbox}
 \fi
 \wdt=\ht\amsumtbox
 \hbox{\kern 0.35em \lower \wdt \vbox{\lineskip=-0.5pt
   \hbox{\underline{{\box\amsumhbox}}}
   \lineskip=-1.0pt
   \hbox{\underline{{\box\amsumtbox}}}
   \lineskip=1.0pt
   \hbox{\box\amsumlbox}}}}
  \kern 0.35em}

%%
% Définition de l'opérateur somme Sigma extensible Roman
\def\rmgsum_#1^#2{\ammathchoice{\rmgsums{#1}{#2}.}}
\newbox\amsumlbox \newbox\amsumhbox \newbox\amsumtbox
\newdimen\wdt
{\catcode`\<=12
\gdef\rmgsums#1#2.#3#4{%
 \setbox\amsumlbox=\hbox{$#1$}
 \setbox\amsumhbox=\hbox{$#2$}
 \setbox\amsumtbox=\hbox{$\rmgsumop$}
 \ifdim\wd\amsumlbox < \wd\amsumhbox
 \setbox\amsumlbox=\hbox to \wd\amsumhbox{\hfill\box\amsumlbox\hfill}
 \advance\wdt by \wd\amsumhbox \advance\wdt by 1.5pt
 \setbox\amsumtbox=\hbox to \wdt{\box\amsumtbox\hfill}
 \else
 \setbox\amsumhbox=\hbox to \wd\amsumlbox{\hfill\box\amsumhbox\hfill}
 \advance\wdt by \wd\amsumlbox \advance\wdt by 1.5pt
 \setbox\amsumtbox=\hbox to \wdt{\box\amsumtbox\hfill}
 \fi
 \wdt=\ht\amsumtbox
 \hbox{\kern 0.35em \lower \wdt \vbox{\lineskip=-0.5pt
   \hbox{\underline{{\box\amsumhbox}}}
   \lineskip=-1.0pt
   \hbox{\underline{{\box\amsumtbox}}}
   \lineskip=-1.0pt
   \hbox{\box\amsumlbox}}}}
  \kern 0.35em}

%%
% Définition de l'opérateur produit Pi
\def\amgprod_#1^#2{\ammathchoice{\amgprods{#1}{#2}.}}
\newbox\amprodlbox \newbox\amprodhbox \newbox\amprodtbox
\newdimen\wdt
{\catcode`\<=12
\gdef\amgprods#1#2.#3#4{%
 \setbox\amprodlbox=\hbox{$#1$}
 \setbox\amprodhbox=\hbox{$#2$}
 \setbox\amprodtbox=\hbox{$\amgprodopl\amgprodopr$}
 \ifdim\wd\amprodlbox < \wd\amprodhbox
 \setbox\amprodlbox=\hbox to \wd\amprodhbox{\hfill\box\amprodlbox\hfill}
 \advance\wdt by \wd\amprodhbox \advance\wdt by 1.5pt
 \setbox\amprodtbox=\hbox to \wdt{\hfill\box\amprodtbox\hfill}
 \else
 \setbox\amprodhbox=\hbox to \wd\amprodlbox{\hfill\box\amprodhbox\hfill}
 \advance\wdt by \wd\amprodlbox \advance\wdt by 1.5pt
 \setbox\amprodtbox=\hbox to \wdt{\hfill\box\amprodtbox\hfill}
 \fi
 \wdt=\ht\amprodtbox
 \hbox{\kern 0.35em \lower \wdt \vbox{\lineskip=-0.5pt
   \hbox{\underline{{\box\amprodhbox}}}
   \lineskip=-1.0pt
   \copy\amprodtbox
   \lineskip=1.0pt
   \hbox{\box\amprodlbox}}}}
  \kern 0.35em}

% Definition de l'intégrale
\def\amsint{\@ifnextchar _ {\amsbint}%
 {\@ifnextchar \limits {\amsaint}{\amintop}}}

\def\amsaint\limits_#1^#2{\amintop\limits\amsb{#1}\amsp{\quad#2}}
%\def\amsaint\limits_#1^#2{\displaystyle\amintop\limits\amsb{#1}\amsp{\quad#2}}

\def\amsbint_#1^#2{\ammathchoice{\amsints{\amrl{#1}}{\amrl{#2}}.}}
\newbox\amintbox \newbox\amintlbox \newbox\aminthbox
\newdimen\amintlhkern \newdimen\amintlhwidth
{\catcode`\<=12
\gdef\amsints#1#2.#3#4{%
 \setbox\amintbox=\hbox{$#3\amintop$}%
 \dimen\amintlhwidth=\wd\amintbox
 \divide\dimen\amintlhwidth by 2%
 \wd\amintbox=\dimen\amintlhwidth
 \setbox\amintlbox=\hbox{$#4 #1$}%
 \setbox\aminthbox=\hbox{$#4 #2$}%
 \ifdim\wd\aminthbox<\dimen\amintlhwidth
 \setbox\aminthbox=\hbox to\dimen\amintlhwidth{\hfill\box\aminthbox}%
 \else
 \dimen\amintlhwidth=\wd\aminthbox
 \advance\dimen\amintlhwidth by \wd\amintbox
 \setbox\amintlbox=\hbox to\dimen\amintlhwidth{\hfill\box\amintlbox}%
 \fi
 \mathop{\vrule height \ht\amintbox depth \dp\amintbox width 0pt}%
 \nolimits_{\box\amintlbox}^{\box\aminthbox}\hbox{\hglue-\wd\amintbox}%
 % \hbox{$#3\amintop$}}
 \amintop} }

%
%\def\amlasqrt[#1]#2{\amsqrt#2\of#1}

% Definition de la racine carree
\def\amsqrt{\mathpalette\amsqrts}

\newbox\amsqrtbox \newdimen\amsqrtdimen
\def\amsqrts#1#2{%
%\def\amsqrts#1{%
% \setbox\amsqrtbox=\hbox{$#1\amsqrtop{\vphantom{\amrl{#2}}}$}
% \setbox\amsqrtbox=\hbox{${\annulation{\amsqrtop{\vphantom{\amrl{#2}}}}}$}%
 \setbox\amsqrtbox=\hbox{${{{\amsqrtop{\vphantom{\amrl{#2}}}}}}$}%
 \dimen\amsqrtdimen=\ht\amsqrtbox
 \advance\dimen\amsqrtdimen by -.07em%
  %descendre l'exp barrée %
%\vbox{\offinterlineskip\hrule\hbox{{$\ammath#1{\amrl{#2}}$}%
% \vbox{\offinterlineskip\hrule\hbox{{$\amrl{#2}$}%
 \vbox{\offinterlineskip\hrule\hbox{{${#2}$}%
 \vrule height \dimen\amsqrtdimen width0pt}}%
 \mkern0.5mu\box\amsqrtbox}
  %éloinger l'exp barrée du radical

% Définition de la racine nième
\newbox\amrootbox
\def\amroot#1\of{\setbox\amrootbox=%
 \hbox{${{\ammath \scriptscriptstyle{\amrl#1}}}$}%
 \mathpalette\amrootop}
\def\amrootop#1#2{\setbox0=\hbox{${{{\ammath \amsqrt{#2}}}}$}%
 \dimen0=\ht0 \advance\dimen0 by-\dp0%
 \box0 \mkern-11mu \raise.6\dimen0\copy\amrootbox }

% Définition de l'intégrale
\def\amlint{\@ifnextchar _ {\amlbint}%
 {\@ifnextchar \limits {\amlaint}{\amlintop}}}

\def\amlaint\limits_#1^#2{\amlintop\amsb{#1}\amsp{#2}}

\def\amlbint_#1^#2{\ammathchoice{\amsb{#1}\amsp{#2}\amlintop\nolimits}}
\def\amlintop{\mathop\ammusintop\limits}
\def\ammusintop{{\lower7pt\vbox{\ialign{$##$\crcr
 \ammusintopu\crcr\noalign{\nointerlineskip}%
 \ammusintopl\crcr}}}}

%%
% Définition du symbole de la racine
\def\amsurd{{^\amsurdop}}

% Définition de la racine carrée
% anciènne version
\def\aamsqrt#1{\overline{\amrl{#1}}%
 \amsqrtop{\vphantom{\amrl{#1}}}}

% Définition de la racine nième
% anciènne version
\newbox\aamrootbox
\def\aamroot#1\of{\setbox\aamrootbox=%
 \hbox{$\ammath \scriptscriptstyle{\amrl{#1}}$}%
 \mathpalette\amrootop}
\def\aamrootop#1#2{\setbox0=\hbox{$\ammath #1\aamsqrt{#2}$}%
 \dimen0=\ht0 \advance\dimen0 by-\dp0%
 \box0 \mkern-9mu \raise.6\dimen0\copy\amrootbox }

%
\def\amrlcr#1{\if!#1!\else\amrlcrl#1\amrlcrr\fi}
\def\amrlcrl#1\cr#2\amrlcrr{\if!#2!\amrl{#1}\cr\else\amrl{#1}\cr\amrlcr{#2}\fi}

% Définition d'un système d'équations
% n'existe pas en plain TeX
\def\amsystem#1{\amsystemx{\amrlcr{#1}}}
\def\amsystemx#1{\rmleft.\vcenter{\normalbaselines\ammath
 \ialign{\hfil$##$& {\ }\hfil$##$\crcr
 #1\crcr}}
  \rmright\rmrbrace}

%%
% Définition de fonction définie par parties
\def\amcases#1{\amcasesx{\amrlcr{#1}}}
\def\amcasesx#1{\rmleft.\vcenter{\normalbaselines\ammath
 \ialign{\hfil$##$& \quad\hfil$##$\crcr
 #1\crcr}}
  \rmright\amlbrace}

% Définition de matrice
\def\ammatrix#1{\ammatrixx{\amrlcr{#1}}}
\def\ammatrixx#1{\vcenter{\normalbaselines\ammath
 \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
  {\mathstrut}\crcr \noalign{\kern-\baselineskip}
  #1\crcr
  {\mathstrut}\crcr \noalign{\kern-\baselineskip}}}}

% Left Numérotation des équations
%\def\amleqno#1{\quad\eqno\amrl{(#1)}\quad}

% Right Numérotation des équations
%\def\amreqno#1{\quad\leqno\amrl{(#1)}\quad}

\def\amXpoint#1(#2,#3){\rlap{\kern#2\baselineskip
 \raise#3\baselineskip\hbox{$\scriptstyle
 \amrl{\bullet\;#1(#2,#3)}$}}}

\def\amYpoint#1 #2 {\vbox to0pt{\kern-#2\baselineskip
 \hbox{\kern#1\baselineskip$\scriptstyle
  \amrl{\bullet\; (#1,#2)}$}\vss}
%\nointerlineskip
}

%
\let\amlangle=\rangle
\let\amrangle=\langle

%
\let\amlbrace=\rbrace
\let\amrbrace=\lbrace

%
\let\amleft=\right
\let\amright=\left
%\let\interb=\left \let\left=\right \let\right=\interb

%
\let\amLeftarrow=\Rightarrow
\let\amRightarrow=\Leftarrow

%
\def\amLongleftrightarrow{\Rightarrow\!\Leftarrow}

%
\let\amin=\ni
\let\amni=\in
%\let\intera=\in \let\amin=\ni \let\amni=\intera

% Définition du symbole de l'angle
\def\amangle{{\,\vbox{\ialign{${{\ammath\scriptstyle##}}$\crcr
 \backslash\crcr
 \noalign{\nointerlineskip}%
 \mkern0mu\leaders\hrule height.34pt\hfill\mkern2.5mu\crcr}}}}

%
%\mathchardef\amcdotp="6
%\def\amcdots{\mathinner{\amcdotp\amcdotp\amcdotp}}
%\def\amcdots{{\hbox{\raise17pt{${\annulation{...}}$}}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\def\amcdots{{\hbox{\raise17pt{${{...}}$}}}}

%
\def\amlating{{\amlatinpunct ,}}

% Left equations numbering
\def\amleqno#1{\rmleqno{\amrl{(#1)}}}

% Right equations numbering
\def\amreqno#1{\rmreqno{\amrl{(#1)}}}
%\let\reqno=\eqno\relax

% Left system of equations numbering
%\def\amllap#1{\rmllap{$\amrl{(#1)}$}}

% Right system of equations numbering
%\def\amrlap#1{\rmrlap{$\amrl{(#1)}$}}

%
\def\ambig#1{{\hbox{${{\rmleft#1\vbox to 8.5pt{}\rmright.\n@space}}$}}}
\def\amBig#1{{\hbox{${{\rmleft#1\vbox to 11.5pt{}\rmright.\n@space}}$}}}
\def\ambigg#1{{\hbox{${{\rmleft#1\vbox to 14.5pt{}\rmright.\n@space}}$}}}
\def\amBigg#1{{\hbox{${{\rmleft#1\vbox to 17.5pt{}\rmright.\n@space}}$}}}

%
%\def\overline{\relax \ifmmode \@@underline {#1}\else $\@@underline {\hbox {#
%1}}\m@th $\relax \fi}

%
\def\amwidehat#1{\annulation{\rmwidehat{\amrl{#1}}}}
\def\amwidetilde#1{\annulation{\rmwidetilde{\amrl{#1}}}}
%\def\amoverbrace#1{\annulation{\rmoverbrace{\amrl{#1}}}}
%\def\amunderbrace#1{\annulation{\rmunderbrace{\amrl{#1}}}}
\def\amoverline#1{\annulation{\rmoverline{\amrl{#1}}}}
\def\amunderline#1{\annulation{\rmunderline{\amrl{#1}}}}
\def\amoverleftarrow#1{\annulation{\rmoverleftarrow{\amrl{#1}}}}
\def\amoverrightarrow#1{\annulation{\rmoverrightarrow{\amrl{#1}}}}

%
\def\am@transform#1#2{%
 \def#1##1{#2{\amrl{##1}}}%
}

%\am@transform\amwidehat{\annulation\rmwidehat}
%\am@transform\amwidetilde{\annulation\rmwidetilde}
\am@transform\amoverbrace{\annulation\rmoverbrace}
\am@transform\amunderbrace{\annulation\rmunderbrace}
%\am@transform\amoverline{\annulation\rmoverline}
%\am@transform\amunderline{\annulation\rmunderline}
%\am@transform\amoverleftarrow{\annulation\rmoverleftarrow}
%\am@transform\amoverrightarrow{\annulation\rmoverrightarrow}

% Numerotation par des lettres arabes
% Adaptation de la macro de T. Murphy
\makeatletter
\def\amarabe#1{\expandafter\am@arabe\csname c@#1\endcsname}
\def\am@arabe#1{\ifcase#1\or$a$\or$b$\fi}
%\renewcommand{\theenumi}{\amarabe{enumi}}
%\def\theenumi{\amarabe{enumi}}
% Il faut enlever % de l'un des deux commandes precedentes
\makeatother
%\araballow\enumerate

%
\def\amepercent{{\raise1.1ex\hbox{${{\amearabnum\scriptstyle{0}}}$}\!/\!{\amearabnum\scriptstyle{0}}}}
\def\amepermille{{\raise1.1ex\hbox{${{\amearabnum\scriptstyle{0}}}$}\!/\!{\amearabnum\scriptstyle{00}}}}


%
\def\arhbox#1{{\rmhbox{ \araby{#1} }}}

%
\def\arfrhbox#1{%
\def\arg{#1}
 \ifx\arg\arw {\rmhbox{ \frw }}
\else\ifx\arg\araw {\rmhbox{ \fraw }} \else\ifx\arg\armrt
{\rmhbox{ \frmrt }} \else\ifx\arg\arzwjy {\rmhbox{ \frzwjy
}}\else\ifx\arg\arfrdy {\rmhbox{ \frfrdy }} \else\ifx\arg\arida
{\rmhbox{ \frida }} \else\ifx\arg\aridalm {\rmhbox{ \fridalm }}
\else\ifx\arg\arbhyt {\rmhbox{ \frbhyt }} \else   {\rmhbox{
\frmsklt }} \fi\fi\fi\fi\fi\fi\fi\fi }

%
\def\arenhbox#1{%
\def\arg{#1}
 \ifx\arg\arw {{\rmhbox{ \enw }}}
\else\ifx\arg\araw {{\rmhbox{ \enaw }}} \else\ifx\arg\armrt
{{\rmhbox{ \enmrt }}} \else\ifx\arg\arzwjy {\rmhbox{ \enzwjy
}}\else\ifx\arg\arfrdy {\rmhbox{ \enfrdy }} \else\ifx\arg\arida
{{\rmhbox{ \enida }}} \else\ifx\arg\aridalm {{\rmhbox{ \enidalm
}}} \else\ifx\arg\arbhyt {{\rmhbox{ \enbhyt }}} \else   {{\rmhbox{
\enmsklt }}} \fi\fi\fi\fi\fi\fi\fi\fi }

%
\def\frw{et}
\def\fraw{ou}
\def\frmrt{fois}
\def\frida{si}
\def\frzwjy{pair}
\def\frfrdy{impair}
\def\fridalm{sinon}
\def\frbhyt{tel que}
\def\frmsklt{PROBL\`EME !!!}

%
\def\enw{and}
\def\enaw{or}
\def\enmrt{times}
\def\enida{if}
\def\enzwjy{even}
\def\enfrdy{odd}
\def\enidalm{otherwise}
\def\enbhyt{such as}
\def\enmsklt{PROBLEM !!!}

%%
%
\def\artofr{%
\let\amhbox=\arfrhbox\relax}

\def\artoen{%
\let\amhbox=\arenhbox\relax}

\def\artoar{%
\let\amhbox=\arhbox\relax
}

%
\def\amother{}

%Roman Mathematical

%
\def\rmsystem#1{\left\{\vcenter{\normalbaselines\ammath
 \ialign{$##$\hfil& {\ }$##$\hfil\crcr
 #1\crcr}}
  \right.}

%%
%
\def\rmcases#1{\left\{\vcenter{\normalbaselines\ammath
 \ialign{$##$\hfil& \quad$##$\hfil\crcr
 #1\crcr}}
  \right.}

%
\def\rmwpercent{\%}

%
\def\rmwpermille{{\raise0.7ex\hbox{${{\scriptscriptstyle{0}}}$}\!/\!{\scriptscriptstyle{00}}}}

%
\def\rmleqm{\buildrel\scriptscriptstyle\hbox{def} \over =}

%
\def\rmleqv{\buildrel\scriptscriptstyle\hbox{def}
 \over \Longleftrightarrow}

%
\def\rmfrac#1#2{{{#1} \over {#2}}}

% New function definition
\def\rmnewfunc#1{\mathop{\rm #1 }\nolimits}

%
\def\rmarccot{\rmnewfunc{arccot}}
\def\rmarcsec{\rmnewfunc{arcsec}}
\def\rmarccsc{\rmnewfunc{arccsc}}
\def\rmsech{\rmnewfunc{sech}}
\def\rmcsch{\rmnewfunc{csch}}
\def\rmarcsinh{\rmnewfunc{arcsinh}}
\def\rmarccosh{\rmnewfunc{arccosh}}
\def\rmarctanh{\rmnewfunc{arctanh}}
\def\rmarccoth{\rmnewfunc{arccoth}}
\def\rmarcsech{\rmnewfunc{arcsech}}
\def\rmarccsch{\rmnewfunc{arccsch}}
%\def\rmlg#1{{\rmsb{#1}\rmnewfunc{lw}}}
%\def\rmexp#1{{\rmsp{#1}\rmnewfunc{qh-}}}

% Time definition
%\def\rmtime{\number\rmtime}

% Date Definition
\def\rmday{\number\rmday}
\def\rmmonth{\number\rmmonth}
\def\rmyear{\number\rmyear}
\def\frnumtoday{\rmday / \rmmonth / \rmyear}

% Arabic western form date
\def\frtoday{\rmday \ {\hbox{%
 \ifcase\rmmonth \or janvier\or f\'evrier\or mars\or avril\or may\or juin\or
 juillet\or ao\^ut\or septembre\or octobre\or novembre\or d\'ecembre \fi }}%
 \ \rmyear}

%%
% Divers
\def\amhamzaonwaw{\displaystyle\stackrel{\displaystyle \hamzaA}{\displaystyle \wawA}}
\def\amhamzaonyeh{\displaystyle\stackrel{\displaystyle \hamzaA}{\displaystyle \Behd}}
\def\amdiaca#1{\stackrel{\scriptscriptstyle#1}{\circlep}}
\def\amdiacb#1{\raise-3pt\hbox{$\stackrel{\textstyle\circlep}{\scriptscriptstyle#1}$}}
\def\superp#1#2{\buildrel\scriptscriptstyle#1 \over #2}
\def\rmwpertenthousand{{\raise0.7ex\hbox{${{\scriptscriptstyle{0}}}$}\!/\!{\scriptscriptstyle{000}}}}
\def\amepertenthousand{{\raise1.1ex\hbox{${{\amearabnum\scriptstyle{0}}}$}\!/\!{\amearabnum\scriptstyle{000}}}}


\def\amtail#1{{\ammathpalette{\tail}\hbox{\araby{#1}}}}
\def\amfin#1{{\ammathpalette{\tailb}\hbox{\araby{#1}}}}


% Redéfinition de \hrulefill
\def\amhrulefill{\cleaders\hbox{${{\ammath\mkern-2mu%
 \kashidah\mkern-2mu}}$}\hfill}


\endinput
