%%
%% This is file `rlbabel.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hebrew.dtx  (with options: `rightleft')
%% 
%% This is a generated file.
%% 
%% Copyright 1997-1998 Boris Lavva and any individual authors
%% listed elsewhere in this file. All rights reserved.
%% 
%% For further copyright information, and conditions for modification
%% and distribution, see any other copyright notices in this file.
%% 
%% This file is contributed to the Babel system, release 3.6.
%% ----------------------------------------------------------
%%   This system is distributed in the hope that it will be useful,
%%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%% 
%%   For error reports concerning UNCHANGED versions of this file no
%%   more than one year old, see bugs.txt.
%% 
%%   Please do not request updates from me directly.  Primary
%%   distribution is through the CTAN archives.
%% 
%% 
%% IMPORTANT COPYRIGHT NOTICE:
%% 
%% You are NOT ALLOWED to distribute this file alone.
%% 
%% You are allowed to distribute this file under the condition that it
%% is distributed together with all the files listed in manifest.txt.
%% 
%% If you receive only some of these files from someone, complain!
%% 
%% 
%% Permission is granted to customize the declarations in this file to
%% serve the needs of your installation, provided that you comply with
%% the conditions in the file legal.txt.
%% 
%% However, NO PERMISSION is granted to distribute a modified version
%% of this file under its original name.
%% 
%% 
%% MODIFICATION ADVICE:
%% 
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced.  Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system.
%% 
%% You can then easily distribute your modifications by distributing
%% the modified and renamed copy of the source file, together with a
%% suitable .ins file, taking care to observe the conditions in
%% legal.txt; this will ensure that other users can safely use
%% your modifications.
%% 
%% The names of the source files used are shown above.
%% 
%% 
\ProvidesFile{rlbabel.def}
        [1998/01/01 v2.0a
         Right-to-Left support from the babel system
         (test version: still liable to change)]
\ifx\TeXXeTstate\undefined\else%
   \TeXXeTstate=1
\fi
\ifx\beginL\@undefined%
   \newlinechar`\^^J
   \typeout{^^JTo avoid this error message,^^J%
     run TeX--XeT or e-TeX engine instead of regular TeX.^^J}
   \errmessage{Right-to-Left Support Error: use TeX--XeT or e-TeX
     engine}%
\fi
\newif\if@rl
\DeclareRobustCommand{\@torl}[1]{%
  \if@rl\else%
     \let\lr@encodingdefault=\encodingdefault%
  \fi%
  \def\@rllanguagename{#1}%
  \def\encodingdefault{\csname#1encoding\endcsname}%
  \fontencoding{\encodingdefault}%
  \selectfont%
  \@rltrue}
\DeclareRobustCommand{\@fromrl}{%
  \if@rl%
     \let\encodingdefault=\lr@encodingdefault%
  \fi%
  \fontencoding{\encodingdefault}%
  \selectfont%
  \@rlfalse}
\expandafter\def\csname selectlanguage \endcsname#1{%
  \edef\languagename{%
    \ifnum\escapechar=\expandafter`\string#1\@empty
    \else \string#1\@empty\fi}%
  \@@selectlanguage{\languagename}}
