% \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
%
% \setcounter{StandardModuleDepth}{1}
% \newcommand\Lopt[1]{\textsf{#1}}
% \newcommand\file[1]{\texttt{#1}}
% \newcommand\Lcount[1]{\textsl{\small#1}}
% \newcommand\pstyle[1]{\textsl{#1}}
%
% \CheckSum{1228}
%
% \changes{v1.1}{93/12/18}{Changes to make it work with
%                           compatibility mode.}
% \changes{v1.1a}{93/12/19}{Removed float parms}
%
% \iffalse
% Copyright (C) 1993 LaTeX3 project, Frank Mittelbach
% and Rainer Sch\"opf, all rights reserved.
% \fi
%
% \author{Leslie Lamport and Frank Mittelbach and Rainer Sch\"opf}
%
% \title{Standard Letter Document Class for \LaTeX{} version 2e}
%
%
% \maketitle
% \tableofcontents
%
% \StopEventually
%
%
% \section{Identification}
%
%
%    These document classes can only be used with \LaTeXe, so we make
%    sure that an appropiate message is displayed when another \TeX{}
%    format is used.
%    \begin{macrocode}
%<*letter>
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
%
%    We store the date, version and name of this file in three control
%    sequences, fur future use.
%    \begin{macrocode}
\def\filedate{1993/12/20}
\def\docdate{1993/12/18}
\def\fileversion{1.1b}
\def\filename{letter.dtx}
%    \end{macrocode}
%
%    Announce the Class name and its version:
%    \begin{macrocode}
\ProvidesClass{letter}[\filedate\space Standard LaTeX2e document class]
%    \end{macrocode}
%
%     And display it on the terminal (and the transcript file):
%    \begin{macrocode}
\typeout{Standard Document Class `letter' <\filedate>.}
%    \end{macrocode}
%
%
% \section{Initial Code}
%
%    In this part we define a few comands that are used later on.
%
% \begin{macro}{\@ptsize}
%    This control sequence is used to store the second digit of the
%    pointsize we are typesetting in. So, normally, it's value is one
%    of 0, 1 or 2.
%    \begin{macrocode}
\newcommand\@ptsize{}
%    \end{macrocode}
% \end{macro}
%
%
%
% \subsection{Setting Paper Sizes}
%
%    The variables |\paperwidth| and |\paperheight| should reflect the
%    physical paper size after trimming. For desk printer output this
%    is usually the real paper size since there is no post-processing.
%    Classes for real book production will probably add other paper
%    sizes and additionally the production of crop marks for trimming.
% \changes{v1.0a}{1993/12/14}{Corrected typo, A4 is not 279 mm high}
%    \begin{macrocode}
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}}
\DeclareOption{a5paper}
   {\setlength\paperheight {210mm}%
    \setlength\paperwidth  {148mm}}
\DeclareOption{b5paper}
   {\setlength\paperheight {250mm}%
    \setlength\paperwidth  {176mm}}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{legalpaper}
   {\setlength\paperheight {14in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{executivepaper}
   {\setlength\paperheight {10.5in}%
    \setlength\paperwidth  {7.25in}}
%    \end{macrocode}
%
%
% \subsection{Choosing the type size}
%
%    The type size options are handled by defining |\@ptsize| to contain
%    the last digit of the size in question and branching on |\ifcase|
%    statements. This is done for historical reasons to stay compatible
%    with other packages that use the |\@ptsize| variable to select
%    special actions. It makes the declarations of size options less
%    than 10pt difficult, although one can probably use \texttt{9}
%    and \texttt{8} assuming that a class wont define both
%    \Lopt{8pt} and \Lopt{18pt} options.
%
%    \begin{macrocode}
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
%    \end{macrocode}
%
%
%  \subsection{Two-side or one-side printing}
%
%    Two-sided printing is not supported.
%    \begin{macrocode}
\DeclareOption{twoside}{\@latexerr{No 'twoside' layout for letters}%
                                   \@eha}
\@twosidefalse
%    \end{macrocode}
%
%
%  \subsection{Draft option}
%
%    If the user requests \Lopt{draft} we show any overfull boxes.
%    We could probably add some more interesting stuff to this option.
%    \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
%    \end{macrocode}
%
%  \subsection{Twocolumn printing}
%
%    Two-column and one-column printing is again realized via a switch.
%    \begin{macrocode}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
%    \end{macrocode}
%
%
%  \subsection{Equation numbering on the left}
%
%    The option \Lopt{leqno} can be used to get the equation numbers
%    on the left side of the equation.
%    \begin{macrocode}
\DeclareOption{leqno}{%
  \def\@eqnnum{\hbox to .01\p@{}\rlap{\reset@font\rmfamily
        \hskip -\displaywidth(\theequation)}}}
%    \end{macrocode}
%
%  \subsection{Flush left displays}
%
%    The option \Lopt{fleqn} redefines the displayed math environmens
%    in such a way that they come out flush left, with an indentation
%    of |\mathindent| from the prevailing left margin.
% \changes{v1.1}{93/12/18}{Corrected typo in \cmd{renewcomand},
%                          doubled hash marks.}
%    \begin{macrocode}
\DeclareOption{fleqn}{%
  \renewcommand{\[}{\relax
                   \ifmmode\@badmath
                   \else
                     \begin{trivlist}%
                       \@beginparpenalty\predisplaypenalty
                       \@endparpenalty\postdisplaypenalty
                       \item[]\leavevmode
                       \hbox to\linewidth\bgroup $\m@th\displaystyle %$
                         \hskip\mathindent\bgroup
                   \fi}
  \renewcommand{\]}{\relax
                   \ifmmode
                         \egroup $\hfil% $
                       \egroup
                     \end{trivlist}%
                   \else \@badmath
                   \fi}
  \renewenvironment{equation}%
      {\@beginparpenalty\predisplaypenalty
       \@endparpenalty\postdisplaypenalty
       \refstepcounter{equation}%
       \trivlist \item[]\leavevmode
         \hbox to\linewidth\bgroup $\m@th% $
           \displaystyle
           \hskip\mathindent}%
          {$\hfil % $
           \displaywidth\linewidth\hbox{\@eqnnum}%
         \egroup
       \endtrivlist}
  \renewenvironment{eqnarray}%
      {\stepcounter{equation}%
       \let\@currentlabel=\theequation
       \global\@eqnswtrue
       \global\@eqcnt\z@
       \tabskip\mathindente
       \let\\=\@eqncr
       \setlength\abovedisplayskip{\topsep}%
       \ifvmode
         \addtolength\abovedisplayskip{\partopsep}%
       \fi
       \setlength\belowdisplayskip{\abovedisplayskip}%
       \setlength\belowdisplayshortskip{\abovedisplayskip}%
       \setlength\abovedisplayshortskip{\abovedisplayskip}%
       $$\everycr{}\m@th\halign to\linewidth% $$
         \bgroup
           \@eqnsel
           \hskip\@centering
           $\displaystyle\tabskip\z@{####}$&%
           \global\@eqcnt\@ne\hskip2\arraycolsep\hfil${####}$\hfil&%
           \global\@eqcnt\tw@\hskip2\arraycolsep$\displaystyle{####}$%
               \hfil
               \tabskip\@centering&%
           \llap{####}\tabskip\z@\cr}%
      {\@@eqncr
         \egroup
       \global\advance\c@equation\m@ne$$% $$
       \global\@ignoretrue
      }
  \newdimen\mathindent
  \mathindent = \leftmargini
  }
%    \end{macrocode}
%
%
% \section{Executing Options}
%
%    Here we execute the default options to initialize certain
%    variables. Note that the document class `book' always uses two
%    sided printing.
%    \begin{macrocode}
\ExecuteOptions{letterpaper,10pt,onecolumn,final}
%    \end{macrocode}
%
%    The |\ProcessOptions| command causes the execution of the code
%    for every option \Lopt{FOO}
%    which is declared and for which the user typed
%    the \Lopt{FOO} option in his
%    |\documentclass| command.  For every option \Lopt{BAR} he typed,
%    which is not declared, the option is assumed to be a global option.
%    All options will be passed as document options to any
%    |\usepackage| command in the document preamble.
%    \begin{macrocode}
\ProcessOptions
%    \end{macrocode}
%    Now that all the options have been executed we can load the
%    chosen class option file that contains all size dependant code.
%    \begin{macrocode}
\input{size1\@ptsize.clo}
%    \end{macrocode}
%
%
%  \section{Loading Packages}
%
%  The standard class files do not load additional packages.
%
%
% \section{Document Layout}
% \label{sec:maincode}
%
%  In this section we are finally dealing with the nasty typographical
%  details.
%
% \subsection{Paragraphing}
%
% \begin{macro}{\lineskip}
% \begin{macro}{\normallineskip}
%    These parameters control \TeX's behaviour when two lines tend to
%    come too close together.
%    \begin{macrocode}
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\baselinestretch}
%    This is used as a multiplier for |\baselineskip|. The default is
%    to {\em not\/} stretch the baselines.
%    \begin{macrocode}
\renewcommand\baselinestretch{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\parskip}
% \begin{macro}{\parindent}
%    |\parskip| gives extra vertical space between paragraphs and
%    |\parindent| is the width of the paragraph indentation.
%    Letters are typeset without paragraph indentation.
%    \begin{macrocode}
\setlength\parskip{0.7em}
\setlength\parindent{0\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@lowpenalty}
% \begin{macro}{\@medpenalty}
% \begin{macro}{\@highpenalty}
%    The commands |\nopagebreak| and |\nolinebreak| put in penalties
%    to discourage these breaks at the point they are put in.
%    They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
%    dependant on their argument.
%    \begin{macrocode}
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\clubpenalty}
% \begin{macro}{\widowpenalty}
%    These penalties are use to discourrage club and widow lines.
%    Because we use their default values we only show them here,
%    commented out.
%    \begin{macrocode}
% \clubpenalty  150
% \widowpenalty 150
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\displaywidowpenalty}
% \begin{macro}{\predisplaypenalty}
% \begin{macro}{\postdisplaypenalty}
%    Discourrage (but not so much) widows in front of a math display
%    and forbid breaking directly in front of a display. Allow break
%    after a display without a penalty. Again the default values are
%    used, therefore we only show them here.
%    \begin{macrocode}
% \displaywidowpenalty 50
% \predisplaypenalty   10000
% \postdisplaypenalty  0
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\interlinepenalty}
%    Allow the breaking of a page in the middle of a paragraph.
%    \begin{macrocode}
% \interlinepenalty 0
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\brokenpenalty}
%    We allow the breaking of a page after a hyphenated line.
%    \begin{macrocode}
% \brokenpenalty 0
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Page Layout}
%
%    All margin dimensions are measured from a point one inch from the
%    top and lefthand side of the page.
%
% \subsubsection{Vertical spacing}
%
% \begin{macro}{\headheight}
% \begin{macro}{\headsep}
%    The |\headheight| is the height of the box that will contain the
%    running head. The |\headsep| is the distance between the bottom
%    of the running head and the top of the text. |\topskip| is the
%    |\baselineskip| for the first line on a page.
%    \begin{macrocode}
\setlength\headheight{12\p@}
\setlength\headsep   {45\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\footskip}
%    The distance from the baseline of the box which contains the
%    running footer to the baseline of last line of text is controlled
%    by the |\footskip|.
%    Bottom of page:
%    \begin{macrocode}
\setlength\footskip{25\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textwidth}
%    When we are in compatibility mode we have to make sure that the
%    dimensions of the printed area are not different from what the
%    user was used to see.
%
%    \begin{macrocode}
\setlength\textwidth{365\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textheight}
%    Now that we have computed the width of the text, we have to take
%    care of the height. The |\textheight| is the height of text
%    (including footnotes and figures, excluding running head and
%    foot).
%    \begin{macrocode}
\setlength\textheight{505\p@}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Margins}
%
% \begin{macro}{\oddsidemargin}
% \begin{macro}{\evensidemargin}
% \begin{macro}{\marginparwidth}
%    \begin{macrocode}
\setlength\oddsidemargin   {53\p@}
\setlength\evensidemargin  {53\p@}
\setlength\marginparwidth  {90\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\marginparsep}
% \begin{macro}{\marginparpush}
%    The horizontal space between the main text and marginal notes is
%    determined by |\marginparsep|, the minimum vertical separation
%    between two marginal notes is controlled by |\marginparpush|.
%    \begin{macrocode}
\setlength\marginparsep {11\p@}
\setlength\marginparpush{5\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\topmargin}
%    The |\topmargin| is the distance between the top of `the
%    printable area' --which is 1 inch below the top of the paper--
%    and the top of the box which contains the running head.
%
%    It can now be computed from the values set above.
%    \begin{macrocode}
\setlength\topmargin{27pt}
%    \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Footnotes}
%
% \begin{macro}{\footnotesep}
%    |\footnotesep| is the height of the strut placed at the beginning
%    of every footnote. It equals the  height of a normal
%    |\footnotesize| strut in this
%    class, thus no extra space occurs between footnotes.
%    \begin{macrocode}
\setlength\footnotesep{12\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footins}
%    |\skip\footins| is the space between the last line of the main
%    text and the top of the first footnote.
%    \begin{macrocode}
\setlength{\skip\footins}{10\p@ \@plus 2\p@ \@minus 4\p@}
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Page Styles}
%
% \begin{macro}{\@texttop}
%    The letter style sets |\@texttop| to |\vskip| 0pt plus .00006fil on
%    the first page of a letter, which centers a short letter on the
%    page. This fil value may have to be changed for other letterheads.
%    \begin{macrocode}
\def\@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
%    \end{macrocode}
% \end{macro}
%
%    The page style \pstyle{foo} is defined by defining the command
%    |\ps@foo|.   This command should make only local definitions.
%    There should be no stray spaces in the definition, since they
%    could lead to mysterious extra spaces in the output (well, that's
%    something that should be always avoided).
%
% \begin{macro}{\@evenhead}
% \begin{macro}{\@oddhead}
% \begin{macro}{\@evenfoot}
% \begin{macro}{\@oddfoot}
%    The |\ps@...| command defines the macros |\@oddhead|,
%    |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
%    heads and feet---e.g., |\@oddhead| is the macro to produce the
%    contents of the heading box for odd-numbered pages.  It is called
%    inside an |\hbox| of width |\textwidth|.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Marking conventions}
%
%    To make headings determined by the sectioning commands, the page
%    style defines the commands |\chaptermark|, |\sectionmark|,
%    \ldots, where |\chaptermark{|\meta{TEXT}|}| is called by
%    |\chapter| to set a mark, and so on.
%
%    The |\...mark| commands and the |\...head| macros are defined
%    with the help of the following macros.  (All the |\...mark|
%    commands should be initialized to no-ops.)
%
%    \LaTeX{} extends \TeX's |\mark| facility by producing two kinds
%    of marks, a `left' and a `right' mark, using the following
%    commands:
%    \begin{flushleft}
%     |\markboth{|\meta{LEFT}|}{|\meta{RIGHT}|}|: Adds both marks.
%
%     |\markright{|\meta{RIGHT}|}|: Adds a `right' mark.
%
%     |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
%                  or |\@evenfoot| macros, it gets the current `left'
%                  mark.  |\leftmark| works like \TeX's |\botmark|
%                  command.
%
%     |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
%                   or  |\@evenfoot| macros, it gets the current
%                   `right' mark. |\rightmark| works like \TeX's
%                   |\firstmark| command.
%    \end{flushleft}
%
%    The marking commands work reasonably well for right marks
%    `numbered within' left marks--e.g., the left mark is changed by a
%    |\chapter| command and the right mark is changed by a |\section|
%    command.  However, it does produce somewhat anomalous results if
%    two |\markboth|'s occur on the same page.
%
%
%    Commands like |\tableofcontents| that should set the marks in some
%    page styles use a |\@mkboth| command, which is |\let| by the
%    pagestyle command (|\ps@...|)  to |\markboth| for setting the
%    heading or to |\@gobbletwo| to do nothing.
%
%
%    \begin{macrocode}
% %%%\mark{{}{}}   % Initializes TeX's marks   <--- can vanish
%    \end{macrocode}
%
% \subsubsection{Defining the page styles}
% \label{sec:pagestyle}
%
%    The pagestyles \pstyle{empty} and \pstyle{plain} are defined in
%    \file{latex.tex}.
%
% \begin{macro}{\ps@headings}
%    The definition of the page style \pstyle{headings} has to be
%    different for two sided printing than it is for one sided
%    printing.
%
%    \begin{macrocode}
\def\ps@headings{%
%    \end{macrocode}
%    The running feet are empty in this page style, the even running
%    head is never used. The odd running head contains a short
%    information about this letter.
%    \begin{macrocode}
      \let\@oddfoot\@empty
      \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
                    \hfil \@date
                    \hfil \pagename{} \thepage}}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\ps@empty}
%    The definition of the page style \pstyle{empty} is simple:
%    No running head or foot at all.
%    \begin{macrocode}
\def\ps@empty{%
      \let\@oddfoot\@empty\let\@oddhead\@empty}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@firstpage}
