% \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
%\iffalse
% ====================================================================
%  @LaTeX-distribution-file{
%     author_1        = "Alan Jeffrey",
%     version         = "0.09",
%     date            = "20 December 1993",
%     time            = "12:24:06 GMT",
%     filename        = "latex209.dtx",
%     address_1       = "School of Cognitive and Computing Sciences
%                        University of Sussex
%                        Brighton BN1 9QH
%                        UK",
%     telephone       = "+44 273 606755 x 3238",
%     FAX             = "+44 273 678188",
%     checksum        = "???",
%     email           = "alanje@cogs.sussex.ac.uk",
%     codetable       = "ISO/ASCII",
%     keywords        = "LaTeX, standard file",
%     supported       = "yes",
%     abstract        = "This file contains the code for LaTeX 2.09
%                        compatibility mode in LaTeX 2e.  It is read
%                        by LaTeX 2e when it finds a \documenstyle
%                        command.",
%  }
% ====================================================================
%\fi
%
% \MakeShortVerb{\|}
% \setcounter{StandardModuleDepth}{1}
% \def\dst{\expandafter{\normalfont\scshape docstrip}}
%
% \changes{0.01}{1993/12/11}{Created the file, including:
%   setting the compatibility flag,
%   inputting oldlfont.sty,`
%   setting the default encoding to be OT1, and
%   inputting the latex209.rc file}
% \changes{0.02}{1993/12/12}{Changed the package filename to
%   latex209.sty, and added the provides-package command.}
% \changes{0.03}{1993/12/16}{Added an empty mark, replaced
%   provides-package with provides-file, added the compatibility hook.}
% \changes{0.04}{1993/12/16}{Moved oldlfont.sty out of the
%    compatibility hook and back into latex209.cmp.  Redefined
%    newfontswitch to ignore redefinitions.  Set the LaTeX 2e commands
%    to be errors.}
% \changes{0.05}{1993/12/17}{Removed the `mark, since it is now in the
%    kernel.} 
% \changes{0.06}{1993/12/18}{Replaced the redefinition of
%    `@newfontswitch to a redefinition of `@renewfontswitch.  Added
%    `sloppy.}
% \changes{0.07}{1993/12/18}{Fixed a bug with `@missingfileerror.}
% \changes{0.08}{1993/12/18}{Added the obsolete .sty files.}
% \changes{0.09}{1993/12/20}{Removed art10.sty and friends.}
%
% \title{Compatibility mode for \LaTeXe{} emulating \LaTeX~2.09}
% \author{Alan Jeffrey}
% \date{\filedate}
%
% \maketitle
%
% \section{Introduction}
%
% The file |latex209.cmp| is read in by \LaTeXe{} whenever it finds a
% |\documentstyle| rather than |\documentclass| command at the
% beginning of the file.  This indicates a \LaTeX~2.09 document, which
% should be processed in {\em compatibility mode}.
%
% Any document which compiled under \LaTeX~2.09 should compile under
% compatibility mode, unless it uses low-level commands such as
% |\tenrm|. 
%
% \section{The \dst{} modules}
%
% The following modules are used in the implementation to direct
% \dst{} in generating the external files:
% \begin{center}
% \begin{tabular}{ll}
%   driver & produce a documentation driver file \\
%   package  & produce |latex209.cmp| \\
%   article  & produce |article.sty| \\
%   book     & produce |book.sty| \\
%   report   & produce |report.sty| \\
%   slides   & produce |slides.sty| \\
%   letter   & produce |letter.sty| \\
% \end{tabular}
% \end{center}
% \changes{0.09}{1993/12/20}{Removed artN.sty, bkN.sty and repN.sty.}
%
% \section{Package}
%
% This section describes the file |latex209.cmp|.
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%
% \subsection{Identification}
%
% This file needs to be run with \LaTeXe.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
% We store the date, version and name of this file in three control
% sequences, for future use.
%    \begin{macrocode}
\def\filedate{1993/12/20}
\def\fileversion{0.09}
\def\filename{latex209.dtx}
%    \end{macrocode}
% Describe the package.
%    \begin{macrocode}
\ProvidesFile{latex209.cmp}[\filedate\space Standard LaTeX2e file]
%    \end{macrocode}
% Announce compatibility mode to the user.
%    \begin{macrocode}
\typeout{Entering LaTeX 2.09 compatibility mode <\filedate>.}
%    \end{macrocode}
%
% \subsection{Compatibility flag}    
%
% \begin{macro}{\@compatibilitytrue}
%    \LaTeXe{} has a flag |\if@compatibility| which can be used by
%    document classes or packages to determine whether they are running
%    in compatibility mode or not.  This flag is set true by this file.
%    \begin{macrocode}
\@compatibilitytrue
%    \end{macrocode}
% \end{macro}
%
% \subsection{Compatibility hook}
%
% \begin{macro}{\@compatibility}
%    This macro is called once the document style file has been
%    loaded.  By default it does nothing, but we redefine it to load a
%    package for each unhandled option. 
%    \begin{macrocode}
\def\@compatibility{%
   \RequirePackage{\@unusedoptionlist}%
   \let\@unusedoptionlist\@empty
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Compatibility with \LaTeX~2.09 document styles}
%
% \begin{macro}{\@missingfileerror}
%    If a |.cls| file is missing, we look to see if there is
%    a file of the same name with a |.sty| extension.  
% \changes{0.06}{1993/12/18}{Corrected a typo `@saved@missingfileerror
%    should have been `saved@missingfileerror.}
% \changes{0.07}{1993/12/18}{Corrected a typo, I'd forgotten to pass
%    the arguments of `@missingfileerror on to
%    `saved@missingfileerror.} 
%    \begin{macrocode}
\@ifundefined{saved@missingfileerror}{
   \let\saved@missingfileerror=\@missingfileerror
}{}
\def\@missingfileerror#1#2{%
   \ifx#2\@clsextension
      \InputIfFileExists{#1.\@pkgextension}{%
         \wlog{Compatibility mode: loading #1.\@pkgextension
            \space rather than #1.#2.}%
      }{
         \saved@missingfileerror{#1}{#2}%
      }
   \else
      \saved@missingfileerror{#1}{#2}%
   \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@obsoletefile}
%    For compatibility with \LaTeX~2.09 document styles, we distribute
%    files called |article.sty|, |book.sty|, |report.sty|,
%    |slides.sty| and |letter.sty|.  These use the command
%    |\@obsoletefile|, which the \LaTeXe{} kernel defines to produce a
%    warning message.  We redefine it to just produce a message in the
%    log file.
%    \changes{0.08}{1993/12/19}{Added this command.}
%    \begin{macrocode}
\def\@obsoletefile#1#2{%
   \wlog{Compatibility mode: inputting `#1' 
      instead of obsolete `#2'.}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footheight}
% \begin{macro}{\@maxsep}
% \begin{macro}{\@dblmaxsep}
%    \LaTeX~2.09 supported these parameters, so for compatibility with
%    old document styles we let each of these be a temporary
%    dimension, so setting them will not cause an error.  This will
%    cause problems for any document styles which actually use these
%    parameters, but that's pretty unlikely.
%    \begin{macrocode}
\let\footheight=\@tempdima
\let\@maxsep=\@tempdima
\let\@dblmaxsep=\@tempdima
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Font commands}
%
% \begin{macro}{\encodingdefault}
%    The default encoding for old documents is OT1 rather than T1.
%    \begin{macrocode}
\renewcommand{\encodingdefault}{OT1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cmex/m/n/10}
%    Just in case a document style relies on |\cmex/m/n/10| to exist
%    (which may have been hard-wired to |\fam3|) we load the font.
%    \begin{macrocode}
\expandafter\font\csname cmex/m/n/10\endcsname=cmex10
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\normalsize}
%    Some styles don't define |\normalsize|, just |\@normalsize|.
%    \begin{macrocode}
\def\normalsize{\@normalsize}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@renewfontswitch}
%    We redefine |\@renewfontswitch| to do nothing.  This means that
%    any new document classes will have their redefinitions of |\rm|,
%    |\bf| etc.~ignored.
% \changes{0.06}{1993/12/18}{Replaced `@newfontswitch by
%    `@renewfontswitch.} 
%    \begin{macrocode}
\def \@renewfontswitch #1#2#3{%
  \wlog{Compatibility mode: redefinition 
        of \string#1\space ignored.}%
}
\RequirePackage{oldlfont}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Layout}
%
% \changes{0.06}{1993/12/18}{Added `sloppy}
% \begin{macro}{\sloppy}
%    There will be a new version of |\sloppy| in \LaTeXe, so we save the
%    old one.
%    \begin{macrocode}
\def\sloppy{\tolerance \@M \hfuzz .5\p@ \vfuzz .5\p@}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Removing features}
%
% \begin{macro}{\@latex@e@error}
%    This error is produced if a user uses a \LaTeXe{} command in
%    compatibility mode.  This is to encourage users to move over to
%    using |\documentclass| as quickly as possible.
%    \begin{macrocode}
\def\@latex@e@error#1{%
   \@latexerr{%
      LaTeX 2e command \string#1\space in LaTeX 2.09 document%
   }{%
      This is a LaTeX 2.09 document, but it contains^^J%
      the LaTeX 2e command \string#1.^^J%
      I'll try to ignore the command.^^J%
      If you want to use the new features of LaTeX 2e,^^J%
      your document should begin with \string\documentclass^^J%
      rather than \string\documentstyle 
   }%
}
%    \end{macrocode}
% \end{macro}   
%
% \begin{macro}{\usepackage}
% \begin{macro}{\listfiles}
% \begin{macro}{\ensuremath}
% \begin{macro}{\settoheight}
% \begin{macro}{\settodepth}
% \begin{macro}{\suppressfloats}
% \begin{macro}{\LaTeXe}
%    The new macros in \LaTeXe are all set to be an error.  Note that
%    the font-changing commands aren't, for compatibility with
%    \LaTeX~2.09+NFSS documents.
%    \begin{macrocode}
\def\usepackage{\@latex@e@error\usepackage}
\def\listfiles{\@latex@e@error\listfiles}
\def\ensuremath{\@latex@e@error\ensuremath}
\def\settoheight{\@latex@e@error\settoheight}
\def\settodepth{\@latex@e@error\settodepth}
\def\suppressfloats{\@latex@e@error\suppressfloats}
\def\LaTeXe{\@latex@e@error\LaTeXe}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{User customization}
%
% For sites which customized their version of \LaTeX~2.09, we provide
% a file |latex209.rc|, which is loaded every time we enter
% compatibility mode.  If the file doesn't exist, we don't do
% anything. 
%    \begin{macrocode}
\InputIfFileExists{latex209.rc}{}{}
%    \end{macrocode}
% That ends the file |latex209.cmp|.
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
% \section{Obsolete style files}
%
% \changes{0.08}{1993/12/19}{Added this section.}
% \changes{0.09}{1993/12/20}{Removed artN.sty, bkN.sty and repN.sty.}
%
% For each of the standard \LaTeX~2.09 document styles, we produce a
% file which points to the appropriate \LaTeXe{} document class file.
% This means that any styles which say |\input article.sty| should
% still work.
% 
%    \begin{macrocode}
%<*article|book|report|letter|slides>
\NeedsTeXFormat{LaTeX2e}
%</article|book|report|letter|slides>
%<*article>
\@obsoletefile{article.cls}{article.sty}
\LoadClass{article}
%</article>
%<*book>
\@obsoletefile{book.cls}{book.sty}
\LoadClass{book}
%</book>
%<*report>
\@obsoletefile{report.cls}{report.sty}
\LoadClass{report}
%</report>
%<*letter>
\@obsoletefile{letter.cls}{letter.sty}
\LoadClass{letter}
%</letter>
%<*slides>
\@obsoletefile{slides.cls}{slides.sty}
\LoadClass{slides}
%</slides>
%    \end{macrocode}
%
% \section{Driver}
%
% This section contains the driver for this documentation.
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
\DisableCrossrefs
% \OnlyDescription 
\begin{document}
   \DocInput{latex209.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% \DeleteShortVerb{\|}
% 
\endinput


