% \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
\def\fileversion{v2.1f}
\def\filedate{93/12/20}
\def\docdate {93/12/06}

% \CheckSum{271}
%% \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         \~}
%
%\iffalse   % this is a METACOMMENT !
%
% File `oldlfont.dtx'.
%% Copyright (C) 1989-1993 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
%
% \fi
%
%
% \MakeShortVerb{\|}
% \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
%
% \setcounter{StandardModuleDepth}{1}
%
% \title{The file \texttt{oldlfont.dtx} for use with 
%        \LaTeXe.\thanks{This file has version
%        number \fileversion, dated \filedate.  The documentation was
%        last updated on \docdate.}\\[2pt]
%        It contains the code for \texttt{oldlfont.sty}}
%
% \author{Frank Mittelbach}
%
% \maketitle
%
% \section{Introduction}
%
%    This file contains the code for the \texttt{oldlfont} package
%    which emulates the \LaTeX~2.09 font commands.
%
% \StopEventually{}
%
%
%
% As always we begin by identifying the latest version of this file
% on the VDU and in the \textsf{log} file.
%    \begin{macrocode}
%<*package>
\ProvidesPackage{oldlfont}[\filedate\space\fileversion\space
                           Standard LaTeX2e package]
\immediate
 \write\sixt@@n{Package: `oldlfont'
 \fileversion\space <\filedate>  (FMi and RmS)}
\immediate
 \write\sixt@@n{English Documentation
 \@spaces <\docdate>  (FMi and RmS)}
%    \end{macrocode}
%
%    When emulating the old settings we don't want a lot of NFSS
%    information being displayed. Thus we required that the
%    \texttt{tracefnt} package is loaded with the option
%    \texttt{errorshow}.
%    \begin{macrocode}
\RequirePackage[errorshow]{tracefnt}
%    \end{macrocode}
%
%
% \begin{macro}{\load}
%    The |\load| command is no longer needed, it is therefore
%    defined to do nothing.
%    \begin{macrocode}
\let\load\@gobbletwo
%    \end{macrocode}
% \end{macro}
%
%    Then we define math \emph{alphabet} identifiers for the typefaces
%    described in the \LaTeX{} manual.  This is straightforward. Some
%    are already defined by the kernel code.
%    And here are the other ones defined by the old \LaTeX{}. They all
%    get declared as math symbol font alphabets. Thus we first
%    allocate the additional symbol fonts.
%    \begin{macrocode}
\DeclareSymbolFont{bold}{OT1}{cmr}{bx}{n}
\DeclareSymbolFont{sans}{OT1}{cmss}{m}{n}
\DeclareSymbolFont{typewriter}{OT1}{cmtt}{m}{n}
\DeclareSymbolFont{italic}{OT1}{cmr}{m}{it}
\DeclareSymbolFont{smallcaps}{OT1}{cmr}{m}{sc}
\DeclareSymbolFont{slanted}{OT1}{cmr}{m}{sl}
%    \end{macrocode}
%    And here are the corresponding math identifiers.
%    \begin{macrocode}
\DeclareSymbolFontAlphabet\mathbf{bold}
\DeclareSymbolFontAlphabet\mathsf{sans}
\DeclareSymbolFontAlphabet\mathtt{typewriter}
\DeclareSymbolFontAlphabet\mathsc{smallcaps}
\DeclareSymbolFontAlphabet\mathsl{slanted}
%    \end{macrocode}
%    We undefine the old |\mit| and |\cal| macros (whatever meaning
%    they have) and reallocate them as symbol font alphabets.
%    \begin{macrocode}
\let\mit\undefined
\let\cal\undefined
\let\mathit\undefined
\DeclareSymbolFontAlphabet\mathit{italic}
\DeclareSymbolFontAlphabet{\mit}{letters}
\DeclareSymbolFontAlphabet{\cal}{symbols}
%    \end{macrocode}
%
%    Here are three delimiters which have be partly disabled by
%    NFSS2 (the small variants) since the corresponding fonts are
%    normally not preloaded as math symbol fonts.
%    \begin{macrocode}
\DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips
     {\mathopen}{bold}{"28}{largesymbols}{"3A}
\DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips
     {\mathclose}{bold}{"29}{largesymbols}{"3B}
\DeclareMathDelimiter{\bracevert} % the vertical bar that extends braces
     {\mathord}{typewriter}{"7C}{largesymbols}{"3E} 
