%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% apatch.sty
% last minute corrections
% see \datum and \level at the end of the file
% template: 16.09.2001
\version = {3.10}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) Klaus Lagally
%     Institut fuer Informatik
%     Universitaet Stuttgart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this is just another *.sty file
% you do not have to do any manual patching
% just put this file onto the TEXINPUT path
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chardef \patchatcode = \catcode`\@            \catcode`\@ = 11
\chardef \patchdqcode = \catcode`\"            \catcode`\" = 12

\edef \next {\the\version}
\ifx \next \theversion \else \edef \next {\errmessage 
{This patch file only works with ArabTeX version \the\version }}
\next \def \a@patchlevel {-undefined-}
\xpa \endinput 
\fi

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

% presently no patches

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% two passes with LaTeX;  see: alatex.sty

%\iffalse			% no patches yet; otherwise: delete !
\ifx \LaTeX \undefined \else
\ifx \a@patchlevel \undefined % first patching run
\let \a@@@document \a@document
%\let \a@@document \document	
%\def \document {\a@@document \setnone \input {apatch.sty}}
%\def \document {\setnone \input {apatch.sty}\a@@document }
\a@extend \document {\setnone \input {apatch.sty}}
\else % second pass after loading all modules
\let \a@document \a@@@document
\fi\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% patch patterns:

\ifx \a@patchlevel \undefined % load only the first time
% patches on first pass
\else
% patches on second pass
\fi

\ifx \a@hebr \undefined \else
%\a@message {Hebrew mode patches}
\fi

\ifx \LaTeX \undefined \else
%\a@message {LaTeX mode patches}
\fi
%\fi 				% no patches yet; otherwise: delete !

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {17.09.2001}		\def \level {-}	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% abidir.sty

\def \a@Rdimen #1{% get the dimensions of the first two words
\setbox\a@Rboxii \hbox {}\setbox\a@Rdummyii \box\a@Rboxii
\a@Rfirst #1 \to \a@wordi \a@Rrest
\xpa \a@Rwordtobox \a@wordi \to \a@Rboxi \a@Rdummyi
\ifx \space \a@Rrest \else
\ifx \relax \a@Rrest \relax \else 
\xpa \a@Rfirst \a@Rrest \to \a@wordii \a@Rrest 
\xpa \a@Rwordtobox \a@wordii \to \a@Rboxii \a@Rdummyii 
\fi\fi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% atrans.sty

