% \iffalse meta-comment
%
% Copyright 1994 the LaTeX3 project and the individual authors.
% All rights reserved. For further copyright information see the file
% legal.txt, and any other copyright indicated in this file.
% 
% This file is part of the LaTeX2e system.
% ----------------------------------------
% 
%  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 bugs.txt.
% 
% 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 manifest.txt.
% 
% 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.2i}
\def\filedate{1994/05/19}
\def\docdate {1994/05/26}

% \CheckSum{107}
%% \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 `newlfont.dtx'.
%% Copyright (C) 1989-1994 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
%
% \fi
%
% \changes{v2.2a}{1994/01/17}{Added missing definitions to support
%                             newlfont in compat mode}
% \changes{v2.2b}{1994/01/27}{Removed if@compat test since
%           these settings need also be executed in 2e mode.}
% \changes{v2.2c}{1994/03/06}{Added def for `cal and `mit}
%
% \providecommand\dst{\expandafter{\normalfont\scshape docstrip}}
%
% \setcounter{StandardModuleDepth}{1}
%
% \title{The file \texttt{newlfont.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{newlfont.sty}}
%
% \author{Frank Mittelbach}
%
% \maketitle
%
% \section{Introduction}
%
%    This file contains the code for the \texttt{newlfont} package
%    which provides defines commands like |\rm| to behave as with
%    NFSS1, i.e., to change one font attribute without resetting the
%    other attributes.
%
% \StopEventually{}
%
%
% \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}

\DisableCrossrefs

%\OnlyDescription  % comment out for implementation details

\begin{document}
   \DocInput{newlfont.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% \section{The Code}
%
% As always we begin by identifying the latest version of this file
% in the \textsf{log} file.
% \changes{v2.2a}{1994/01/17}{Use only `wlog now}
%    \begin{macrocode}
%<*package>
\ProvidesPackage{newlfont}[\filedate\space\fileversion\space
                           Standard LaTeX2e package]
\wlog{Package: `newlfont'
 \fileversion\space <\filedate>  (FMi and RmS)}
\wlog{English Documentation
 \@spaces\@spaces\space <\docdate>  (FMi and RmS)}
%    \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 from NFSS1.
%
% \changes{v2.2g}{1994/05/11}{DPC Remove definitions of \cs{prm} etc.}
%    \begin{macrocode}
\let\rm\rmfamily
\let\sf\sffamily
\let\tt\ttfamily
\let\bf\bfseries
\let\sl\slshape
\let\sc\scshape
\let\it\itshape
%    \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 an upright or italic font.
% \changes{v2.2g}{1994/05/11}{DPC use \cs{DeclareProtectedCommand}}
% \changes{v2.2h}{1994/05/13}{DPC renamed to \cs{DeclareRobustCommand}}
%    \begin{macrocode}
\DeclareRobustCommand\em{%
  \@nomath\em
  \ifdim \fontdimen\@ne\font >\z@\upshape \else \itshape \fi}
%    \end{macrocode}
%
%    For compatibility with old sources we should define the following
%    commands although their use in new documents is discouraged.
%    \begin{macrocode}
\let\mediumseries\mdseries
\let\normalshape\upshape
%    \end{macrocode}
%
%    In case \texttt{newlfont} is used in compatibility mode, eg
%\begin{verbatim}
%  \documentstyle[newlfont]{article}
%\end{verbatim}
%    or with the \texttt{oldlfont} package already loaded
%    we have to undo a number of settings changed by the compatibility
%    mode for \LaTeX~2.09 documents.
%
%    |\@setfontsize| should not have a |\reset@font| included.
%    \begin{macrocode}
\def\@setfontsize#1#2#3{\@nomath#1%
    \ifx\protect\relax
      \let\@currsize#1%
    \fi
    \fontsize{#2}{#3}\selectfont}
%    \end{macrocode}
%    Math alphabet identifiers should have an argument.
% \changes{v2.2d}{1994/03/10}{Changed `begingroup/`endgroup to
%                             `bgroup/`egroup.}
% \changes{v2.2f}{1994/05/05}{Added saved versions of the
% math-groupers, CAR}
%    \begin{macrocode}
\let\math@bgroup\bgroup
\def\math@egroup#1{#1\egroup}
\let \@@math@bgroup \math@bgroup
\let \@@math@egroup \math@egroup
%    \end{macrocode}
%    Warn again, if text font commands are used in math.
%    (same macro as in \texttt{lfonts.dtx}).
% \changes{v2.2e}{1994/04/21}{Changed error message}
%    \begin{macrocode}
\def\not@math@alphabet#1#2{%
   \relax
   \ifmmode
     \@latex@error{Command \noexpand#1invalid in math mode}%
        {%
         Please 
         \ifx#2\relax
            define a new math alphabet^^J%
            if you want to use a special font in math mode%
          \else
            use the math alphabet #2instead of
            the #1command%
         \fi
         .
        }%
   \fi}
%    \end{macrocode}
%
%    In NFSS1 math alphabets had arguments so we have to change |\cal|
%    and |\mit| which by default are defined to behave like in
%    \LaTeX209.
%    \begin{macrocode}
\let\pcal\@undefined
\let\cal\mathcal
\let\pmit\@undefined
\let\mit\mathnormal
%    \end{macrocode}
%
%    The NFSS1 version of \texttt{newlfont} included the \LaTeX{}
%    symbols. And that is probably all there is.
%    \begin{macrocode}
\RequirePackage{latexsym}
%</package>
%    \end{macrocode}
%
%
% \Finale
\endinput