%    The page style \pstyle{firstpage} puts the telephone number
%    in the proper place for the letterhead. It should be adapted
%    to site conventions. The size of the number is determined
%    depending on the main size.
%    \begin{macrocode}
\def\ps@firstpage{%
     \let\@oddhead\@empty
     \def\@oddfoot{\raisebox{-45\p@}[\z@]{%
        \hbox to\textwidth{\hspace*{100\p@}%
          \ifcase \@ptsize\relax
             \normalsize
          \or
             \small
          \or
             \footnotesize
          \fi
        \fromlocation \hfill \telephonenum}}\hss}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@plain}
%    The definition of the page style \pstyle{plain} is again simple.
%    \begin{macrocode}
\def\ps@plain{%
      \let\@oddhead\@empty
      \def\@oddfoot{\rmfamily\hfil\thepage\hfil}}
%    \end{macrocode}
% \end{macro}
%
%
%
% \section{Document Markup}
%
% \subsection{Global Declarations}
%
% The following declarations, shown with examples, give information
% about the sender:
% \begin{itemize}
%   \item |\name{Dr. L. User}| : to be used for the return address on
%          the envelope.
%   \item |\signature{Larry User}| : goes after the closing.
%   \item |\address{3245 Foo St.\\Gnu York}| : used as the return
%          address in the
%          letter and on the envelope.  If not declared, then an
%          institutional standard address is used.
%   \item |\location{Room 374}| : Acts as modifier to the standard
%          institutional address.
%   \item |\telephone{(415)123-4567}| : Just in case some style puts it
%          on the letter.
% \end{itemize}
%
% \begin{macro}{\name}
% \begin{macro}{\fromname}
%    \begin{macrocode}
\def\name#1{\def\fromname{#1}}
\def\fromname{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\signature}
% \begin{macro}{\fromsig}
%    \begin{macrocode}
\def\signature#1{\def\fromsig{#1}}
\def\fromsig{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\address}
% \begin{macro}{\fromaddress}
%    \begin{macrocode}
\long\def\address#1{\def\fromaddress{#1}}
\def\fromaddress{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\location}
% \begin{macro}{\fromlocation}
%    \begin{macrocode}
\def\location#1{\def\fromlocation{#1}}
\def\fromlocation{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\telephone}
% \begin{macro}{\telephonenum}
%    \begin{macrocode}
\def\telephone#1{\def\telephonenum{#1}}
\def\telephonenum{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\makelabels}
% The |\makelabels| declaration causes mailing labels to be made.  It
% must go before the |\begin{document}| command.
%    \begin{macrocode}
\def\makelabels{\@fileswtrue}
%    \end{macrocode}
% \end{macro}
%
% \subsection{The generic letter commands}
%
% \begin{macro}{\letter}
% \begin{macro}{\endletter}
%     The letter environment creates a new letter, starting from page 1.
%     (The first page is unnumbered.)  It has a single argument, which
%     is the adressee and his address, as in
%\begin{verbatim}
%  \begin{letter}{Sam Jones \\
%                 Institute for Retarded Study\\
%                 Princeton, N.J.}
%\end{verbatim}
%     Local declarations, such as |\address|, can follow the
%     |\begin{letter}|.
%    \begin{macrocode}
\long\def\letter#1{\newpage
  \c@page\@ne
  \interlinepenalty=200 % smaller than the TeXbook value