\def\@@selectlanguage#1{%
  \select@language{#1}%
  \if@filesw
     \protected@write\@auxout{}{\string\select@language{#1}}%
     \if@rl%
       \addtocontents{cot}{\xstring\select@language{#1}}%
       \addtocontents{fol}{\xstring\select@language{#1}}%
       \addtocontents{tol}{\xstring\select@language{#1}}%
     \else%
       \addtocontents{toc}{\xstring\select@language{#1}}%
       \addtocontents{lof}{\xstring\select@language{#1}}%
       \addtocontents{lot}{\xstring\select@language{#1}}%
     \fi%
  \fi}
\let\other@languagename=\languagename
\DeclareRobustCommand{\setrllanguage}[1]{%
   \if@rl\else%
     \let\other@languagename=\languagename%
   \fi%
     \def\languagename{#1}%
     \@@selectlanguage{\languagename}}
\DeclareRobustCommand{\unsetrllanguage}[1]{%
   \if@rl%
     \let\languagename=\other@languagename%
   \fi
   \@@selectlanguage{\languagename}}
\let\next=\
\def\L{\protect\pL}
\def\pL{\protect\afterassignment\moreL \let\next= }
\def\moreL{\bracetext \aftergroup\endL \beginL\csname
  from\@rllanguagename\endcsname}
\def\R{\protect\pR}
\def\pR{\protect\afterassignment\moreR \let\next= }
\def\moreR{\bracetext \aftergroup\endR \beginR\csname
  to\@rllanguagename\endcsname}
\def\bracetext{\ifcat\next{\else\ifcat\next}\fi
  \errmessage{Missing left brace has been substituted}\fi \bgroup}
\everydisplay{\if@rl\aftergroup\beginR\fi }
\def\rl@everypar{\if@rl{\setbox\z@\lastbox\beginR\usebox\z@}\fi}
\let\o@everypar=\everypar
\def\everypar#1{\o@everypar{\rl@everypar#1}}
\newcommand{\hmbox}[1]{\mbox{\R{#1}}}
\newcommand{\embox}[1]{\mbox{\L{#1}}}
\def\@brackets#1#2#3{\protect\if@rl #3#2#1\protect\else
  #1#2#3\protect\fi}
\def\@@number#1{\ifmmode\else\beginL\fi#1\ifmmode\else\endL\fi}
\def\@@latin#1{\@@number{{\@fromrl#1}}}
\def\@number{\protect\@@number}
\def\@latin{\protect\@@latin}
\let\@@arabic=\@arabic
\let\@@roman=\@roman
\let\@@Roman=\@Roman
\let\@@alph=\@alph
\let\@@Alph=\@Alph
\def\@arabic#1{\@number{\@@arabic#1}}
\def\@roman#1{\@latin{\@@roman#1}}
\def\@Roman#1{\@latin{\@@Roman#1}}
\def\make@lr#1{\begingroup
    \toks@=\expandafter{#1}%
    \edef\x{\endgroup
  \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
  \x}
\@ifclassloaded{letter}{}{%
  \make@lr\thesection
  \make@lr\thesubsection
  \make@lr\thesubsubsection
  \make@lr\theparagraph
  \make@lr\thesubparagraph
  \make@lr\thefigure
  \make@lr\thetable
  \make@lr\theequation}
\let\@@TeX\TeX
\def\TeX{\@latin{\@@TeX}}
\let\@@LaTeX\LaTeX
\def\LaTeX{\@latin{\@@LaTeX}}
\let\@@LaTeXe\LaTeXe
\def\LaTeXe{\@latin{\@@LaTeXe}}
\providecommand\descriptionlabel[1]{\hspace\labelsep
                                  \normalfont\bfseries #1}
\renewenvironment{description}
                 {\list{}{\labelwidth\z@ \itemindent-%
                     \if@rl\rightmargin\else\leftmargin\fi
                     \let\makelabel\descriptionlabel}}
                 {\endlist}
\renewenvironment{verse}
{\let\\\@centercr
  \if@rl
     \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
       \leftmargin\rightmargin\advance\rightmargin 1.5em}
  \else
     \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
       \rightmargin\leftmargin\advance\leftmargin 1.5em}
  \fi
  \item\relax}
{\endlist}
\renewenvironment{quotation}
{\list{}{\listparindent 1.5em
    \itemindent\listparindent
    \if@rl
       \leftmargin\rightmargin
    \else
       \rightmargin\leftmargin
    \fi
    \parsep \z@ \@plus\p@}\item\relax}
{\endlist}
\renewenvironment{quote}
{\list{}{\if@rl
            \leftmargin\rightmargin
         \else
            \rightmargin\leftmargin
         \fi}%
 \item\relax}
{\endlist}
\let\@@listi=\@listi
\def\@listi{\@@listi\if@rl\rightmargin\leftmargini%
            \leftmargin=0pt\fi}
\let\@listI\@listi
\let\@@listii=\@listii
\def\@listii{\@@listii\if@rl\rightmargin\leftmarginii%
            \leftmargin=0pt\fi}
\let\@@listiii=\@listiii
\def\@listiii{\@@listiii\if@rl\rightmargin\leftmarginiii%
            \leftmargin=0pt\fi}
\let\@@listiv=\@listiv
\def\@listiv{\@@listiv\if@rl\rightmargin\leftmarginiv%
            \leftmargin=0pt\fi}
\let\@@listv=\@listv
\def\@listv{\@@listv\if@rl\rightmargin\leftmarginv%
            \leftmargin=0pt\fi}
\let\@@listvi=\@listvi
\def\@listvi{\@@listvi\if@rl\rightmargin\leftmarginvi%
            \leftmargin=0pt\fi}
\def\labelenumii{\@brackets(\theenumii)}
\def\p@enumiii{\p@enumii\@brackets(\theenumii)}
\@ifclassloaded{letter}{}{% other
  \@ifclassloaded{article}{% article
    \newcommand\@tableofcontents[1]{%
      \section*{\contentsname\@mkboth%
        {\MakeUppercase\contentsname}%
        {\MakeUppercase\contentsname}}%
      \@starttoc{#1}}
    \newcommand\@listoffigures[1]{%
      \section*{\listfigurename\@mkboth%
        {\MakeUppercase\listfigurename}%
        {\MakeUppercase\listfigurename}}%
      \@starttoc{#1}}
    \newcommand\@listoftables[1]{%
      \section*{\listtablename\@mkboth%
        {\MakeUppercase\listtablename}%
        {\MakeUppercase\listtablename}}%
      \@starttoc{#1}}}%
  {% else report or book
    \newcommand\@tableofcontents[1]{%
      \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn%
      \fi\chapter*{\contentsname\@mkboth%
        {\MakeUppercase\contentsname}%
        {\MakeUppercase\contentsname}}%
      \@starttoc{#1}\if@restonecol\twocolumn\fi}
    \newcommand\@listoffigures[1]{%
      \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn%
      \fi\chapter*{\listfigurename\@mkboth%
        {\MakeUppercase\listfigurename}%
        {\MakeUppercase\listfigurename}}%
      \@starttoc{#1}\if@restonecol\twocolumn\fi}
    \newcommand\@listoftables[1]{%
      \if@twocolumn\@restonecoltrue\onecolumn\else\@restonecolfalse\fi%
      \chapter*{\listtablename\@mkboth%
        {\MakeUppercase\listtablename}%
        {\MakeUppercase\listtablename}}%
      \@starttoc{#1}\if@restonecol\twocolumn\fi}}%
  \newcommand\lrtableofcontents{\@tableofcontents{toc}}%
  \newcommand\lrlistoffigures{\@listoffigures{lof}}%
  \newcommand\lrlistoftables{\@listoftables{lot}}%
  \newcommand\rltableofcontents{\@tableofcontents{cot}}%
  \newcommand\rllistoffigures{\@listoffigures{fol}}%
  \newcommand\rllistoftables{\@listoftables{tol}}%
  \renewcommand\tableofcontents{\if@rl\rltableofcontents%
                                \else\lrtableofcontents\fi}
  \renewcommand\listoffigures{\if@rl\rllistoffigures%
                              \else\lrlistoffigures\fi}
  \renewcommand\listoftables{\if@rl\rllistoftables%
                             \else\lrlistoftables\fi}}
\def\@dottedtocline#1#2#3#4#5{%
  \ifnum #1>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\if@rl\rightskip\else\leftskip\fi #2\relax
      \if@rl\leftskip\else\rightskip\fi \@tocrmarg \parfillskip
      -\if@rl\leftskip\else\rightskip\fi
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #3\relax
     \advance\if@rl\rightskip\else\leftskip\fi \@tempdima
     \null\nobreak\hskip -\if@rl\rightskip\else\leftskip\fi
     {#4}\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor \beginL#5\endL}%
     \par}%
  \fi}
\@ifclassloaded{letter}{}{% other
\renewcommand*\l@part[2]{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty{-\@highpenalty}%
    \addvspace{2.25em \@plus\p@}%
    \begingroup
      \setlength\@tempdima{3em}%
      \parindent \z@ \if@rl\leftskip\else\rightskip\fi \@pnumwidth
      \parfillskip -\@pnumwidth
      {\leavevmode
       \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss#2}}\par
       \nobreak
         \global\@nobreaktrue
         \everypar{\global\@nobreakfalse\everypar{}}%
    \endgroup
  \fi}}
\@ifclassloaded{article}{% article class
  \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
      \addcontentsline{cot}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
      \addcontentsline{cot}{part}{#1}%
    \fi
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >\m@ne
       \Large\bfseries \partname~\thepart
       \par\nobreak
     \fi
     \huge \bfseries #2%
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}%
}{% report and book classes
  \def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
      \addcontentsline{cot}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
      \addcontentsline{cot}{part}{#1}%
    \fi
    \markboth{}{}%
    {\centering
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >-2\relax
       \huge\bfseries \partname~\thepart
       \par
       \vskip 20\p@
     \fi
     \Huge \bfseries #2\par}%
     \@endpart}}
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  \fi
  \@tempskipa #5\relax
  \ifdim \@tempskipa>\z@
    \begingroup
      #6{%
        \@hangfrom{\hskip #3\relax\@svsec}%
          \interlinepenalty \@M #8\@@par}%
    \endgroup
    \csname #1mark\endcsname{#7}%
    \addcontentsline{toc}{#1}{%
      \ifnum #2>\c@secnumdepth \else
        \protect\numberline{\csname the#1\endcsname}%
      \fi
      #7}%
    \addcontentsline{cot}{#1}{%
      \ifnum #2>\c@secnumdepth \else
        \protect\numberline{\csname the#1\endcsname}%
      \fi
      #7}%
  \else
    \def\@svsechd{%
      #6{\hskip #3\relax
      \@svsec #8}%
      \csname #1mark\endcsname{#7}%
      \addcontentsline{toc}{#1}{%
        \ifnum #2>\c@secnumdepth \else
          \protect\numberline{\csname the#1\endcsname}%
        \fi
        #7}%
      \addcontentsline{cot}{#1}{%
        \ifnum #2>\c@secnumdepth \else
          \protect\numberline{\csname the#1\endcsname}%
        \fi
        #7}}%
  \fi
  \@xsect{#5}}
\long\def\@caption#1[#2]#3{%
  \par
  \addcontentsline{\csname ext@#1\endcsname}{#1}%
    {\protect\numberline{\csname the#1\endcsname}%
    {\ignorespaces #2}}%
  \def\@fignm{figure}
  \ifx#1\@fignm\addcontentsline{fol}{#1}%
     {\protect\numberline{\csname the#1\endcsname}%
     {\ignorespaces #2}}\fi%
  \def\@tblnm{table}
  \ifx#1\@tblnm\addcontentsline{tol}{#1}%
     {\protect\numberline{\csname the#1\endcsname}%
     {\ignorespaces #2}}\fi%
  \begingroup
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
\@ifclassloaded{letter}{}{%
  \@ifclassloaded{article}{}{%
    \renewcommand*\l@chapter[2]{%
      \ifnum \c@tocdepth >\m@ne
      \addpenalty{-\@highpenalty}%
      \vskip 1.0em \@plus\p@
      \setlength\@tempdima{1.5em}%
      \begingroup
         \parindent \z@ \if@rl\leftskip\else\rightskip\fi \@pnumwidth
         \parfillskip -\@pnumwidth
         \leavevmode \bfseries
         \advance\if@rl\rightskip\else\leftskip\fi\@tempdima
         \hskip -\if@rl\rightskip\else\leftskip\fi
         #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss#2}\par
         \penalty\@highpenalty
      \endgroup
      \fi}}}
\@ifclassloaded{article}{%
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}}
\renewcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}}{}
\let\@@outputdblcol\@outputdblcol
\def\set@outputdblcol{%
  \if@rl\renewcommand{\@outputdblcol}{\rl@outputdblcol}%
  \else\renewcommand{\@outputdblcol}{\@@outputdblcol}\fi}
\newcommand{\rl@outputdblcol}{%
  \if@firstcolumn
    \global \@firstcolumnfalse
    \global \setbox\@leftcolumn \box\@outputbox
  \else
    \global \@firstcolumntrue
    \setbox\@outputbox \vbox {\hb@xt@\textwidth {%
                              \hskip\columnwidth%
                              \hfil\vrule\@width\columnseprule\hfil
                              \hb@xt@\columnwidth {%
                                \box\@leftcolumn \hss}%
                              \hb@xt@\columnwidth {%
                                \hskip-\textwidth%
                                \box\@outputbox \hss}%
                              \hskip\columnsep%
                              \hskip\columnwidth}}%
    \@combinedblfloats
    \@outputpage
    \begingroup
      \@dblfloatplacement
      \@startdblcolumn
      \@whilesw\if@fcolmade \fi
        {\@outputpage
         \@startdblcolumn}%
    \endgroup
 \fi}
\let\@@footnoterule=\footnoterule
\def\footnoterule{\if@rl\hb@xt@\hsize{\hss\vbox{\@@footnoterule}}%
                  \else\@@footnoterule\fi}
\@ifclassloaded{letter}{%
  \def\headodd{\protect\if@rl\beginR\fi\headtoname{}
               \ignorespaces\toname
               \hfil \@date
               \hfil \pagename{} \thepage\protect\if@rl\endR\fi}
  \if@twoside
     \def\ps@headings{%
         \let\@oddfoot\@empty\let\@evenfoot\@empty
         \def\@oddhead{\select@language{\headlanguage}\headodd}
         \let\@evenhead\@oddhead}
  \else
     \def\ps@headings{%
         \let\@oddfoot\@empty
         \def\@oddhead{\select@language{\headlanguage}\headodd}}
  \fi
  \def\headfirst{\protect\if@rl\beginR\fi\fromlocation \hfill %
                 \telephonenum\protect\if@rl\endR\fi}
  \def\ps@firstpage{%
     \let\@oddhead\@empty
     \def\@oddfoot{\raisebox{-45\p@}[\z@]{%
        \hb@xt@\textwidth{\hspace*{100\p@}%
          \ifcase \@ptsize\relax
             \normalsize
          \or
             \small
          \or
             \footnotesize
          \fi
        \select@language{\headlanguage}\headfirst}}\hss}}
  \renewcommand{\opening}[1]{%
     \let\headlanguage=\languagename%
     \ifx\@empty\fromaddress%
        \thispagestyle{firstpage}%
        {\raggedleft\@date\par}%
     \else  % home address
        \thispagestyle{empty}%
        {\raggedleft
        \if@rl\begin{tabular}{r}\ignorespaces
           \fromaddress \\*[2\parskip]%
           \@date \end{tabular}\par%
        \else\begin{tabular}{l}\ignorespaces
           \fromaddress \\*[2\parskip]%
           \@date \end{tabular}\par%
        \fi}%
     \fi
     \vspace{2\parskip}%
     {\raggedright \toname \\ \toaddress \par}%
     \vspace{2\parskip}%
     #1\par\nobreak}
}
{% article, report, book
  \def\headeven{\protect\if@rl\beginR\thepage\hfil\rightmark\endR
                \protect\else\thepage\hfil{\slshape\leftmark}
                \protect\fi}
  \def\headodd{\protect\if@rl\beginR\leftmark\hfil\thepage\endR
               \protect\else{\slshape\rightmark}\hfil\thepage
               \protect\fi}
  \@ifclassloaded{article}{% article
    \if@twoside   % two-sided
       \def\ps@headings{%
         \let\@oddfoot\@empty\let\@evenfoot\@empty
         \def\@evenhead{\select@language{\headlanguage}\headeven}%
         \def\@oddhead{\select@language{\headlanguage}\headodd}%
         \let\@mkboth\markboth
         \def\sectionmark##1{%
           \markboth {\MakeUppercase{%
               \ifnum \c@secnumdepth >\z@
                  \thesection\quad
               \fi
               ##1}}{}}%
         \def\subsectionmark##1{%
           \markright{%
             \ifnum \c@secnumdepth >\@ne
                \thesubsection\quad
             \fi
        ##1}}}
    \else          % one-sided
       \def\ps@headings{%
         \let\@oddfoot\@empty
         \def\@oddhead{\headodd}%
         \let\@mkboth\markboth
         \def\sectionmark##1{%
           \markboth{\MakeUppercase{%
               \ifnum \c@secnumdepth >\m@ne
                  \thesection\quad
               \fi
               ##1}}{\MakeUppercase{%
               \ifnum \c@secnumdepth >\m@ne
                  \thesection\quad
               \fi
               ##1}}}}
    \fi
    \def\ps@myheadings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\select@language{\headlanguage}\headeven}%
      \def\@oddhead{\select@language{\headlanguage}\headodd}%
      \let\@mkboth\@gobbletwo
      \let\sectionmark\@gobble
      \let\subsectionmark\@gobble
  }}{% report and book
    \if@twoside  % two-sided
       \def\ps@headings{%
         \let\@oddfoot\@empty\let\@evenfoot\@empty
         \def\@evenhead{\select@language{\headlanguage}\headeven}
         \def\@oddhead{\select@language{\headlanguage}\headodd}
         \let\@mkboth\markboth
         \def\chaptermark##1{%
           \markboth{\MakeUppercase{%
               \ifnum \c@secnumdepth >\m@ne
                  \@chapapp\ \thechapter. \ %
               \fi
               ##1}}{}}%
         \def\sectionmark##1{%
           \markright {\MakeUppercase{%
               \ifnum \c@secnumdepth >\z@
                  \thesection. \ %
               \fi
               ##1}}}}
    \else  % one-sided
       \def\ps@headings{%
         \let\@oddfoot\@empty
         \def\@oddhead{\select@language{\headlanguage}\headodd}
         \let\@mkboth\markboth
         \def\chaptermark##1{%
           \markboth{\MakeUppercase{%
               \ifnum \c@secnumdepth >\m@ne
                  \@chapapp\ \thechapter. \ %
               \fi
               ##1}}{\MakeUppercase{%
               \ifnum \c@secnumdepth >\m@ne
                  \@chapapp\ \thechapter. \ %
               \fi
               ##1}}}}
    \fi
    \def\ps@myheadings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\select@language{\headlanguage}\headeven}%
      \def\@oddhead{\select@language{\headlanguage}\headodd}%
      \let\@mkboth\@gobbletwo
      \let\chaptermark\@gobble
      \let\sectionmark\@gobble
  }}}
\def\raggedright{%
  \let\\\@centercr
  \leftskip\z@skip\rightskip\@flushglue
  \parindent\z@\parfillskip\z@skip}
\let\@@raggedleft=\raggedleft
\let\@@raggedright=\raggedright
\renewcommand\raggedleft{\if@rl\@@raggedright%
                         \else\@@raggedleft\fi}
\renewcommand\raggedright{\if@rl\@@raggedleft%
                          \else\@@raggedright\fi}
\let\@@author=\author
\renewcommand{\author}[1]{\@@author{\if@rl\beginR #1\endR\else #1\fi}}
\let\@@MakeUppercase=\MakeUppercase
\def\MakeUppercase#1{\if@rl#1\else\@@MakeUppercase{#1}\fi}
\let\@@MakeLowercase=\MakeLowercase
\def\MakeLowercase#1{\if@rl#1\else\@@MakeLowercase{#1}\fi}
\let\@@@underline=\underline
\def\underline#1{\@@@underline{\if@rl\R{#1}\else #1\fi}}
\if@compatibility
   \let\undertext=\underline
\fi
\def\@xnthm#1#2[#3]{%
  \expandafter\@ifdefinable\csname #1\endcsname
  {\@definecounter{#1}\@addtoreset{#1}{#3}%
    \expandafter\xdef\csname the#1\endcsname{\noexpand\@number
      {\expandafter\noexpand\csname the#3\endcsname \@thmcountersep
        \@thmcounter{#1}}}%
    \global\@namedef{#1}{\@thm{#1}{#2}}%
    \global\@namedef{end#1}{\@endtheorem}}}
\def\@opargbegintheorem#1#2#3{%
  \trivlist
      \item[\hskip \labelsep{\bfseries #1\ #2\
          \@brackets({#3})}]\itshape}
\@ifclassloaded{article}{}{%
  % For pretty priniting
  \def\@@chapapp{Chapter}
  \def\@@thechapter{\@@arabic\c@chapter}
  \def\@chapter[#1]#2{%
    \let\headlanguage=\languagename%
    \set@outputdblcol%
    \ifnum \c@secnumdepth >\m@ne
       \refstepcounter{chapter}%
       \typeout{\@@chapapp\space\@@thechapter.}%
       \addcontentsline{toc}{chapter}%
       {\protect\numberline{\thechapter}#1}
       \addcontentsline{cot}{chapter}%
       {\protect\numberline{\thechapter}#1}
    \else
       \addcontentsline{toc}{chapter}{#1}%
       \addcontentsline{cot}{chapter}{#1}%
    \fi
    \chaptermark{#1}
    \addtocontents{lof}{\protect\addvspace{10\p@}}%
    \addtocontents{fol}{\protect\addvspace{10\p@}}%
    \addtocontents{lot}{\protect\addvspace{10\p@}}%
    \addtocontents{tol}{\protect\addvspace{10\p@}}%
    \if@twocolumn
       \@topnewpage[\@makechapterhead{#2}]%
    \else
       \@makechapterhead{#2}%
       \@afterheading
    \fi}
  %
  \def\@schapter#1{%
    \let\headlanguage=\languagename%
    \set@outputdblcol%
    \if@twocolumn
       \@topnewpage[\@makeschapterhead{#1}]%
    \else
       \@makeschapterhead{#1}%
       \@afterheading
    \fi}}
\@ifclassloaded{letter}{}{% other
  \@ifclassloaded{article}{% article
    \renewcommand\appendix{\par
      \setcounter{section}{0}%
      \setcounter{subsection}{0}%
      \renewcommand\thesection{\@Alph\c@section}}
  }{% report and book
    \renewcommand\appendix{\par
      \set@outputdblcol%
      \setcounter{chapter}{0}%
      \setcounter{section}{0}%
      \renewcommand\@chapapp{\appendixname}%
      % For pretty priniting
      \def\@@chapapp{Appendix}%
      \def\@@thechapter{\@@Alph\c@chapter}
      \renewcommand\thechapter{\@Alph\c@chapter}}}}
\def\@cite#1#2{\@brackets[{#1\if@tempswa , #2\fi}]}
\def\@biblabel#1{\@brackets[{#1}]}
\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
      {\let\protect\noexpand
       \immediate
       \if@rl\write\@auxout{\string\bibcite{#2}{\R{#1}}}%
       \else\write\@auxout{\string\bibcite{#2}{\L{#1}}}\fi%
      }\fi\ignorespaces}
\@ifclassloaded{letter}{}{% other
\@ifclassloaded{article}{%
  \renewenvironment{thebibliography}[1]
  {\section*{\refname\@mkboth%
      {\MakeUppercase\refname}%
      {\MakeUppercase\refname}}%
    \list{\@biblabel{\@arabic\c@enumiv}}%
    {\settowidth\labelwidth{\@biblabel{#1}}%
      \if@rl\leftmargin\else\rightmargin\fi\labelwidth
      \advance\if@rl\leftmargin\else\rightmargin\fi\labelsep
      \@openbib@code
      \usecounter{enumiv}%
      \let\p@enumiv\@empty
      \renewcommand\theenumiv{\@arabic\c@enumiv}}%
    \sloppy
    \clubpenalty4000
    \@clubpenalty \clubpenalty
    \widowpenalty4000%
    \sfcode`\.\@m}
  {\def\@noitemerr
    {\@latex@warning{Empty `thebibliography' environment}}%
     \endlist}}%
{\renewenvironment{thebibliography}[1]{%
    \chapter*{\bibname\@mkboth%
      {\MakeUppercase\bibname}%
      {\MakeUppercase\bibname}}%
    \list{\@biblabel{\@arabic\c@enumiv}}%
    {\settowidth\labelwidth{\@biblabel{#1}}%
      \if@rl\leftmargin\else\rightmargin\fi\labelwidth
      \advance\if@rl\leftmargin\else\rightmargin\fi\labelsep
      \@openbib@code
      \usecounter{enumiv}%
      \let\p@enumiv\@empty
      \renewcommand\theenumiv{\@arabic\c@enumiv}}%
    \sloppy
    \clubpenalty4000
    \@clubpenalty \clubpenalty
    \widowpenalty4000%
    \sfcode`\.\@m}
  {\def\@noitemerr
    {\@latex@warning{Empty `thebibliography' environment}}%
     \endlist}}}
\def\@verbatim{%
  \let\do\@makeother \dospecials%
  \obeylines \verbatim@font \@noligs}
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip%
  \begin{center}%
    #1: #2%
  \end{center} \par%
  \vskip\belowcaptionskip}
\newcommand{\bpart}[2]{\part{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\newcommand{\bchapter}[2]{\chapter{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\newcommand{\bsection}[2]{\section{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\newcommand{\bsubsection}[2]{\subsection{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\newcommand{\bsubsubsection}[2]{\subsubsection{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\newcommand{\bcaption}[2]{%
  \caption[\protect\if@rl \R{#1}\protect\else \L{#2}\protect\fi]{%
    \if@rl\R{#1}\protect\\ \L{#2}
    \else\L{#2}\protect\\ \R{#1}\fi}}
\newcommand{\bchapternn}[2]{\chapter*{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\newcommand{\bsectionnn}[2]{\section*{\protect\if@rl%
    #1 \protect\else #2 \protect\fi}}
\AtEndOfPackage{\let\headlanguage=\languagename%
                \set@outputdblcol}
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\endinput
%%
%% End of file `rlbabel.def'.