%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% alatex.sty
% LaTeX extensions for ArabTeX
% 10.07.94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) Klaus Lagally
%     Institut fuer Informatik
%     Universitaet Stuttgart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version = {3.02}  		\datum = {10.07.94} 
\message {\the\version }	\message {(\the\datum )}

\edef \arabtexconfig {\arabtexconfig 
alatex.sty \the\version \space (\the\datum) }

%%%%%%%%%%%%%%%%%%% \footnote in an arabic environment %%%%%%%%%%%%%%%

% make LaTeX \footnote catcode-safe, like in Plain TeX

\def \@footnotetext {\insert \footins \bgroup
\footnotesize \interlinepenalty \interfootnotelinepenalty
\splittopskip \footnotesep \splitmaxdepth \dp \strutbox
\floatingpenalty \@MM \hsize \columnwidth \@parboxrestore
\edef \@currentlabel {\csname p@footnote\endcsname \@thefnmark }%
\@makefntext {\rule {\z@ }{\footnotesep }}\futurelet \next \fo@t }

\def \@mpfootnotetext {\global \setbox \@mpfootins \vbox \bgroup
\unvbox \@mpfootins \reset@font \footnotesize \hsize \columnwidth 
\@parboxrestore 
\edef \@currentlabel {\csname p@mpfootnote\endcsname \@thefnmark }%
\@makefntext {\rule {\z@ }{\footnotesep }}\futurelet \next \fo@t }

\def \fo@t {\ifcat \bgroup \noexpand \next \let \next \f@@t
\else \let \next \f@t \fi \next }

\def \f@@t {\bgroup \aftergroup \@foot \let \next }

\def \f@t #1{#1\@foot }

\def \@foot {\unskip \strut \egroup }

% ArabTeX-LaTeX \footnote

\def \a@c@footnote {% LaTeX version
\rm \parindent \a@parindent \unarab@codes \def \@foot 
{\unskip \strut \egroup \arab@codes \set@arabfont \test@token }%
\def \@footnotemark {\a@spacefalse \putwordb@x \@makefnmark }%
\footnote }

%%%%%%%%%%%%%%%%%%%%%% enable LaTeX commands %%%%%%%%%%%%%%%%%%%%%%%%%%%

\all@wcmd \tiny         \all@wcmd \footnotesize \all@wcmd \small
\all@wcmd \normalsize   \all@wcmd \large        \all@wcmd \Large
\all@wcmd \LARGE        \all@wcmd \huge         \all@wcmd \Huge

\def \a@c@input {\expandafter \test@token \@@input }

\def \Arabic #1{\@Arabic {\@nameuse {c@#1}}}

\def \@Arabic #1{{\set@arabfont \number #1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def \a@c@begin #1{% call \a@c@#1
\@ifundefined {a@c@#1}%
{\def \@tempa {\@latexerr {Environment #1 undefined}\@eha \test@token }}%
{\def \@tempa {\def \@currenvir {#1}\csname a@c@#1\endcsname }}%
\begingroup \let \end \a@@end \@endpefalse \@tempa }

\def \a@@end #1{% call \end#1
\csname end#1\endcsname \@checkend {#1}%
\if@endpe \global \let \@gtempa \@doendpe
\else \global \let \@gtempa \relax
\fi \endgroup \@gtempa
\test@token }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