%    \end{macrocode}
%    The |\leavevmode| and |\ignorespaces| commands are there for
%    protecting against an empty argument.
%    \begin{macrocode}
  \@processto{\leavevmode\ignorespaces #1}}
%    \end{macrocode}
%    \begin{macrocode}
\def\endletter{\stopletter\@@par\pagebreak\@@par
  \if@filesw
    \begingroup
%      \def\protect{\string}
      \let\\=\relax
      \def\protect##1{\string##1\space}%
        \immediate\write\@auxout{\string\mlabel{\returnaddress}{\toname
           \\\toaddress}}%
    \endgroup
  \fi}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\@processto}
% \begin{macro}{\@xproc}
% \begin{macro}{\@yproc}
%    |\@processto| gets the |\toname| and |\toaddress| from the letter
%    environment's macro argument. |\@xproc| and |\@yproc| are auxiliary
%    macros.
%    \begin{macrocode}
\long\def\@processto#1{\@xproc #1\\@@@\ifx\toaddress\@empty
    \else \@yproc #1@@@\fi}
\long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
\long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \subsubsection{Page breaking control}
%
% \begin{macro}{\stopbreaks}
%    \begin{macrocode}
\def\stopbreaks{\interlinepenalty \@M
   \def\par{\@@par\nobreak}\let\\=\@nobreakcr
   \let\vspace\@nobreakvspace}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nobreakvspace}