\gdef \x@s #1{\oalign{#1\crcr\hidewidth \sh@ft{34}% accent for _h
    \vbox to -.2ex {\hbox{\char'25}\vss}\hidewidth}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% acmd.sty

\def \a@c@protect {\test@token }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabtex.sty

\ifx \@\undefined \def \@{@}\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabtex.tex

\ifx \LaTeX \undefined 
\font \xnash	=xnsh14       
\font \xnashbf	=xnsh14bf       
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% abidir.sty

% todo: check!

\def \a@RL {% RL insertion inside Ltext
%\lineskiplimit -20pt	% enforce uniform baselines 
% deleted, problems within \tabular
\bgroup \arab@codes \set@arabfont \@waslafalse \@wasfalse \a@@Rinsert }

\def \a@RL {% RTL insertion inside LRtext
\lineskiplimit -.9\baselineskip % enforce uniform baselines 
\bgroup \arab@codes \set@arabfont \@waslafalse \@wasfalse \a@@Rinsert }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx \a@hebr \undefined \else
% Hebrew patches
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hewrite.sty -> 3.10a

\gdef \h@put@mid #1#2+#3*#4<{% deposit character         
% c m1 + m2 * c <
%	\def \next {\heb@mid #4}%
\ifnum \act@cd = \hc@@ \relax \h@put@ill \else   % illegal character
\case #1\of
{	B{\put@maqqef \def \next {\heb@end #4}}
	K{\put@box {$|$}}
	M{\put@box {$\Box$}}
       WN{\put@phantom }
        y{\h@ylig #4<}
        w{\h@wlig #4<}
\default {\h@putchar }
}\endcase
\fi \heb@accent #2+#3*\h@kern 
\ifnum \act@cd = \hc@l \smash {\unhbox \ab@x }\else \unhbox \ab@x 
\fi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% heparse.sty -> 3.10a

\gdef \test@cont #1{% vowel contact? put dummy if not cholem male
\ifx #1O\def \next {\syl@con #1}\else
\ifx #1U\def \next {\syl@con #1}\else
\if\is@vowel #1\def \next {\syl@con N#1}\else
\def \next {\syl@con #1}\fi\fi\fi \next }

\def \test@patf #1{% vowel contact? put dummy, test for guttural: 05.10.01
\ifx #1O\def \next {\test@p@tf #1}\else
\ifx #1U\def \next {\test@p@tf #1}\else
\if\is@vowel #1\def \next {\syl@con N#1}\else
\def \next {\test@p@tf #1}\fi\fi\fi \next }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\a@message {Hebrew mode patches}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {06.10.2001}		\def \level {a1}	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% alatex.sty

\ifx \LaTeX \undefined \else

\def \@footnotetext {% new, do not yet read footnote text
\insert \footins \bgroup 
\ifx \footglue \undefined % prepare normal footnote
\interlinepenalty \interfootnotelinepenalty \floatingpenalty \@MM 
\splittopskip \footnotesep \splitmaxdepth \dp \strutbox 
\else \global\long\def \@makefntext ##1{{$^{\@thefnmark }$}##1\nobreak }%
\setbox0=\hbox \bgroup % fnpara.sty is present
\floatingpenalty=20000 \footnotesize \fi 
\edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
\a@mkfntext }

\def \@mpfootnotetext {\global \setbox \@mpfootins \vbox \bgroup
\edef \@currentlabel {\csname p@mpfootnote\endcsname \@thefnmark }%
\unvbox \@mpfootins \reset@font \a@mkfntext }

\def \a@c@footnote {% ArabTeX-LaTeX version
\def \@foot {\ifx \footglue \undefined \unskip \strut % normal case
\else \penalty-10 \hskip\footglue \egroup % box 0
\dp0=0pt \ht0=\fudgefactor\wd0 \box0 % fnpara.sty is present
\fi \egroup \arab@codes \set@arabfont \test@token }%
\def \@footnotemark {\iftrans \unskip \,\nobreak \@makefnmark {\,}\fi 
\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi }%
\footnote }

\def \a@c@footnotemark {% ArabTeX-LaTeX version
\def \@footnotemark {\iftrans \unskip \,\nobreak \@makefnmark {\,}\fi 
\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi 
\arab@codes \test@token }%
\unarab@codes \footnotemark }

\def \a@c@footnotetext {%
\footnotetext }

\def \a@fntext {% common part for footnote text
\rm \parindent \a@parindent \unarab@codes 
\footnotesize \hsize \columnwidth \@parboxrestore \clubpenalty 5000
\@makefntext {\rule {\z@ }{\footnotesep }}\futurelet \next \fo@t }

\def \a@@fntext #1{% common part for footnote text
\def \@footnotemark {\a@spacefalse \putwordb@x \@makefnmark \a@spacetrue }%
\def \end {\a@par \egroup \test@token }%
\a@hsize \columnwidth \hsize \columnwidth \@parboxrestore 
\initlineb@x \putwordb@x \@makefnmark \a@spacetrue
\arabtrue \test@token #1 \end }

\def \LRfootnotes {% right to left, Arabic text
\def \a@mkfntext {\a@fntext }}

\LRfootnotes

\def \RLfootnotes {% right to left, Arabic document
\def \a@mkfntext {\a@@fntext }}

\def \arabfootnotes {% right to left, Arabic document
\def \a@mkfntext {\a@@fntext }}

\fi % LaTeX

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {12.02.2002}			\def \level {b}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabtex.sty

\ifx \nil \undefined \def \nil {NIL}\fi

\setarab % correct patching effect

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% alatex.sty

\ifx \LaTeX \undefined \else

\def \a@@mkfntext {% common part for LR footnote text
\footnotesize \hsize \columnwidth \@parboxrestore \clubpenalty 5000
\@makefntext {\rule {\z@ }{\footnotesep }}\futurelet \next \fo@t }

\def \a@fntext {% common part for LR footnote text, Roman mode
\rm \parindent \a@parindent \unarab@codes \a@@mkfntext }

\def \a@c@footnote {% ArabTeX-LaTeX version
\def \@foot {\ifx \footglue \undefined \unskip \strut % normal case
\else \penalty-10 \hskip\footglue \egroup % box 0
\dp0=0pt \ht0=\fudgefactor\wd0 \box0 % fnpara.sty is present
\fi \egroup \arab@codes \set@arabfont \test@token }%
\def \@footnotemark {\iftrans \unskip \,\nobreak \@makefnmark {\,}\fi 
\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi }%
\let \a@mkfntext \a@mk@fntext \footnote }

\def \a@@@fntext #1{% common part for RL footnote text, Roman mode
\def \@footnotemark {\a@spacefalse \putwordb@x \@makefnmark \a@spacetrue }%
\def \end {\a@par \egroup }%
\a@hsize \columnwidth \hsize \columnwidth \@parboxrestore 
\the\arabtext@hook \putwordb@x \@makefnmark \a@spacetrue
\test@token #1 \end }

\def \a@c@footnotetext {%
\let \a@mkfntext \a@mk@fntext \footnotetext }

\def \LRfootnotes {% right to left, Arabic text
\def \a@mk@fntext {\a@fntext }
\def \a@mkfntext {\a@@mkfntext }}

\LRfootnotes

\def \RLfootnotes {% right to left, Arabic document
\def \a@mk@fntext {\a@@fntext }%
\def \a@mkfntext {\a@@@fntext }}

\def \arabfootnotes {% right to left, Arabic document
\def \a@mk@fntext {\a@@fntext }%
\def \a@mkfntext {\a@@@fntext }}

\fi % LaTeX

\iffalse
\def \def@arabstrut {\def \arab@strut {\if@vocals 
%\vrule height2.5ex depth2.0ex width\z@ \relax \else
\vrule height2ex depth1.5ex width\z@ \relax \else
%\vrule height3ex depth1.5ex width\z@ \relax \else
\vrule height2ex depth1.0ex width\z@ \relax \fi }}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabext.sty

\def \a@endtabular {\a@@endtabular \advance \parfillskip \rightskip 
\rightskip \leftskip \leftskip \parfillskip \parfillskip \z@ \par }

\def \a@c@hline {% \\ missing
\errmessage{table row not terminated: \string\\ inserted; proceed.}%
\test@token \\ \hline }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% abjad.sty

\def \abjad #1{% inside a Roman environment
\edef \the@bjad {\abj@d {#1}}%
\novocalize \arabtrue \transfalse \RL {\stdcode {\the@bjad }}%
\iftrans {\set@transfont \ \trans@text #1 \end }\fi }

\allowarab \the@bjad

% NOTE: \abj@d is fully expandable

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ascan.sty

\def \setcode #1{% switch the input encoding
\lowercase {\def \sc@code {#1}%
\ifx \sc@code \sc@oldcode \else
\begingroup \def \sc@lookup ##1#1##2##3\@@ {\endgroup ##2}%
\xpa \sc@lookup \sc@table #1\sc@default \@@ \fi }%
\let \sc@oldcode \sc@code }

\pdef \stdcode #1{% prepare temp switch to standard
\let \a@oldcode \sc@code \sc@standard \test@token #1 \@stdcode }

\def \a@c@@stdcode {\xpa\setcode\xpa{\a@oldcode }}

\all@w@ne \stdcode
\xpa \all@w@ne \csname stdcode \endcsname

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabrep.cls

\ifx \a@part \undefined \else

% tableofcontents = al-mu.htawayAtu
% listoffigures = qA'imaTu al-.suwaru
% listoftables = qA'imaTu al-^gadAwilu
% listofpictures = qA'imaTu al-rusUmu
% bibliography = al-marA^gi`u
% references = al-ma.sAdiru
% index = al-fihrisu (al-fihristu)
% chapter = al-fa.slu
% appendix = al-mul.haqu
% abstract = al-mula_h_ha.su
% attachments = al-murfaqAtu
% number = al-raqmu

\def\bibname        {\stdcode{al-marA^gi`u}}
\def\refname        {\stdcode{al-ma.sAdiru}}
\def\indexname      {\stdcode{al-fihristu}}
\def\figurename     {\stdcode{.sUraTuN}}
\def\tablename      {\stdcode{^gadwaluN}}
\def\partname       {\stdcode{al-^guz'u}}
\def\chaptername    {\stdcode{al-fa.slu}}
\def\appendixname   {\stdcode{al-mul.haqu}}
\def\abstractname   {\stdcode{al-mula_h_ha.su}}

\at@arabtext {% switch to Arabic terms
\def\contentsname   {\stdcode{al-mu.htawayAtu}}
\def\listfigurename {\stdcode{qA'imaTu al-.suwari}}
\def\listtablename  {\stdcode{qA'imaTu al-^gadAwili}}
}
\fi

\def\a@makechapterhead #1{% make heading with number
	\null \vskip 50\p@ 
\begingroup \let \end \a@@par \a@@raggedright \interlinepenalty\@M
	\a@normalfont \bfseries
	\ifnum \c@secnumdepth >\m@ne
	\if@mainmatter
		\edef \thechapter {\thechapter }%
		\huge \set@arabfont \test@token \@chapapp {\thechapter} \end 
		\nobreak \vskip 20\p@
	\fi\fi
	\Huge \set@arabfont \test@token #1 \end 
	\nobreak \vskip 40\p@
\endgroup }

\allowarab \@chapapp

\def\a@c@appendix{%\par
	\setcounter{section}{0}%
	\renewcommand\@chapapp {\appendixname }%
\ifa@article \renewcommand\thesection {\@abjad \c@section }%
	\setcounter{subsection}{0}%
\else \renewcommand\thechapter {\@abjad \c@chapter }%
	\setcounter{chapter}{0}%
\fi \test@token }

\def \a@chapter [#1]#2{% numbered chapter
\ifnum \c@secnumdepth >\m@ne
	\if@mainmatter
		\refstepcounter {chapter}%
		\typeout {\@chapapp \space \thechapter.}%
		\addcontentsline {toc}{chapter}%
		{\protect\numberline 
		{\protect\RL{\protect\stdcode{\thechapter }}}%
		\protect\RL {#1}}%
	\else \addcontentsline {toc}{chapter}{\protect\RL {#1}}%
	\fi		     
\else \addcontentsline {toc}{chapter}{\protect\RL {#1}}%
\fi
\chaptermark{\RL {#1}}%
\addtocontents {lof}{\protect\addvspace {10\p@}}%
\addtocontents {lot}{\protect\addvspace {10\p@}}%
\if@twocolumn \@topnewpage [\a@makechapterhead {#2}]%
\else 	\a@makechapterhead {#2}\a@afterheading
\fi \test@token }

\long\def \a@@caption #1[#2]#3{\par 
	\addcontentsline {\csname ext@#1\endcsname}{#1}
	{\protect\numberline {\csname the#1\endcsname}\protect\RL {#2}}%
\begingroup \@parboxrestore \normalsize
	\def \protect {\nxp\protect\nxp}
	\edef \thecaption {\csname fnum@#1\endcsname }%
	\let \protect \relax
	\@makecaption {\RL {\thecaption }}{\RL {#3}}\par
\endgroup \test@token }

\long\def \a@makecaption #1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\RL{#1: #2}}%
  \ifdim \wd\@tempboxa >\hsize
\begin{arabtext}    #1: #2
\end{arabtext}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip }

\allowarab \caption
\allowarab \thecaption

\at@arabtext {\let \@caption \a@@caption 
\let \@makecaption \a@makecaption }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% alists.sty: move to abjad.sty or alatex.sty!
% see arabrep.cls

\def \Abjad #1{\xpa \@Abjad \csname c@#1\endcsname }

\let \@Abjad \abj@d

%\let \@abjad \@abj 	\let \@Abj \@abj 	

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% asect.sty

\def\a@sect #1#2#3#4#5#6[#7]#8{% Arabic mode
\ifnum #2 > \c@secnumdepth \let \@svsec \@empty 
\else \refstepcounter{#1}%
	\edef \@svsec 
	{\nxp\RL {\nxp\stdcode {\csname the#1\endcsname }\hskip 1em}}%
\fi
\@tempskipa #5\relax
\ifdim \@tempskipa > \z@
	\begingroup \let \end \a@@par 
		#6\relax \set@arabfont % style
	        \a@hangfrom {\hskip #3\relax \@svsec }% section number
		\test@token #8 \end
	\endgroup
	\csname #1mark\endcsname {\RL {#7}}%
	\addcontentsline {toc}{#1}%
		{\ifnum #2 > \c@secnumdepth \else \protect\numberline 
		{\protect\RL{\protect\stdcode{\csname the#1\endcsname }}}\fi
		\protect\RL {#7}}%
\else \def \@svsechd {% saved head, executed by \everypar
	#6\relax \set@arabfont % style
	\let \a@@end \end \def \end {\let \end \a@@end }%
	\test@token \@svsec % saved section number
	\hskip #3\relax #8 \end
        \csname #1mark\endcsname {\RL {#7}}%
	\addcontentsline {toc}{#1}%
		{\ifnum #2>\c@secnumdepth \else \protect\numberline 
		{\protect\RL{\protect\stdcode{\csname the#1\endcsname }}}\fi
		\protect\RL {#7}}}% \@svsechd
\fi \a@xsect {#5}}

\allowarab \@svsec
 
\def\a@xsect #1{% Arabic mode
\@tempskipa #1\relax
\ifdim \@tempskipa>\z@ \a@@par \nobreak \vskip \@tempskipa
       \a@afterheading
\else \global\@nobreakfalse \global\@noskipsectrue
\a@@everypar {\if@noskipsec \global\@noskipsecfalse \clubpenalty \@M 
        	\putwordb@x {\hskip -\a@parindent }\@svsechd
        	\putwordb@x {\hskip -#1\relax }%
             \else \clubpenalty \@clubpenalty \a@@everypar {}%
             \fi}
\fi \a@spacefalse \test@token }

\def \a@c@numberline #1{% external Arabic command
\a@c@hspace {-\@tempdima }\spreadbox \@tempdima {#1 \hfill }}

\def \a@@lsection #1#2#3{% Text, Pageno, Font
% common part for \part and \section
	\begin{arabtext}
	#3\tocp@rs {\z@ }{\@tempdima }#1 \hfill \thep@geno {#2}
	\end{arabtext}}

\def \a@dottedtocline #1#2#3#4#5{% Level, Indent, Numwidth, Text, Pageno
% for Arabic mode
\ifnum #1>\c@tocdepth 
\else \vskip \z@ plus.2\p@
	\begin{arabtext}
	\tocp@rs {#2}{#3}#4 {\le@ders \thep@geno {#5}}
	\end{arabtext}
\fi }

\def \a@c@tocp@rs #1#2{% Indent, Numwidth
% change toc parameters
\leftskip #1\relax \advance \leftskip #2\relax 
\advance \rightskip \@tocrmarg 
\@tempdima #2\relax % for \numberline, width of number
\a@parindent \z@ \parfillskip \z@ \test@token }

\at@arabtext {% modify LaTeX for Arabic mode
	\let \numberline \a@numberline
	\let \@dottedtocline \a@dottedtocline
}

\c@secnumdepth \c@tocdepth % for test TOC

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabrep.cls

\def \a@l@section #1#2{% Text, Pageno
% for arabic mode
\ifnum \c@tocdepth >\z@
	\addpenalty {\@secpenalty }%
	\addvspace {1.0em plus\p@ }%
%	\@tempdima 1.5em 
	\@tempdima 1.0em 
%	\@tempdima \if@twocolumn 1.0em \else 1.5em \fi \relax
	\a@@lsection {#1}{#2}{\a@normalfont \bfseries }%
\fi }

\def \a@l@part #1#2{% Text, Pageno
% for arabic mode
\ifnum \c@tocdepth >-2\relax
	\addpenalty {-\@highpenalty }%
	\addvspace {2.25em plus\p@ }%
	\@tempdima 2.0em 
%	\@tempdima \if@twocolumn 2.0em \else 3.0em \fi \relax
	\a@@lsection {#1}{#2}{\a@normalfont \large \bfseries }%
\fi }

\def \a@l@chapter #1#2{% Text, Pageno
% for arabic mode
\ifnum \c@tocdepth >\m@ne
	\addpenalty {-\@highpenalty }%
	\addvspace {1.0em plus\p@ }%
%	\@tempdima 1.5em 
	\@tempdima 1.0em 
%	\@tempdima \if@twocolumn 1.0em \else 1.5em \fi \relax
	\a@@lsection {#1}{#2}{\a@normalfont \bfseries }%
      	\penalty\@highpenalty
\fi }

\def \a@x@sect {% arabic section TOC formats if article
	\def\a@l@subsection{\@dottedtocline{2}{1.0em}{1.5em}}
	\def\a@l@subsubsection{\@dottedtocline{3}{2.5em}{2.1em}}
	\def\a@l@paragraph{\@dottedtocline{4}{4.6em}{2.8em}}
	\def\a@l@subparagraph{\@dottedtocline{5}{9.4em}{3.4em}}
}

\def \a@y@sect {% arabic section TOC formats if report or book
	\def\a@l@section{\@dottedtocline{1}{1.0em}{1.5em}}
	\def\a@l@subsection{\@dottedtocline{2}{2.5em}{2.1em}}
	\def\a@l@subsubsection{\@dottedtocline{3}{4.6em}{2.8em}}
	\def\a@l@paragraph{\@dottedtocline{4}{9.4em}{3.4em}}
	\def\a@l@subparagraph{\@dottedtocline{5}{23.8em}{4.1em}}
}

\def \a@xy@sect {% arabic section TOC formats
\ifa@article \a@x@sect \else \a@y@sect \fi }

\def \a@c@tableofcontents {\a@xy@sect % define arabic section TOC formats
\a@t@ble {\contentsname }{toc}}

% CAUTION: \a@xy@sect must be executed before expanding \the\arabtex@hook
%          and prior to \@starttoc within \a@t@ble, see arabrep.cls

\def\a@l@figure{\@dottedtocline{1}{1.0em}{1.5em}}
\def\a@l@table{\@dottedtocline{1}{1.0em}{1.5em}}

\at@arabtext {% switch to Arabic terms, execute from asect::a@t@ble
	\let \l@part \a@l@part
	\let \l@chapter \a@l@chapter
	\let \l@section \a@l@section
	\let \l@subsection \a@l@subsection
	\let \l@subsubsection \a@l@subsubsection
	\let \l@paragraph \a@l@paragraph
	\let \l@subparagraph \a@l@subparagraph
	\let \l@figure \a@l@figure
	\let \l@table  \a@l@table
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {03.03.2002}			\def \level {c}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hebchrs.sty

\ifx \gedatcode \undefined \else
\a@extend \def@hebchars {% for gedalin.sty
\tc@def \a@M {\act@cd \hc@mf }				% mem sofit
\tc@def \a@N {\act@cd \hc@nf }				% nun sofit
\tc@def \a@K {\act@cd \hc@kf }				% kaf sofit
\tc@def \a@P {\act@cd \hc@ff }				% peh sofit
\tc@def \a@Z {\act@cd \hc@sf }				% tsadeh sofit
}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {04.03.2002}			\def \level {c1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% asmo449.sty

\ifx \asmoatcode \undefined \else 

\def \asmo@beg #1#2{% start ASMO 449 scanner
	\h@mzafalse  \iz@fetfalse \novocalize % because of explicit quoting
	\@ssimfalse
	\def \next {\asmo@word #1#2}%
	\def \l@@kup ##1\\#1##2\\##3\@@ {% look for special chars
		\ifx *##2\relax\xpa\xpa\xpa\iffalse\fi\fi % not found; else
		\def \next {##2#2}}%
\iftrue \xpa \l@@kup \asmo@tbliv \\#1*\\\@@ \else 
\ifx #1/\global \a@tokens ={#1}\def \next {\asmo@word #2}% /x
\fi\fi \next }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% utfcode.sty

\ifx \utfatcode \undefined \else 

\def \utf@beg #1#2{% start UTF-8 scanner
\h@mzafalse  \iz@fetfalse \novocalize % because of explicit quoting
	\@ssimfalse
	\def \next {\utf@word #1#2}%
\ifnum `#1="D8 \ifnum `#2="27 \def \next {\utf@alif }\fi \else
%\ifx #1"\def \next {\utf@lquote #2}\else
\ifx #1/\global \a@tokens ={#1}\def \next {\utf@word #2}\else % x>
%\fi
\fi\fi \next }

\def \utf@dvii #1{% segment D7
	\a@lb `#1\relax \advance \a@lb -128 
	\a@lq \a@lb \divide \a@lq 8
\ifcase \a@lq \edef \sc@char 
	{\ifcase \a@lb
	K\or "\n@xp\a@Ze\or "\n@xp\a@Za\or :\or "\n@xp\a@Zi\or \or \or \or
	\fi }%
\or \advance \a@lb  -8 \edef \sc@char {}%
\or \advance \a@lb -16 \edef \sc@char 
	{\ifcase \a@lb
	Q\or b\or g\or d\or h\or w\or z\or X\or
	\fi }%
\or \advance \a@lb -24 \edef \sc@char 
	{\ifcase \a@lb
	C\or y\or k\or k\or l\or m\or m\or n\or
	\fi }%
\or \advance \a@lb -32 \edef \sc@char 
	{\ifcase \a@lb
	n\or s\or P\or p\or p\or S\or S\or q\or
	\fi }%
\or \advance \a@lb -40 \edef \sc@char 
	{\ifcase \a@lb
	r\or \n@xp\a@S \or t\or \or \or \or \or \or
	\fi }%
\or \advance \a@lb -48 \edef \sc@char 
	{\ifcase \a@lb
	w\n@xp\a@U w\or wy\or y\n@xp\a@U y\or '\or 
	''\or \or \or \or
	\fi }%
\or \advance \a@lb -56 \edef \sc@char 
	{\ifcase \a@lb
	\or \or \or \or \or \or \or "|\or
	\fi }%
\fi \utf@next }

\def \utf@dvii #1{% segment D7
	\u@lb `#1\relax \advance \u@lb -128 
	\u@lq \u@lb \divide \u@lq 8
\ifcase \u@lq \edef \sc@char 
	{\ifcase \u@lb
	K\or "\n@xp\a@Ze\or "\n@xp\a@Za\or :\or "\n@xp\a@Zi\or \or \or \or
	\fi }%
\or \advance \u@lb  -8 \edef \sc@char {}%
\or \advance \u@lb -16 \edef \sc@char 
	{\ifcase \u@lb
	Q\or b\or g\or d\or h\or w\or z\or X\or
	\fi }%
\or \advance \u@lb -24 \edef \sc@char 
	{\ifcase \u@lb
	C\or y\or k\or k\or l\or m\or m\or n\or
	\fi }%
\or \advance \u@lb -32 \edef \sc@char 
	{\ifcase \u@lb
	n\or s\or P\or p\or p\or S\or S\or q\or
	\fi }%
\or \advance \u@lb -40 \edef \sc@char 
	{\ifcase \u@lb
	r\or \n@xp\a@S \or t\or \or \or \or \or \or
	\fi }%
\or \advance \u@lb -48 \edef \sc@char 
	{\ifcase \u@lb
	w\n@xp\a@U w\or wy\or y\n@xp\a@U y\or '\or 
	''\or \or \or \or
	\fi }%
\or \advance \u@lb -56 \edef \sc@char 
	{\ifcase \u@lb
	\or \or \or \or \or \or \or "|\or
	\fi }%
\fi \utf@next }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% cp1256.sty

\ifx \awinatcode \undefined \else 

\def \awin@catcodes {% assignments for MAC Hebrew
\countdef \is@m=2	\countdef \is@n=4       
\is@m = 128        \is@n = 64
\loop \ifnum \catcode \is@m = 11 \else \catcode \is@m = 11 \fi
\global\lccode \is@m = \is@n
\ifnum 159 > \is@m \advance \is@m 1 \advance \is@n 1 \repeat
\is@m = 160        \is@n = 32
\loop \ifnum \catcode \is@m = 11 \else \catcode \is@m = 11 \fi
\global\lccode \is@m = \is@n
\ifnum 255 > \is@m \advance \is@m 1 \advance \is@n 1 \repeat
\is@m=0 \is@n=0 \catcode `\^^a0 12 }

\gdef \awin@beg #1{% start CP 1256 scanner
\h@mzafalse  \iz@fetfalse \yahdots \novocalize % because of explicit quoting
	\@ssimfalse
%\urd@true
\ifx #1^^c7\def \next {\awin@alif}\else
\def \next {\awin@word #1}\fi \next }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% isiri.sty

\ifx \isiriatcode \undefined \else 

\def \isiri@catcodes {% assignments for ISIRI 3342
\countdef \is@m=2	\countdef \is@n=4       
\is@m = 160        \is@n = 32
\loop \ifnum \catcode \is@m = 11 \else \catcode \is@m = 11 \fi
\global\lccode \is@m = \is@n
\ifnum 255 > \is@m \advance \is@m 1 \advance \is@n 1 \repeat
\is@m=0 \is@n=0 \catcode `\^ 7 \catcode `\^^a0 12 }

\gdef \isi@beg #1#2{% start ISIRI 3342 scanner
\h@mzafalse  \iz@fetfalse \yahdots \novocalize % because of explicit quoting
	\@ssimfalse
\case #1\of 
{      \@{\sc@endscan #2}                % finished
     ^^c1{\isi@alif@beg #2} 
     ^^e6{\isi@lquote #2}
\default {\isi@word #1#2}
}\endcase }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% amac.sty

\ifx \amacatcode \undefined \else 

\def \amac@catcodes {% assignments for MAC Hebrew
\countdef \is@m=2	\countdef \is@n=4       
\is@m = 128        \is@n = 64
\loop \ifnum \catcode \is@m = 11 \else \catcode \is@m = 11 \fi
\global\lccode \is@m = \is@n
\ifnum 159 > \is@m \advance \is@m 1 \advance \is@n 1 \repeat
\is@m = 160        \is@n = 32
\loop \ifnum \catcode \is@m = 11 \else \catcode \is@m = 11 \fi
\global\lccode \is@m = \is@n
\ifnum 255 > \is@m \advance \is@m 1 \advance \is@n 1 \repeat
\is@m=0 \is@n=0 \catcode `\^^a0 12 }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabrep.cls
% restore LaTeX version, delete \a@caption!

\long\def\@caption#1[#2]#3{%
  \par
  \addcontentsline{\csname ext@#1\endcsname}{#1}%
    {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
  \begingroup
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}

\long\def \a@caption #1[#2]#3{\par 
	\addcontentsline {\csname ext@#1\endcsname}{#1}
	{\protect\numberline {\csname the#1\endcsname}\protect #2}%
\begingroup \@parboxrestore \normalsize
	\protected@edef \reserved@a {\csname fnum@#1\endcsname }%
	\xpa\@makecaption \xpa{\xpa\RL \xpa{\reserved@a }}{#3}\par
\endgroup}

%\let \@caption \a@caption 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% alists.sty

\def \a@@item [#1]{% for arabic lists running from right to left
\if@noparitem \a@@donoparitem \else 
	\if@inlabel \putwordb@x {\arab@space }\a@@par \fi
	\a@@par 
	\if@newlist \if@nobreak \@nbitem \else 
		\addpenalty \@beginparpenalty
		\addvspace \@topsep \addvspace {-\a@parskip }\fi
	\else \addpenalty \@itempenalty \addvspace \itemsep
	\fi \global \@inlabeltrue
\fi
\a@@everypar {\global \@minipagefalse \global \@newlistfalse
	\if@inlabel \global \@inlabelfalse \a@spacefalse
		\putwordb@x {\box \@labels \hskip -\a@parindent }%
	\fi \a@@everypar {}}%
\global \@nobreakfalse
\if@noitemarg \@noitemargfalse
	\if@nmbrlist \refstepcounter {\@listctr }\fi
\fi
\setbox \@tempboxa \hbox {\makelabel {#1}}%
\global \setbox \@labels \hbox
        {\hskip \labelsep
        \ifdim \wd \@tempboxa >\labelwidth \box \@tempboxa
               \else \hbox to\labelwidth {\unhbox \@tempboxa }\fi
        \hskip \itemindent \hskip -\labelwidth \hskip -\labelsep
        \unhbox \@labels }%
%\test@token }
\arab@tail }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabext.sty

\def \a@@table [#1]{% table within Arabic environment
\let \a@endtable \endtable \def \endtable {\a@par \a@endtable }%
\table [#1]%
%\arab@codes 
%\test@token }
\arab@tail }

\def \a@@figure [#1]{% figure within Arabic environment
\let \a@endfigure \endfigure \def \endfigure {\a@par \a@endfigure }%
\figure [#1]%
%\arab@codes 
%\test@token }
\arab@tail }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {07.03.2002}			\def \level {d}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hescan.sty

\ifx \a@hebr \undefined \else

\gdef \tr@@aword #1{% transcribe rest of word 
\let \tr@old \tr@act \def \tr@act {#1}%
\case #1\of
{       >{\@gobble }
    \cap {\c@ptrue \tr@aword }
%  |"^\a@e{\tr@aword }
      |"^{\tr@aword }
        -{-\tr@aword }
    XlEeQ{\csname tr@@\string #1\endcsname }
 \a@a NUW{\setc@p #1\kill@alif }
        P{\tr@P \tr@aword }
      aiu{\tr@wasla #1}
    \a@Ze{\xpa\tr@aword \tr@old }
%      aiu{\tr@vowel #1}
\default {\@vocalfalse 
        \ifcat \nxp #1-#1\else \setc@p #1%
        \fi \tr@aword }
}\endcase }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% aparse.sty

\def \syl@@endvoc #1#2{% test for H
\case #1\of
%{	-{\syl@hahtie -#2}
{	-{\syl@hahtie \a@H #2}
%	Q{\add@hamza \add@kasraspec \put@syl \syl@end #2}
	Q{\add@hamza \add@kasra \put@syl \syl@end #2}
	<{\put@syl \syl@end #2}
	"{\put@syl \syl@quote@beg #2}
	|{\put@syl \syl@bar #2}
\default {\put@syl 
	  \ifcat -\nxp #1\def \next {\syl@end #1#2}\else 
		\def \next {\syl@beg #1#2}% start a new word
	  \fi \next }
}\endcase }

\def \sv@test@izafet #1#2#3{% special cases for -e, -i, -_e, -_i, -I, -E
\case #2\of
{	e{\def \next {\sv@izafet #1e#3}}
i\a@i\a@E{\def \next {\sv@izafet #1i#3}}
	y{\def \next {\sv@izafet #1e}}
	I{\def \next {\sv@wahdat #1I#3}}
	E{\def \next {\sv@wahdat #1E#3}}
}\endcase }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hewrite.sty

%\ifx \a@hebr \undefined \else

\global\let \@set@hcls \set@hcls

\gdef \set@hcls{% routines for the HCLASSIC font family
%\globaldefs = 1\relax
\a@message {patch HCLASSIC}%
\@set@hcls
\globaldefs = 1\relax
\def \the@dot {\vrule width\h@p height0pt depth\h@p }%
\def \the@mdot {\vrule width\h@p height-\h@p depth2\h@p }%
\def \the@ldot {\vrule width\h@p height-2\h@p depth3\h@p }%
\def \the@shwa {\the@dot \kern-\h@p \the@ldot }%
\def \the@sere {\the@dot \kern\h@p \the@dot }%
\def \the@segol {\the@dot \the@ldot \the@dot }%
\def \the@qibbus {\the@dot \the@mdot \the@ldot }%
\def \the@meteg {\vrule width\h@p height0pt depth3\h@p }%
\def \the@meteg {\vrule width\h@p height-.2\h@p depth3\h@p }%
\def \the@patach {\vrule width3\h@p height0pt depth\h@p }%
\def \the@qames {\the@patach \kern-2\h@p \the@meteg \kern\h@p }%
\def \put@dummy     {\h@vowel {}}%
\def \put@patach    {\h@vowel {\the@patach }}%
\def \put@qames     {\h@vowel {\the@qames }}%
\def \put@segol     {\h@vowel {\the@segol }}%
\def \put@qibbus    {\h@vowel {\the@qibbus }}%
\def \put@chireq    {\h@vowel {\the@dot }}%
\def \put@qameschat {\h@vowel {\the@qames }}%
\def \put@shwa      {\h@vowel {\the@shwa }}%
\def \put@sere      {\h@vowel {\the@sere }}%
\def \put@chpatach  {\h@vowel {\the@patach \kern\h@p \the@shwa }}%
\def \put@chsegol   {\h@vowel {\the@segol \kern\h@p \the@shwa }}%
\def \put@chqames   {\h@vowel {\the@qames \kern\h@p \the@shwa }}%
\def \put@cholem    {\h@vowel {}\h@ldot }%
\def \put@patachf   {\h@vowel {\kern4\h@p \the@patach }}%
%
\def \h@vowel {% check for meteg
\if@meteg \xpa \h@meteg \else \xpa \h@putvowel \fi }%
%
\def \h@meteg ##1{% put vowel and meteg
\h@putvowel {\the@meteg \kern\h@p ##1}}%
%
\def \h@vowel ##1{% check for meteg
\if@meteg \xpa \h@meteg \else \xpa \h@putvowel \fi {\raise -.2ex\hbox{##1}}}%
%
\def \h@vowel ##1{% check for meteg
\if@meteg \h@meteg {##1}\else \h@putvowel {\raise -.2ex\hbox{##1}}\fi }%
%
\def \h@vowel ##1{% check for meteg
\if@meteg 
\h@putvowel {\raise -.2ex\hbox{\the@meteg \kern\h@p ##1}}\else
\h@putvowel {\raise -.2ex\hbox{##1}}\fi }%
%
\globaldefs = 0 }% end standard fonts

\def \h@@putchar {% choose character glyph
\ifnum \act@cd = \hc@v \relax \h@putlig \hc@w \hc@w \else
\ifnum \act@cd = \hc@oy \relax \h@putlig \hc@y \hc@w \else
\ifnum \act@cd = \hc@ey \relax \h@putlig \hc@y \hc@y \else
	\h@put@char \act@cd 
\fi\fi\fi }%

{\catcode `\< 12
\gdef \h@put@mid #1#2+#3*#4<{% deposit character         
% c m1 + m2 * c <
%	\def \next {\heb@mid #4}%
\ifnum \act@cd = \hc@@ \relax \h@put@ill \else   % illegal character
\case #1\of
{	B{\put@maqqef \def \next {\heb@end #4}}
	K{\put@box {$|$}}
	M{\put@box {$\Box$}}
       WN{\put@phantom }
        y{\h@ylig #4<}
        w{\h@wlig #4<}
\default {\h@putchar }
}\endcase
\fi
\heb@accent #2+#3*\h@kern 
\ifnum \act@cd = \hc@l \relax \smash {\unhbox \ab@x }%
\else \unhbox \ab@x 
\fi }
}

%\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% cp1256.sty

\ifx \awinatcode \undefined \else

{\catcode 248=11
\global\let \set@awin@codes \setawin@codes 
\gdef \setawin@codes {% activate and change some codes
\set@awin@codes \gdef \sc@^^f8 {\n@xp\a@Ze}}%
}

\gdef \awin@@word #1{% default branch
\ifcat a\nxp #1\edef \sc@char {\csname sc@#1\endcsname }%
\else \def \sc@char {\nxp #1}%
\fi \sc@put \awin@word }

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {14.04.2002}			\def \level {e}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% aparse.sty

\def \sv@@e {% short e
\ifk@rd \xpa \sv@a \else 
\ift@rk \xxpa \sv@a \else \xxpa \sv@eInt \fi\fi }

\def \sv@@u {% short u
\ifk@rd \put@syl \xpa \sv@ukurd \else \xpa \sv@uInt \fi }

\def \sv@@E {% long e
\ift@rk \xpa \sv@I \else \xpa \sv@EInt \fi }

\def \syl@@endvoc #1#2{% char after H
\case #1\of
{	-{\syl@hahtie \a@H #2}
	Q{\add@hamza \syl@voc }
	<{\put@syl \syl@end #2}
	"{\put@syl \syl@quote@beg #2}
	|{\put@syl \syl@bar #2}
\default {\put@syl 
	  \ifcat -\nxp #1\def \next {\syl@spec #1#2}\else 
		\def \next {\syl@beg #1#2}% start a new word
	  \fi \next }
}\endcase }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {11.05.2002}			\def \level {f}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ascan.sty

\def \t@dot #1{% after .
\apply \set@char \tocase #1\of 
{       a{\ifk@sh \nxp \a@Za \else \nxp \a@A \fi }
        b{\nxp \a@b }
	c{c}
        d{D}
        e{\nxp \a@I }
        f{\nxp \a@f }
        g{R}
        h{H}
        i{\nxp \a@e }
        k{\ift@rk q\else \nxp \a@k \fi }
        l{\nxp \a@l }
%        n{\ifp@sht \nxp \a@N \else 
        n{\ifp@sht \nxp \a@m \else 
          \ifs@nd \nxp \a@an \else \nxp \a@n \fi\fi }
        o{\ifk@sh \nxp \a@Zo \else \nxp \a@O \fi }
        p{\nxp \a@f }
        r{\ifs@nd \nxp \a@ar \else \nxp \a@R \fi }
        s{S}
        t{V}
        u{\ifk@sh \nxp \a@Zu \else \nxp \a@U \fi }
        v{\nxp \a@b }
        y{\nxp \a@ZI }
        z{Z}
	A{\nxp \a@ZA }
	O{\nxp \a@ZO }
	U{\nxp \a@ZU }
        Z{\nxp \a@Zz }
        T{Y} 
}\endcase \t@tail .#1}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {16.06.2002}			\def \level {g}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arabtex.sty

\pdef \setbalut {\setpashto}
\allowarab \setbalut
\xpa\allowarab \csname setbalut \endcsname

\long\def \Return #1\fi {\fi #1}
\long\def \ReturnFi #1\fi {\fi #1}
\long\def \ReturnElseFi #1\else #2\fi {\fi #1}

\long\def \cond #1#2#3\fi {% call conditional
#1\ReturnElseFi {#2}\else \ReturnFi {#3}\fi }

\long\def \a@c@cond #1#2#3\fi {% call conditional
#1\ReturnElseFi {\test@token #2}%
\else \ReturnFi {\test@token #3}\fi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% acmd.sty

\def \a@c@endinput {\endinput \test@token }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ascan.sty

\def \sc@g {\ifp@sht \n@xp \a@g \else % old version!
            \ifm@lay \n@xp \a@K \else g\fi\fi }

\gdef \sc@g {\ifm@lay \n@xp \a@K \else g\fi }

\def \sc@G {\n@xp \a@g }  % Pashto gaf with ring

\mathchardef \cap="225C % remove together with \tdef \cap !

\def \t@cap #1{\sc@word \c@p #1} % kill braces on #1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% abidir.sty

\def \a@Linsert #1{% splice Ltext into RL paragraph
%\tracingmacros 1
\putwordb@x {\ins@skip }\a@spacefalse \a@@Linsert {#1}\a@Lunpack 
\putwordb@x {\ins@skip }\a@spacetrue \arab@codes 
%\tracingmacros 0
\test@token }

\def \a@@Linsert #1{% splice Ltext into RL paragraph
\dimen0 \wd \lineb@x \setbox \Linsertb@x \vbox 
{\hsize \a@hsize \parskip \z@ \hangindent -\dimen0 \hangafter -\@ne 
\tr@ceoff \rm \tr@ceon \rightskip \z@ plus .001fil \vskip \a@vglue 
\noindent \null \hskip 0pt plus .001fil \relax #1
\clubpenalty 0 \widowpenalty 0 \tolerance 10000 \par }}

\def \a@Lunpack {% unpack all lines from the insertion
\loop \a@Lgetline \putwordb@x 
{\unhbox \tempb@x \unskip \unskip }\a@spacefalse 
\ifvbox \Linsertb@x \put@line \a@spacefalse \repeat }

\def \a@Lgetline {% unpack the next line globally to \box \tempb@x
{\vbadness 10000 \splittopskip \a@vglue 
\dimen0 \baselineskip \advance \dimen0 1ex 
\setbox \tempb@x \vsplit \Linsertb@x to \dimen0
\setbox0 \vbox {\unvbox \tempb@x \global \setbox \tempb@x \lastbox }}}

%\testoutput

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {28.08.2002}			\def \level {h}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% heparse.sty

\ifx \a@hebr \undefined \else
%\a@message {Hebrew mode patches}

\def \sv@sere@longum {% long e: put yod
\test@yod }

\def \sv@chireq@longum {% long i: put yod
\test@yod }

\def \test@yod #1{% vowel or consonant
\if\is@vowel #1\def \next {\syl@con y#1}\else
\put@con y\put@syl \def \next {\test@patf #1}%
\fi \next }

\fi % Hebrew

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\datum   = {14.11.2002}			\def \level {i}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifx \a@patchlevel \undefined % first patching run
\a@ident {apatch.sty} 
	{\the\version\level\space last minute patches } {\the\datum}
	\edef \a@patchlevel {\the\version \level \space (\the\datum)}
\else \a@message {version \a@patchlevel: second phase of patching}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\catcode`\" = \patchdqcode         \catcode`\@ = \patchatcode
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