%    \end{macrocode}
%
%    In old documents we might find some usages of |\bffam| etc. Thus
%    we add the following code:
%    \begin{macrocode}
\let\bffam\symbold
\let\sffam\symsans
\let\itfam\symitalic
\let\ttfam\symtypewriter
\let\scfam\symsmallcaps
\let\slfam\symslanted
\let\rmfam\symoperators
%    \end{macrocode}
%
%    We define the font commands for selecting the typeface. They are
%    probably defined by the document class/style but we want to force
%    the old meaning.
%    \begin{macrocode}
\def\rm{\protect\prm}
\def\sf{\protect\psf}
\def\sl{\protect\psl}
\def\bf{\protect\pbf}
\def\sc{\protect\psc}
\def\it{\protect\pit}
\def\tt{\protect\ptt}
%    \end{macrocode}
%    And here are the definition as they were in \LaTeX~2.09 but
%    translated into NFSS2 language.
%    \begin{macrocode}
\def\prm{\reset@font\rmfamily\mathgroup\symoperators}
\def\psf{\reset@font\sffamily\mathgroup\symsans}
\def\psl{\reset@font\slshape\mathgroup\symslanted}
\def\pbf{\reset@font\bfseries\mathgroup\symbold}
\def\psc{\reset@font\scshape\mathgroup\symsmallcaps}
\def\pit{\reset@font\itshape\mathgroup\symitalic}
\def\ptt{\reset@font\ttfamily\mathgroup\symtypewriter}
%    \end{macrocode}
%     We also have to define the \emph{emphasize} font change command
%    (i.e.\ |\em|). This command will look whether the current font is
%    sloped (i.e.\ has a positive |\fontdimen1|) and will then select
%    either |\rm| or |\it|.
%    \begin{macrocode}
\def\em{\protect\pem}
\def\pem{\@nomath\em \ifdim \fontdimen\@ne\font >\z@
                       \rm \else \it \fi}
%    \end{macrocode}
%
% \begin{macro}{\@setfontsize}
%    Font size changes are handled using the |\@setfontsize| command
%    (in new class files) or by the |@setsize| command in old document
%    style files. The latter is now defined to call |\@setfontsize| in
%    the NFSS2 kernel code.
%    Thus to make all size changing commands automatically return to
%    the normal font of the document we only have to slightly modify
%    the definition of |\@setfontsize| by adding a |\reset@font|
%    command to it.
%    \begin{macrocode}
\def\@setfontsize#1#2#3{\@nomath#1%
    \ifx\protect\relax
      \let\@currsize#1%
    \fi
    \fontsize{#2}{#3}\reset@font}
%    \end{macrocode}
% \end{macro}
%
%
%
% \begin{macro}{\math@bgroup}
% \begin{macro}{\math@egroup}
%   To make \meta{math alphabet identifier} work like simple font
%   switches we change the meaning of |\math@bgroup| and
%   |\math@egroup| to |\@empty|. This emulates the bavior of
%   \texttt{oldlfont.sty} in NFSS1 setups.
%    \begin{macrocode}
\let\math@bgroup\@empty
\let\math@egroup\@empty
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%  \begin{macro}{\non@alpherr}
%    Since we emulate the old syntax we also have to silently ignore
%    uses of a math alphabet outside math mode. Since we now use the
%    |\sym...| switches the following setting is not longer necessary.
%    \begin{macrocode}
%\let\non@alpherr\@gobble
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\not@math@alphabet}
%    But we need to disable the error message that is generated from
%    |\bfseries| etc.
%    \begin{macrocode}
\let\not@math@alphabet\@gobbletwo
%    \end{macrocode}
%  \end{macro}
%
%
%    We left out the special \LaTeX{} fonts which are not automaticly
%    included in the base version of the font selection since these
%    fonts contain only a few characters which are also included in
%    the AMS fonts so anybody who is using these fonts doesn't need
%    them.  But for compatiblity reasons we will define these symbols.
%
%    \begin{macrocode}
\RequirePackage{latexsym}
%    \end{macrocode}
%
%
%    Below are the |\..pt| commands with hopefully the same
%    functionality as in the old \texttt{lfonts.tex}. Notice that the
%    |\baselineskip| parameter wasn't set by these commands so that
%    using them now shouldn't set this either. Thus we go low-level.
%    This means that the commands are now fragile but I think they
%    have been fragile before.
%    \begin{macrocode}
\newcommand\vpt   {\edef\f@size{\@vpt}\rm}
\newcommand\vipt  {\edef\f@size{\@vipt}\rm}
\newcommand\viipt {\edef\f@size{\@viipt}\rm}
\newcommand\viiipt{\edef\f@size{\@viiipt}\rm}
\newcommand\ixpt  {\edef\f@size{\@ixpt}\rm}
\newcommand\xpt   {\edef\f@size{\@xpt}\rm}
\newcommand\xipt  {\edef\f@size{\@xipt}\rm}
\newcommand\xiipt {\edef\f@size{\@xiipt}\rm}
\newcommand\xivpt {\edef\f@size{\@xivpt}\rm}
\newcommand\xviipt{\edef\f@size{\@xviipt}\rm}
\newcommand\xxpt  {\edef\f@size{\@xxpt}\rm}
\newcommand\xxvpt {\edef\f@size{\@xxvpt}\rm}
%</package>
%    \end{macrocode}
%
% \section{A driver for this document}
%
%    The next bit of code contains the documentation driver file for
%    \TeX{}, i.e., the file that will produce the documentation you
%    are currently reading. It will be extracted from this file by the
%    \dst{} program.
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}

\usepackage{oldlfont}

\DisableCrossrefs

%\OnlyDescription  % comment out for implementation details

\begin{document}
   \DocInput{oldlfont.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% \DeleteShortVerb{\|}
% \Finale
\endinput