% \begin{macro}{\nobreakvspacex}
% \begin{macro}{\nobreakcr}
%    \begin{macrocode}
\def\@nobreakvspace{\@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}

\def\@nobreakvspacex#1{\ifvmode\nobreak\vskip #1\relax\else
               \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}

\def\@nobreakcr{\vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\startbreaks}
%    \begin{macrocode}
\def\startbreaks{\let\\=\@normalcr
   \interlinepenalty 200\def\par{\@@par\penalty 200\relax}}
%    \end{macrocode}
% \end{macro}


%
% \begin{macro}{\longindentation}
%    \begin{macrocode}
\newdimen\longindentation
\longindentation=.5\textwidth
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\indentedwidth}
%    \begin{macrocode}
\newdimen\indentedwidth
\indentedwidth=\textwidth
\advance\indentedwidth -\longindentation
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\opening}
%     Text is begun with the |\opening| command, whose argument
%     generates the salutation, as in
%\begin{verbatim}
%      \opening{Dear Henry,}
%\end{verbatim}
%   This should produce everything up to and including the `Dear Henry,'
%    and a \par command that follows. Since there's a |\vfil| at the
%     bottom of every page, it can add vertical  fil  to position a
%     short letter. It should use the following commands:
%     \begin{itemize}
%       \item |\toname| : name part of 'to' address.
%                         Will be one line long.
%       \item |\toaddress| : address part of 'to' address.
%                            The lines separated by |\\|.
%       \item |\fromname| : name of sender.
%       \item |\fromaddress| : argument of current |\address|
%             declaration--
%                     null if none.  Should use standard institutional
%                     address if null.
%       \item |\fromlocation| : argument of current |\location|
%                      declaration--null if none.
%       \item |\telephonenum| : argument of current |\telephone|
%                      declaration--null if none.
%    \end{itemize}
%    \begin{macrocode}
\def\opening#1{\ifx\@empty\fromaddress
  \thispagestyle{firstpage}%
    {\raggedleft\@date\par}%
  \else  % home address
    \thispagestyle{empty}%
    {\raggedleft\begin{tabular}{l}\ignorespaces
      \fromaddress \\*[2\parskip]%
      \@date \end{tabular}\par}%
  \fi
  \vspace{2\parskip}%
  {\raggedright \toname \\ \toaddress \par}%
  \vspace{2\parskip}%
  #1\par\nobreak}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\closing}
%     The body of the letter follows, ended by a |\closing| command,
%     as in
%\begin{verbatim}
%            \closing{Yours truly,}
%\end{verbatim}
%     This commands generates the closing matter, and the signature.
%     An obvious thing to do is to use a |\parbox| for the closing
%     and the signature.  Should use the following:
%    \begin{itemize}
%      \item |\fromsig| : argument of current |\signature| declaration
%                   or, if null, the |\fromname|.
%      \item |\stopbreaks| : a macro that inhibits page breaking.
%    \end{itemize}
%    \begin{macrocode}
\long\def\closing#1{\par\nobreak\vspace{\parskip}%
  \stopbreaks
  \noindent
  \ifx\@empty\fromaddress\else
  \hspace*{\longindentation}\fi
  \parbox{\indentedwidth}{\raggedright
       \ignorespaces #1\\[6\medskipamount]%
       \ifx\@empty\fromsig
           \fromname
       \else \fromsig \fi\strut}%
   \par}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\smallskipamount}
% \begin{macro}{\mdeskipamount}
% \begin{macro}{\bigskipamount}
%   Of these three, only |\medskipmount| is actually used above.
%    \begin{macrocode}
%\smallskipamount=.5\parskip
\medskipamount=\parskip
%\bigskipamount=2\parskip
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cc}
% \begin{macro}{\encl}
% \begin{macro}{\ps}
%    After the |\closing| you can put arbitrary stuff, which is typeset
%    with zero |\parindent| and no page breaking.  Commands designed
%    for use after the closing are:
%    \begin{verbatim}
%  \cc{Tinker\\Evers\\Chance}
%\end{verbatim}
%    which produces:\\
%    \begin{tabular}{ll}
%        cc: & Tinker\\
%            & Evers\\
%            & Chance
%    \end{tabular}
%    Note the obvious use of |\parbox|.
%    \begin{macrocode}
\def\cc#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\reset@font\rm \ccname: }%
                       \ignorespaces #1\strut}\par}
%    \end{macrocode}
%\begin{verbatim}
%  \encl{Foo(2)\\Bar}
%\end{verbatim}
%    which produces:\\
%    \begin{tabular}{ll}
%        encl: & Foo(2)\\
%              & Bar
%    \end{tabular}
%    \begin{macrocode}
\def\encl#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\reset@font\rm \enclname: }%
                       \ignorespaces #1\strut}\par}
%    \end{macrocode}
%
%    The only thing |\ps| needs to do is call |\startbreaks|,
%        which allows page breaking again.
%    \begin{macrocode}
\def\ps{\par\startbreaks}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\stopletter}
%     The |\stopletter| command is called by |\endletter| to do the
%     following:
%    \begin{itemize}
%     \item Add any desired  fil  or other material at the end of the
%       letter.
%     \item Define |\returnaddress| to be the return address for the
%       mailing
%      label.  More precisely, it is the first argument of the |\mlabel|
%       command described below. It should be defined to null if the
%       return address doesn't appear on the labels.  Any command,
%       other than |\\|, that should not be expanded until the |\mlabel|
%       command is actually executed must be preceded by |\protect|.
%       Whenever possible, |\protect| commands in the definition of
%       |\returnaddress|---it's much more efficient that way.  In
%       particular, when the standard return address is used, you
%       should define |\returnaddress| to something like
%       |\protect\standardreturnaddress|.
%    \end{itemize}
%    \begin{macrocode}
\def\stopletter{}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Customizing the labels}
%
% Commands for generating the labels are put on the .AUX file, which is
% read in and processed by the |\end{document}| command.  You have to
% define the following two commands:
%    \begin{itemize}
%    \item
%    |\startlabels| : Should reset the page layout parameters if
%        necessary.
%    \item
%    |\mlabel{RETURN ADDRESS}{TO ADRESS}| : Command to generate a single
%        label.
%    \end{itemize}
%
% \begin{macro}{\returnaddress}
%    \begin{macrocode}
\def\returnaddress{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\labelcount}
%    \begin{macrocode}
\newcount\labelcount
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\startlabels}
% The following |\startlabels| command sets things up for producing
% labels in two columns of five 2" X 4-1/4" labels each, suitable
% for reproducing onto Avery brand number 5352 address labels.
%    \begin{macrocode}
\def\startlabels{\labelcount\z@
\pagestyle{empty}%
\let\@texttop\relax
\topmargin -50\p@
\headsep \z@
\oddsidemargin -35\p@
\evensidemargin -35\p@
\textheight 10in
\@colht\textheight  \@colroom\textheight \vsize\textheight
\textwidth 550\p@
\columnsep 25\p@
\ifcase \@ptsize\relax
  \normalsize
 \or
  \small
 \or
  \footnotesize
 \fi
\baselineskip \z@
\lineskip \z@
\boxmaxdepth \z@
\parindent \z@
\twocolumn\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\mlabels}
%    \begin{macrocode}
\def\mlabel#1#2{\setbox0\vbox{\parbox[b]{3.6in}%
                                        {\strut\ignorespaces #2}}%
         \vbox to 2in{\vss \box0 \vss}}
%    \end{macrocode}
% \end{macro}
%
%
% At the beginning of the document, we need to write
% |\startlabels| (if it's making one). Therefore
% we specify:
%    \begin{macrocode}
\AtBeginDocument{%
  \if@filesw\immediate\write\@mainaux{\string\startlabels}\fi}
%    \end{macrocode}
% Similarly, at the end of the document:
%    \begin{macrocode}
\AtEndDocument{%
  \if@filesw\immediate\write\@mainaux{\string\clearpage}\fi}
%    \end{macrocode}
%
% \subsection{Lists}
%
% \subsubsection{General List Parameters}
%
% The following commands are used to set the default values for the list
% environment's parameters. See the \LaTeX{} manual for an explanation
% of the meanings of the parameters.  Defaults for the list
% environment are set as follows.  First, |\rightmargin|,
% |\listparindent| and |\itemindent| are set to 0pt.  Then, for a Kth
% level list, the command |\@listK| is called, where `K' denotes `i',
% '`i', ... , `vi'.  (I.e., |\@listiii| is called for a third-level
% list.)  By convention, |\@listK| should set |\leftmargin| to
% |\leftmarginK|.
%
% \begin{macro}{\leftmargin}
% \begin{macro}{\leftmargini}
% \begin{macro}{\leftmarginii}
% \begin{macro}{\leftmarginiii}
% \begin{macro}{\leftmarginiv}
% \begin{macro}{\leftmarginv}
% \begin{macro}{\leftmarginvi}
% For efficiency, level-one list's values are defined at top level, and
% |\@listi| is defined to set only |\leftmargin|.
%    \begin{macrocode}
\setlength\leftmargini  {2.5em}
%    \end{macrocode}
%    The following three are calculated so  that they are larger than
%    the sum of |\labelsep| and the width of the default labels (which
%    are `(m)', `vii.' and `M.').
%    \begin{macrocode}
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\setlength\leftmarginv  {1em}
\setlength\leftmarginvi {1em}
%    \end{macrocode}
%    Here we set the top level leftmargin.
%    \begin{macrocode}
\setlength\leftmargin    {\leftmargini}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\labelsep}
% \begin{macro}{\labelwidth}
%    |\labelsep| is the distance between the label and the text of an
%    item; |\labelwidth| is the width of the label.
%    \begin{macrocode}
\setlength  \labelsep  {5\p@}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\partopsep}
%    When the user leaves a blank line before the environment an extra
%    vertical space of |\partopsep| is inserted, in addition to
%    |\parskip| and |\topsep|.
%    \begin{macrocode}
\setlength\partopsep{0\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@beginparpenalty}
% \begin{macro}{\@endparpenalty}
%    These penalties are inserted before and after a list or paragraph
%    environment. They are set to a bonus value to encourage page
%    breaking at these points.
% \begin{macro}{\@itempenalty}
%    This penalty is inserted between list items.
%    \begin{macrocode}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@listI}
% \begin{macro}{\@listi}
% |\@listI| defines top level and |\@listi| values of
% |\leftmargin|, |\parsep|, |\topsep|, and |\itemsep|
%
%    \begin{macrocode}
\def\@listI{\setlength\leftmargin{\leftmargini}
            \setlength\parsep {0\p@}%
            \setlength\topsep {.4em}%
            \setlength\itemsep{.4em}}
\let\@listi\@listI
%    \end{macrocode}
%    We have to initialise these parameters.
%    \begin{macrocode}
\@listi
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@listii}
% \begin{macro}{\@listiii}
% \begin{macro}{\@listiv}
% \begin{macro}{\@listv}
% \begin{macro}{\@listvi}
%    Here are the same macros for the higher level lists.
%    \begin{macrocode}
\def\@listii {\setlength  \leftmargin{\leftmarginii}%
              \setlength  \labelwidth{\leftmarginii}%
              \addtolength\labelwidth{-\labelsep}}
\def\@listiii{\setlength  \leftmargin{\leftmarginiii}%
              \setlength  \labelwidth{\leftmarginiii}%
              \addtolength\labelwidth{-\labelsep}%
              \setlength  \topsep    {.2em}%
              \setlength  \itemsep   {\topsep}}
\def\@listiv {\setlength  \leftmargin{\leftmarginiv}%
              \setlength  \labelwidth{\leftmarginiv}%
              \addtolength\labelwidth{-\labelsep}}
\def\@listv  {\setlength  \leftmargin{\leftmarginv}%
              \setlength  \labelwidth{\leftmarginv}%
              \addtolength\labelwidth{-\labelsep}}
\def\@listvi {\setlength  \leftmargin{\leftmarginvi}%
              \setlength  \labelwidth{\leftmarginvi}%
              \addtolength\labelwidth{-\labelsep}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Enumerate}
%
%    The enumerate environment uses  four counters: \Lcount{enumi},
%    \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
%    \Lcount{enumN} controls the numbering of the Nth level
%    enumeration.
%
% \begin{macro}{\theenumi}
% \begin{macro}{\theenumii}
% \begin{macro}{\theenumiii}
% \begin{macro}{\theenumiv}
%    The counters are already defined in \file{latex.tex}, but their
%    representation is changed here.
%
%    \begin{macrocode}
\renewcommand\theenumi{\arabic{enumi}}
\renewcommand\theenumii{\alph{enumii}}
\renewcommand\theenumiii{\roman{enumiii}}
\renewcommand\theenumiv{\Alph{enumiv}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\labelenumi}
% \begin{macro}{\labelenumii}
% \begin{macro}{\labelenumiii}
% \begin{macro}{\labelenumiv}
%    The label for each item is generated by the commands
%    |\labelenumi| ... |\labelenumiv|.
%    \begin{macrocode}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{(\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\p@enumii}
% \begin{macro}{\p@enumiii}
% \begin{macro}{\p@enumiv}
%    The expansion of |\p@enumN||\theenumN| defines the output of a
%    |\ref| command when referencing an item of the Nth level of an
%    enumerated list.
%    \begin{macrocode}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi(\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Itemize}
%
% \begin{macro}{\labelitemi}
% \begin{macro}{\labelitemii}
% \begin{macro}{\labelitemiii}
% \begin{macro}{\labelitemiv}
% Itemization is controlled by four commands: |\labelitemi|,
% |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define
% the labels of thevarious itemization levels: the symbols used are
% bullet, bold en-dash, asterisk and centred dot.
%
%    \begin{macrocode}
\newcommand\labelitemi{$\m@th\bullet$}
\newcommand\labelitemii{\bfseries --}
\newcommand\labelitemiiii{$\m@th\ast$}
\newcommand\labelitemiv{$\m@th\cdot$}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Description}
%
% \begin{macro}{\description}
% \begin{macro}{\descriptionlabel}
%    The description environment is defined here -- while the itemize
%    and enumerate environments are defined in \file{latex.tex}.
%
%    To change the formatting of the label, you must redefine
%    |\descriptionlabel|.
%
%    \begin{macrocode}
\newcommand\descriptionlabel[1]{\hspace\labelsep \bfseries #1}
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Defining new environments}
%

% \subsubsection{Verse}
%
% \begin{macro}{\verse}
%   The verse environment is defined by making clever use of the
%   list environment's parameters.  The user types |\\| to end a line.
%   This is implemented by |\let|'ing |\\| equal |\@centercr|.
%
%    \begin{macrocode}
\newenvironment{verse}
               {\let\\=\@centercr
                \list{}{\setlength\itemsep{\z@}%
                        \setlength\itemindent{-15\p@}%
                        \setlength\listparindent{\itemindent}%
                        \setlength\rightmargin{\leftmargin}%
                        \addtolength\leftmargin{15\p@}}%
                \item[]}
               {\endlist}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Quotation}
%
% \begin{macro}{\quotation}
%   The quotation environment is also defined by making clever use of
%   the list environment's parameters. The lines in the environment
%   are set smaller than |\textwidth|. The first line of a paragraph
%   inside this environment is indented.
%
%    \begin{macrocode}
\newenvironment{quotation}
               {\list{}{\setlength\listparindent{1.5em}%
                        \setlength\itemindent{\listparindent}%
                        \setlength\rightmargin{\leftmargin}}%
                \item[]}
               {\endlist}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Quote}
%
% \begin{macro}{\quote}
%   The quote environment is like the quotation environment except
%   that paragraphs are not indented.
%
%    \begin{macrocode}
\newenvironment{quote}
               {\list{}{\setlength\rightmargin{\leftmargin}}%
                \item[]}
               {\endlist}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Theorem}
%
%    This document class does not define it's own theorem environemts,
%    the defaults, supplied by \file{latex.tex} are available.
%

% \subsection{Setting parameters for existing environments}
%
% \subsubsection{Array and tabular}
%
% \begin{macro}{\arraycolsep}
%    The columns in an array environment are separated by
%    2|\arraycolsep|.
%    \begin{macrocode}
\setlength\arraycolsep{5\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tabcolsep}
%    The columns in an tabular environment are separated by
%    2|\tabcolsep|.
%    \begin{macrocode}
\setlength\tabcolsep{6\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\arrayrulewidth}
%    The width of rules in the array and tabular environments is given
%    by |\arrayrulewidth|.
%    \begin{macrocode}
\setlength\arrayrulewidth{.4\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\doublerulesep}
%    The space between adjacent rules in the array and tabular
%    environments is given by |\doublerulesep|.
%    \begin{macrocode}
\setlength\doublerulesep{2\p@}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Tabbing}
%
% \begin{macro}{\tabbingsep}
%    This controls the space that the |\'| command puts in. (See
%    \LaTeX{} manual for an explanation.)
%    \begin{macrocode}
\setlength\tabbingsep{\labelsep}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Minipage}
%
% \begin{macro}{\@minipagerestore}
%    The macro |\@minipagerestore| is called upon entry to a minipage
%    environment to set up things that are to be handled differently
%    inside a minipage environment. In the current styles, it does
%    nothing.
% \end{macro}
%
% \begin{macro}{\@mpfootins}
%    Minipages have their own footnotes; |\skip||\@mpfootins| plays
%    same r\^ole for footnotes in a minipage as |\skip||\footins| does
%    for ordinary footnotes.
%
%    \begin{macrocode}
\skip\@mpfootins = \skip\footins
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Framed boxes}
%
% \begin{macro}{\fboxsep}
%    The space left by |\fbox| and |\framebox| between the box and the
%    text in it.
% \begin{macro}{\fboxrule}
%    The width of the rules in the box made by |\fbox| and |\framebox|.
%    \begin{macrocode}
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Equation and eqnarray}
%
% \begin{macro}{\theequation}
%    The equation counter will be typeset using arabic numbers.
%    \begin{macrocode}
\renewcommand\theequation{\arabic{equation}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\jot}
%    |\jot| is the extra space added between lines of an eqnarray
%    environment. The default value is used.
%    \begin{macrocode}
% \setlength\jot{3pt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@eqnnum}
%    The macro |\@eqnnum| defines how equation numbers are to appear in
%    equations. Again the default is used.
%
%    \begin{macrocode}
% \def\@eqnnum{(\theequation)}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Font changing}
%
%    Here we supply the declarative font changing commands that were
%    common in \LaTeX\ version 2.09 and earlier. These commands work
%    in text mode \emph{and} in math mode. They are provided for
%    compatiblity, but one should start using the |\text...| and
%    |\math...| commands instead. These commands are redefined using
%    |\@renewfontswitch|, a comman with three arguments: the user
%    command to be defined; \LaTeX\ commands to execute in text mode
%    and \LaTeX\ commands to execute in math mode.
%
%  \begin{macro}{\rm}
%  \begin{macro}{\tt}
%  \begin{macro}{\sf}
% \changes{v1.1}{93/12/18}{Changed \cmd{@newfontswitch} to
%                          \cmd{@renewfontswitch}, removed switch.}
%    The commands to change the family.
% \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
%    \begin{macrocode}
\@renewfontswitch{\rm}{\normalfont\rmfamily}{\mathrm}
\@renewfontswitch{\sf}{\normalfont\sffamily}{\mathsf}
\@renewfontswitch{\tt}{\normalfont\ttfamily}{\mathtt}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
%  \begin{macro}{\bf}
%    The command to change to the bold series. One should use
%    |\mdseries| to explicitly switch back to medium series.
% \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
% \changes{v1.1}{93/12/18}{Changed \cmd{@newfontswitch} to
%                          \cmd{@renewfontswitch}, removed switch.}
%    \begin{macrocode}
\@renewfontswitch{\bf}{\normalfont\bfseries}{\mathbf}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\sl}
%  \begin{macro}{\it}
%  \begin{macro}{\sc}
%
%    And the commands to change the shape of the font. The slanted and
%    small caps shapes are not available by default as math alphabets,
%    so those changes do nothing in math mode. One should use
%    |\upshape| to explicitly change back to the upright shape.
% \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
% \changes{v1.1}{93/12/18}{Changed \cmd{@newfontswitch} to
%                          \cmd{@renewfontswitch}, removed switch.}
% \changes{v1.1b}{93/12/20}{Added forgotten re.}
%    \begin{macrocode}
\@renewfontswitch{\it}{\normalfont\itshape}{\mathit}
\@renewfontswitch{\sl}{\normalfont\slshape}{\relax}
\@renewfontswitch{\sc}{\normalfont\scshape}{\relax}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
% \begin{macro}{\cal}
% \changes{v1.0a}{1993/12/14}{Macro added}
% \begin{macro}{\mit}
% \changes{v1.0a}{1993/12/14}{Macro added}
%
%    The commands |\cal| and |\mit| should only be used in math mode,
%    outside math mode they have no effect. Currently the New Font
%    Selection Scheme defines these commands to generate warning
%    messages. Therefore we have to define them `by hand'.
%    \begin{macrocode}
\renewcommand{\cal}{\protect\pcal}
\newcommand{\pcal}{\@fontswitch{\relax}{\mathcal}}
\renewcommand{\mit}{\protect\pmit}
\newcommand{\pmit}{\@fontswitch{\relax}{\mathnormal}}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
% \subsection{Footnotes}
%
% \begin{macro}{\footnoterule}
%    Usually, footnotes are separated from the main body of the text
%    by a small rule. This rule is drawn by the macro |\footnoterule|.
%    We have to make sure that the rule takes no vertical space (see
%    \file{plain.tex}) so we compensate for the natural heigth of the
%    rule of 0.4pt by adding the right amount of vertical skip.
%
%    To prevent the rule from colliding with the footnote we first add
%    a little negative vertical skip, then we put the rule and make
%    sure we end up at the same point where we begun this operation.
%    \begin{macrocode}
\renewcommand\footnoterule{%
  \kern-\p@
  \hrule \@width .4\columnwidth
  \kern .6\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@footnote}
