% \iffalse meta-comment
%
% Copyright (C) 1993 by LaTeX3 project.  All rights reserved.
% For additional copyright information see further down in this file.
% 
% This file is part of the LaTeX2e system (PRELIMINARY TEST RELEASE)
% ------------------------------------------------------------------
% 
%  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.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see readme files.
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in 00readme.l2e.
% 
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
%
%    \begin{macrocode}
%<*code>
\makeatother
\dump
%</code>
%    \end{macrocode}
%  \end{macro}
%
% \section{The driver for the documentation}
%
%
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}

\makeatletter

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

% scan control names and put them in tt.
% will actually (incorrectly) scan past \\ but this does not matter as 
% this is almost never followed by a letter in practice.  
% (ie \\foo ) would but foo in \tt.

\def\oc@scan#1{%
  \ifx\oc@bslash#1%
                      \egroup\let\next\oc@bslash\else
  \ifcat a\noexpand#1%
                      #1\let\next\oc@scan\else
  \ifx\oc@percent#1%
                      \def\next{\char`\%\egroup}%
  \else
                      #1\let\next\egroup
  \fi\fi\fi\next}


\def\oc@bslash{\bgroup\ttfamily\char`\\\oc@scan}%

\def\oc@verb#1{%
  \catcode`#1\active
  \uccode`\~`#1%
  \uppercase{\def~{{\ttfamily\char`#1}}}}

\begingroup
  \obeyspaces%
  \catcode`\/=\catcode`\\
  /catcode`/\/active
  /catcode`<=/catcode`{%
  /catcode`>=/catcode`}%
  /catcode`/{/active%
  /catcode`/}/active%
  /gdef/oldc< \end{oldcomments}>%
  /gdef/begmac<    \begin{macrocode}>%
  /gdef/obs</def <</ttfamily/ >>>%
/endgroup%


\begingroup
  \catcode`\/=\catcode`\\
  \catcode`\\=13
  /catcode`/|=/catcode`/%
  /catcode`/%=13
  /gdef/oldcomments{|
    /makeatletter
    /let/do/oc@verb/dospecials
    /frenchspacing/@vobeyspaces/obs
    /raggedright
    /oc@verb/>|
    /oc@verb/<|
    /let\/oc@bslash
    /let%/oc@percent
    /obeylines
    /parindent/z@
    /ttfamily
    }
/endgroup

\begingroup
  \sloppy%
  \obeylines%
  \gdef\oc@percent#1^^M{%
    \ifvmode%
    \def\commentline{#1}%
    \ifx\commentline\oldc%
    \end{oldcomments}%
    \else%
    \ifx\commentline\begmac%
    \begin{macrocode}%
    \else%
    \leavevmode%
    #1^^M%
    \fi\fi%
    \else%
    {\ttfamily\char`\%}#1^^M%
    \fi}%
\endgroup%

\hfuzz\maxdimen
\ttfamily\rmfamily

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

\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
\DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,%
            \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi}
\DoNotIndex{\@tempa,\@gtempa,\@tempb,\@tempc,\@tempd,\@tempdima,\@tempdimb}
\DoNotIndex{\@tempboxa,\@tempcnta,\@tempcntb,\@tempskipa}
\DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,\vbox,\vtop,\vcenter}
\DoNotIndex{\@empty,\@ifnextchar,\@inputcheck,\immediate,\write}
\DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup}
\DoNotIndex{\divide,\advance,\multiply,\count,\dimen}
\DoNotIndex{\relax,\space,\string,\typeout,\@warning,\@latexerr}
\DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,\closein,\closeout}
\DoNotIndex{\active,\catcode,\count@,\endinput,\endlinechar}
\DoNotIndex{\jobname,\message,\read,\the,\m@ne,\noexpand}
\DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss}
\DoNotIndex{\ignorespaces,\leavevmode,\break,\nobreak,\par,\endgraf}
\DoNotIndex{\newcount,\newtoks,\newdimen,\newif,\newinsert,%
            \newread,\newskip,\newwrite}
\DoNotIndex{\m@ne,\z@,\z@skip,\@ne,\tw@}
\DoNotIndex{\dp,\wd,\ht,\vspace,\vss,\unskip}

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

\EnableCrossrefs

\begin{document}

\DocInput{latex.dtx}

\hbadness=10001
\newcount\hbadness

\PrintIndex

\end{document}
%</driver>
%    \end{macrocode}
%