%    Footnotes are numbered within chapters in the report and book
%    document styles.
%    \begin{macrocode}
% \newcounter{footnote}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makefntext}
%    The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
%    to produce the actual footnote. The macro gets the text of the
%    footnote as its argument and should use |\@thefnmark| as the mark
%    of the footnote. The macro |\@makefntext|is called when
%    effectively inside a |\parbox| of width |\columnwidth| (i.e.,
%    with |\hsize| = |\columnwidth|).
%
%   An example of what can be achieved is given by the following piece
%   of \TeX\ code.
% \begin{verbatim}
%          \long\def\@makefntext#1{%
%             \@setpar{\@@par
%                      \@tempdima = \hsize
%                      \advance\@tempdima-10pt
%                      \parshape \@ne 10pt \@tempdima}%
%             \par
%             \parindent 1em\noindent
%             \hbox to \z@{\hss$\m@th^{\@thefnmark}$}#1}
% \end{verbatim}
%    The effect of this definition is that all lines of the footnote
%    are indented by 10pt, while the first line of a new paragraph is
%    indented by 1em. To change these dimensions, just substitute the
%    desired value for `10pt' (in both places) or `1em'.  The mark is
%    flushright against the footnote.
%
%    In these document classes we use a simpler macro, in which the
%    footnote text is set like an ordinary text paragraph, with no
%    indentation except on the first line of a paragraph, and the
%    first line of the footnote. Thus, all the macro must do is set
%    |\parindent| to the appropriate value for succeeding paragraphs
%    and put the proper indentation before the mark.
%
%    \begin{macrocode}
\long\def\@makefntext#1{%
    \noindent
    \hangindent 5\p@
    \hbox to5\p@{\hss$\m@th^{\@thefnmark}$}#1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makefnmark}
%    The footnote markers that are printed in the text to point to the
%    footnotes should be produced by the macro |\@makefnmark|. We use
%    the default definition for it.
%    \begin{macrocode}
%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Words}
%
% \begin{macro}{\ccname}
% \begin{macro}{\enclname}
% \begin{macro}{\pagename}
% \begin{macro}{\headtoname}
% This document class is for documents prepared in the English language.
% To prepare a version for another language, various English words must
% be replaced.  All the English words that require replacement are
% defined below in command names.
%
%    \begin{macrocode}
\newcommand\ccname{cc}
\newcommand\enclname{encl}
\newcommand\pagename{Page}
\newcommand\headtoname{To}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}

% \subsection{Date}
%
% \begin{macro}{\today}
%    This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
%    to provide the date of the \LaTeX-run.
%    \begin{macrocode}
\newcommand\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Two column mode}
%
% \begin{macro}{\columnsep}
%    This gives the distance between two columns in two column mode.
%    \begin{macrocode}
\setlength\columnsep{10\p@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\columnseprule}
%    This gives the width of the rule between two columns in two
%    column mode. We have no visible rule.
%    \begin{macrocode}
\setlength\columnseprule{0\p@}
%    \end{macrocode}
% \end{macro}
%
% \subsection{The page style}
%    We have \pstyle{plain} pages in this document class. by
%    default. We use arabic pagenumbers.
%    \begin{macrocode}
\pagestyle{plain}
\pagenumbering{arabic}
%    \end{macrocode}
%
% \subsection{Single or double sided printing}
%
%    We don't try to
%    make each page as long as all the others.
%    \begin{macrocode}
\raggedbottom
%    \end{macrocode}
%    We always start in one column mode.
%    \begin{macrocode}
\onecolumn
%    \end{macrocode}
%
% \subsection{Writing the .aux file}
%
%    Per default, we don't write the aux file (no mailing labels).
%    \begin{macrocode}
\@fileswfalse
%</letter>
%    \end{macrocode}
%
% \section{The documentation driver file}
%
%    We have our own document class to format the \LaTeXe
%    documentation.
% \changes{1.0.6}{1993/12/07}{Use class ltxdoc document class}
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
%    \end{macrocode}
%
%    We don't want everything to appear in the index
%    \begin{macrocode}
\DoNotIndex{\@M,\@badmath}
\DoNotIndex{\@centercr}
\DoNotIndex{\@empty,\@ignoretrue}
\DoNotIndex{\@ixpt}
\DoNotIndex{\@minus,\@ne,\@plus}
\DoNotIndex{\\,\addtolength}
\DoNotIndex{\advance,\Alph,\alph}
\DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
\DoNotIndex{\bullet}
\DoNotIndex{\cdot,\cr,\day,\DeclareOption}
\DoNotIndex{\def,\DocInput,\documentclass}
\DoNotIndex{\DoNotIndex,\egroup,\else,\endtrivlist}
\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
\DoNotIndex{\endlist,\everycr,\ExecuteOptions}
\DoNotIndex{\fi}
\DoNotIndex{\filedate,\filename,\fileversion}
\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
\DoNotIndex{\hsize,\hskip\hspace,\hss,\ifcase}
\DoNotIndex{\ifvmode,\ifnum,,\ifx,\input}
\DoNotIndex{\kern,\leavevmode,\let,\leftmark}
\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark}
\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
\DoNotIndex{\NeedsTeXFormat,\newdimen}
\DoNotIndex{\newpage,\nobreak,\noindent,\number}
\DoNotIndex{\or,\p@}
\DoNotIndex{\pagestyle,\par}
\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
\DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
%-----------------------------------------------------------------------
\DoNotIndex{\rightmargin,\rlap,\rmfamily,\roman}
\DoNotIndex{\roman,\setbox,\setcounter,\setlength}
\DoNotIndex{\skip,\slshape,\space}
\DoNotIndex{\trivlist,\typeout,\tw@}
\DoNotIndex{\vskip,\vspace,\year,\z@}
%    \end{macrocode}
%    We do want an index, using linenumbers
%    \begin{macrocode}
\EnableCrossrefs
%    \end{macrocode}
%    We also want the full details.
%    \begin{macrocode}
\begin{document}
\DocInput{letter.dtx}
\PrintIndex
% ^^A\PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
%
%
% \Finale
%
\endinput
^^A Local Variables:
^^A mode: latex
^^A End:

