% Prevent infinite loops
\def\LaTeXo{\LaTeX~2.09}
\let\Otemize =\itemize  
\let\Onumerate =\enumerate
\let\Oescription =\description
% Zero the vertical spacing parameters
\def\Nospacing{\itemsep=0pt\topsep=0pt\partopsep=0pt\parskip=0pt\parsep=0pt}
% Redefine the environments in terms of the original values
\newenvironment{Itemize}{\Otemize\Nospacing}{\endlist}
\newenvironment{Enumerate}{\Onumerate\Nospacing}{\endlist}
\newenvironment{Description}{\Oescription\Nospacing}{\endlist}

\makeatletter
\input b-conv.sty
\let\origverbatim\verbatim
\def\verbatim{\par\@verbatim\small
  \frenchspacing\@vobeyspaces\verbatim@start}
\makeatother

\def\AmS{{\protect\the\textfont2 A}\kern-.1667em\lower
         .5ex\hbox{\protect\the\textfont2 M}\kern
         -.125em{\protect\the\textfont2 S}}
\renewcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}

\renewcommand{\meta}[1]{$\langle$\itshape #1\/$\rangle$}
\renewcommand{\labelitemi}{{\bfseries --}}

\title{\LaTeXe{}, an overview}

\author[Michel Goossens]{Michel Goossens\\CN Division, CERN, CH1211
  Gen\\lq\nobreak{}eve 23, Switzerland\\ \texttt{goossens@cern.ch}}

\begin{Article} 

\begin{abstract}
This article gives an overview of the new or extended
user commands available with \LaTeXe, the new \LaTeX{} release,
compared to the previous version \LaTeXo.
After introducing the new preamble commands, 
the extensions for defining new commands and environments,
and handling length and boxes are discussed.
The new font selection commands are explained,
both for text and math, and it is shown how to
easily use different font families.
A list of supported class and package files is given
and new possibilities  for controlling page contents and floats
are discussed.
Most of this material is described in much greater detail
in \lq\lq\nobreak{}The \LaTeX{} Companion\rq\rq\nobreak{}~\cite{bib-Companion} and in the
second edition of the \LaTeX{} Reference Manual~\cite{bib-Lamport}.
\end{abstract}

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

\section{Why \LaTeXe?}

\LaTeX{} became generally available in 1986; its
popularity has increased ever since, and many 
extensions have been developed.
Unluckily, these extensions were included in incompatible
formats, \eg \lq\lq\nobreak{}standard\rq\rq\nobreak{} \LaTeX{} with and without \NFSS{}, 
\SliTeX, \AmSLaTeX, and so on.
From the \LaTeX{} source alone, it was difficult to determine
for which of these (or other) formats a document was composed
and, because different sites could have different configuration,
document portability was a problem.

Already in 1989 at the Stanford TUG Conference Frank Mittelbach
and Rainer Sch\"opf got together with Leslie Lamport to discuss these
(and other) topics and they published their ideas 
about possible ways to evolve \LaTeX{} in  
TUGBoat~\cite{Mittelbach:TB10-3-400-401,Mittelbach:TB11-3-337-345}.
This lead a few years later to the start of
the long-term \LaTeX3 project
\cite{Mittelbach:TB13-1-96-101,Rowley:TB13-3-390-391,%
      Mittelbach:TB13-4-510-515,Mittelbach:TTN3-1-7-11}.

However, to help end the confusion for the present 
\LaTeX{} users, after a meeting in Spring 1993 between Leslie Lamport
and Frank Mittelbach in Mainz, it was decided to release an upgraded
version of \LaTeX, called \LaTeXe{}, which was officially announced 
in August 1993 at the TUG Conference at Aston.

Its stated aims are:

\begin{Itemize}
\item bring all extensions back under a single format;
\item prevent proliferation of mutually incompatible 
      dialects of \LaTeXo{};
\item \NFSS{} becomes the \lq\lq\nobreak{}standard\rq\rq\nobreak{} font selection scheme;
\item make style files like \textsf{amstex}
      (formerly \AmSLaTeX{} format) or 
      \textsf{slides} (formerly \SliTeX{} format) 
      into extension packages, all using the same base format;
\item add a small number of often-requested features;
\item retain the \lq\lq\nobreak{}touch and feel\rq\rq\nobreak{}, or the \lq\lq\nobreak{}flavour\rq\rq\nobreak{} of \LaTeXo{}.
\end{Itemize}

The first beta version of \LaTeXe{} was released at the end of 1993,
while the first production release is foreseen for \lq\lq\nobreak{}Spring 1994\rq\rq\nobreak{}.
After that, twice a year (in \lq\lq\nobreak{}Spring\rq\rq\nobreak{} and \lq\lq\nobreak{}Autumn\rq\rq\nobreak{}) consolidation 
releases are planned, in order to keep all versions of the files in
synchronization. Bug reports are handled centrally by inviting the
users to fill out an electronic form, distributed with the \LaTeXe{}
distribution, and sending it via electronic mail to
\Lit{latex-bugs@rus.uni-stuttgart.de}.
Note that only bug reports referring to the last 
two releases will be considered.
You can also subscribe to the \LaTeXe{} discussion list
on \Lit{LATEX-2E@DHDURZ1.BITNET} and post questions (and answers)
to that list.

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

\section{Initial and preamble commands}

In this section commands which can only be used before
or in the preamble will be discussed.
The first two below can only appear \emph{before}
the  \Lcs{documentclass} command.

\subsection*{Initial commands}

\BDefCmo{NeedsTeXFormat}{format-name}{release-date}

This command, which is normally present in package and class files,
can also be useful in user documents to make sure that the file 
is run with \LaTeXe.
Users who try and run it with \LaTeXo{} or plain \TeX{} will get 
a reasonably clear error message.
An example is

\begin{verbatim}
\NeedsTeXFormat{LaTeX2e}[1994/02/01]
\end{verbatim}

If you want to make sure that your document can be processed at
another site, it could make sense that you include all packages 
and files that your document needs together with the main file.
\LaTeXe{} provides the following syntax to facilitate this

\begin{BDef}
\DefEm{filecontents}{file-name} \\
\qquad  \meta{file-contents} \\
\LEND{filecontents}
\end{BDef}

When your document file is run through \LaTeXe{} the body of each
\Lenv{filecontents} environment is written verbatim to a file
whose name is given as the argument \Larg{file-name}.
If a file with such a name already exists
in any of the directories \lq\lq\nobreak{}visible\rq\rq\nobreak{} to \TeX{} only an
informative message is given, the body of the environment is
by-passed, and the file is not replaced.

\subsection*{Preamble commands}

The next commands in the preamble are specifically designed to differentiate
\LaTeXe{} documents from those needing \LaTeXo{}.

\BDefComo{documentclass}{option-list}{class-name}{release-date}

This command or \lq\lq\nobreak{}declaration\rq\rq\nobreak{} replaces the
\LaTeXo{} command \Lcs{documentstyle}.

There must be exactly one \Lcs{documentclass} declaration in a document,
and it must come first (except for the \lq\lq\nobreak{}initial\rq\rq\nobreak{} commands described
above).


\noindent
\Larg{option-list}: list of options that each can
modify the formatting of
document elements defined in the \Larg{class-name} file
or in packages loaded with \Lcs{usepackage} declarations,
as described below.

\noindent
\Larg{class-name}: name of the class file (file extension \Lfn{cls}).

\noindent
\Larg{release-date} (optional) specifies release date of the
class file, using the format \Lit{YYYY/MM/DD}.
If a version of the class older than this date is found, 
a warning is issued.

\BDefComo{documentstyle}{option-list}{style-name}{release-date}

This command, which is supported for compatibility reasons, is
similar to \Lcs{documentclass}, but it loads a
\lq\lq\nobreak{}compatibility mode\rq\rq\nobreak{} which redefines certain commands to
act as they did in \LaTeXo{} and thus allows you to run your old files
unchanged through \LaTeXe.  Note, however, that in this mode, you
\emph{cannot} use any of the
\LaTeXe{} extensions described in this article.

You can define new or change existing  document elements
by loading package files with \Lcs{usepackage}, whose syntax is:

\BDefComo{usepackage}{option-list}{package-name}{release-date}

\noindent
\Larg{package-name}: name of the package (file extension \Lfn{sty});
a package can
\begin{Itemize}
  \item define new document elements;
  \item modify elements defined in the class file;
  \item extend the range of documents that can be processed.
\end{Itemize}

\noindent
\Larg{option-list}: list of options, each of which can modify 
the formatting of elements defined in the package.

\noindent
\Larg{release-date}: (optional) earliest desired release date 
of package file (see \Lcs{documentclass} command above).

Any number of\ \Lcs{usepackage} are allowed, but \LaTeXe{} makes sure
that each package is only loaded once.  
On top of processing the list of options specified in the
argument \Larg{option-list} on its \Lcs{usepackage} command,
each package also processes the option \Larg{option-list} on 
the \Lcs{documentclass} command.

\BDefC{listfiles}

To help you get an overview of the files 
read in by your document during processing, you can place a
\Lcs{listfiles} command in the preamble of your document.
This will display the list of all files used at the end of the run.

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

\subsection*{Example of document preambles}

The following preamble references the \Lclass{article} class
with the (global) options \Loption{twocolumn}
and \Loption{a4paper}, and loads the \Lpack{multicol} and \Lpack{babel}
packages,
the latter with the \Loption{german} and \Loption{french} options.
Other document parameters (\eg the \Lit{textheight}) can also be
specified.

\begin{verbatim}
  \documentclass[twocolumn,a4paper]{article}
  \usepackage{multicol}
  \usepackage[german,french]{babel}
  \addtolength{\textheight}{2cm}
  \begin{document}
      ...
  \end{document}
\end{verbatim}

The following shows three equivalent ways of specifying 
the loading of packages.

\begin{verbatim}
  \documentclass[german]{book}
  \usepackage[german]{babel}
  \usepackage[german]{varioref}
  \usepackage{multicol}
  \usepackage{epic}
\end{verbatim}

Somewhat less verbose is:

\begin{verbatim}
  \documentclass[german]{book}
  \usepackage[german]{babel,varioref}
  \usepackage{multicol,epic}
\end{verbatim}

With \Loption{german} as global option you can write:

\begin{verbatim}
  \documentclass[a4paper,german]{book}
  \usepackage{babel,varioref,multicol,epic}
\end{verbatim}


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

A complex document might look something like the following:

\begin{verbatim}
\NeedsTeXFormat{LaTeX2e}[1994/05/01]
\begin{filecontents}{varioref.sty} 
   ....           % Code for varioref package
\end{filecontents}
\listfiles        % print list of files referenced
\documentclass[a4paper,german]{book} % book class
\usepackage{varioref}
\begin{document}
%--------------------- front matter of document
\maketitle
\section*{...}    % e.g. section named "Preface"
\tableofcontents  % chapter with table of contents
\listoffigures    % chapter with list of figures
\listoftables     % chapter with list of tables
%--------------------- body of the document
\part{...}
\chapter{...}
   \section{...}
\chapter{...}
\part{...}
%--------------------- back matter of document
\appendix         
\chapter{...}     % chapters labelled appendix
\chapter{...}
\begin{thebibliography}  
  ...             % bibliography entries
\end{thebibliography}
\begin{theindex}         
  ...             % index entries
\end{theindex}
\end{document}
\end{verbatim}

Note that, to ensure that the recipient of the document can process
the file correctly, the code of the \Lpack{varioref}
package is shipped with the file inside a \Lenv{filecontents}
environment.

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

\section{Option processing}

Options that are specified in the \Larg{option-list} argument
of the \Lcs{documentclass} or \Lcs{usepackage} commands are
handled as follows:

\begin{Enumerate}
\item They are first divided into two types, \emph{local} and \emph{global}:
  \begin{Itemize}
    \item for a \emph{class}, the options from its \Lcs{documentclass} command are
      local and there are no global options;
    \item for a \emph{package}, the options from its \Lcs{usepackage} command are
      local but the options from the \Lcs{documentclass} command are global.
  \end{Itemize}
\item The local and global options that have been declared within the current
   class or package are processed first, normally
   in their order of declarations, thus 
   their order in \Larg{option-list} is irrelevant.
\item Any local options not declared in the current class or
   package are then processed.  For document classes, this usually
   means that they are ignored, except for this fact being recorded by
   adding the option to a list of \lq\lq\nobreak{}unused options\rq\rq\nobreak{}; they may, of
   course, be used later since they become global options for every
   package subsequently loaded. For packages, usually
   an error message is produced, giving the choice of retyping the
   option name in case it is incorrect.
\end{Enumerate}

Finally, when the \LBEG{document} command is reached \LaTeXe{} 
will produce a list of all global 
options not used by  the class or any package file, and issue 
a warning message for each.

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

\section{Defining new commands and environments}

This section and the following describe commands and environments
that are used inside the document body 
(\ie after the \LBEG{document}) command.
Let us first look at what is available for defining new 
commands and environments.

\subsection*{Defining commands}

Commands are defined or redefined in \LaTeX{} with:

\begin{BDef}
\Lcs{newcommand}\Largb{\bs{}mycom}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{newcommand}}\Largb{command definition}\\[1mm]
\Lcs{renewcommand}\Largb{\bs{}mycom}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{renewcommand}}\Largb{command definition}\\[1mm]
\Lcs{providecommand}\Largb{\bs{}mycom}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{providecommand}}\Largb{command definition}
\end{BDef} 

The first and second commands show enhancements with respect to 
\LaTeXo{} by providing
the possibility to have an \emph{optional} argument 
when (re)defining a user command.
If there is a second optional parameter to \Lcs{newcommand}, etc.,
then the command being defined has an optional parameter,
with \Larg{default} value if not specified
The last form is useful for general purpose files that are included in a
document and over which the user does not always have control
(\eg \BibTeX{} databases).
If \Lcs{mycom} is not yet defined, the \Lcs{providecommand} will act
as \Lcs{newcommand} and define it, otherwise the existing definition
is kept.

The number of arguments, which \emph{includes} the optional argument, 
is in the range \Lit{0\(\le\)\Larg{narg}\(\le\)9}.
If the command has no arguments, then
the \Lit{[0]} can be omitted.
Inside the \textit{command definition} part, the
arguments are referenced as \Lit{#1} to \Lit{#\Larg{narg}},
the optional argument, if present, being the first one.
 
For example, compare the following commands, with no, 
one mandatory, one optional, and one optional and one mandatory argument,
allowing the user more freedom in each case.
\begin{verbatim}
\newcommand{\seq}{x_{0},\ldots\,x_{n}}
\newcommand{\seqm}[1]{#1_{0},\ldots\,#1_{n}}
\newcommand{\seqo}[1][k]{x_{0},\ldots\,x_{#1}}
\newcommand{\seqom}[2][k]{#2_{0},\ldots\,#2_{#1}}
$$\seq\quad\seqm{z}$$
$$\seqo\quad\seqo[l]$$
$$\seqom{y}\quad\seqom[i]{q}$$
\end{verbatim}
This gives:
\newcommand{\seq}{x_{0},\ldots\,x_{n}}
\newcommand{\seqm}[1]{#1_{0},\ldots\,#1_{n}}
\newcommand{\seqo}[1][k]{x_{0},\ldots\,x_{#1}}
\newcommand{\seqom}[2][k]{#2_{0},\ldots\,#2_{#1}}
$$\seq\quad\seqm{z}$$
$$\seqo\quad\seqo[l]$$
$$\seqom{y}\quad\seqom[i]{q}$$
 
If a command should work both in math and in
text mode, special care should be taken in its definition.
In \LaTeXe{} you have the following command:

\BDefCm{ensuremath}{math code}

As its name implies \Lmcs{ensuremath} ensures that its argument is
always typeset in math mode by surrounding it if necessary with
\Lit{$} signs. 
For instance, the above can be rewritten as:
\begin{verbatim}
\renewcommand{\seq}{\ensuremath{x_{0},\ldots\,x_{n}}}
\renewcommand{\seqm}[1]{%
                  \ensuremath{#1_{0},\ldots\,#1_{n}}}
\seq,\quad\seqm{z} or $\seq,\quad\seqm{z}$
\end{verbatim}
\renewcommand{\seq}{\ensuremath{x_{0},\ldots\,x_{n}}}
\renewcommand{\seqm}[1]{\ensuremath{#1_{0},\ldots\,#1_{n}}}
\seq,\quad\seqm{z} or $\seq,\quad\seqm{z}$

\subsection*{Defining New Environments}

In \LaTeXo{}, environments are defined or redefined with the commands:

\begin{BDef}
\DefCmomm{newenvironment}{name}{narg}{begdef}{enddef}   \\
\DefCmomm{renewenvironment}{name}{narg}{begdef}{enddef} 
\end{BDef}

The number of arguments is in the range
\Lit{0\(\le\)\Larg{narg}\(\le\)9}; and, in
the case of no parameters, you can omit \Lit{[0]}.
Inside the definition part, \Larg{begdef}, these
parameters are referenced as \Lit{#1} to \Lit{#\Larg{narg}}.
If arguments are present, then
they are defined when \emph{entering} the environment
by specifying them on the command \verb=\begin{myenv}= as
shown below.
 
\begin{BDef}
\LBEG{myenv}\lcb\Larg{arg\(_1\)}\rcb\Lit{...}\lcb\Larg{arg\(_{\mathrm{k}}\)}\rcb
\end{BDef}
 
When \emph{exiting} an environment with the command \verb=\end{myenv}=
no parameters can be specified.
Moreover, the parameters specified with the
\verb=\begin{myenv}= command when entering the environment (see above)
are no longer available in the definition part
\Larg{enddef} where you define the actions which should
take place when leaving the \Larg{myenv} environment.

As with commands, in \LaTeXe{} you can now also define environments
with an optional (first) argument.

\begin{BDef}
\Lcs{newenvironment}\Largb{myenv}\Largs{narg}\Largs{default}\texttt{\%}\\
\phantom{\Lcs{newenvironment}}\Largb{begdef}\Largb{enddef}
\end{BDef}

The default for the optional argument is given between the second
pair of square brackets \Largs{default}.
Inside the \Larg{begdef} part, which is executed when
the environment \Larg{myenv} is entered, the optional argument
can be accessed with \Lit{#1},
while the mandatory arguments (when present) are addressed
as \Lit{#2} to \Lit{#\Larg{narg}}.
When the \Larg{myenv} environment is used without an
optional parameter, \Lit{#1} will contain the string specified
as \Largs{default}.
      
As an example, a variant,
\Lmenv{deflist}, of a \Lenv{description} environment
will be constructed.
The \Lmenv{deflist} environment behaves somewhat like a 
standard \LaTeX{} \Lenv{description} environment
if it is used without an optional argument.
If an optional argument is specified, then the width of the 
description label will be put equal to the width of the argument.
Thus, by specifying the widest entry in the list as
an optional argument, you ensure
that the description parts of all entries line up nicely.
     
The result below first shows the (default) behaviour of the 
\Lenv{deflist}
list and then what it looks like when using the optional argument.

\begin{verbatim}
\newenvironment{deflist}[1][\quad]%
 {\begin{list}{}{
  \renewcommand{\makelabel}[1]{\textbf{##1}\hfil}%
  \settowidth{\labelwidth}{\textbf{#1}}% 
  \setlength{\leftmargin}{\labelwidth+\labelsep}}}
 {\end{list}}
\begin{deflist}
\item[First] This is a short term.
\item[Long term] This is a long term.
\item[Even longer term] A very long term.
\end{deflist}
\begin{deflist}[Even longer term]
    .....  
\end{deflist}
\end{verbatim}

\newenvironment{deflist}[1][\quad]%
  {\begin{list}{}{%
   \renewcommand{\makelabel}[1]{\emph{##1}\hfil}%
   \settowidth{\labelwidth}{\emph{#1}}% 
   \setlength{\leftmargin}{\labelwidth+\labelsep}}}
  {\end{list}}
\begin{deflist}
\item[First] This is a short term.
\item[Long term] This is a long term.
\item[Even longer term] A very long term.
\end{deflist}
\begin{deflist}[Even longer term]
\item[First] This is a short term.
\item[Long term] This is a long term.
\item[Even longer term] A very long term.
\end{deflist}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
\section{Playing with lengths}

 
Lengths can be defined, set and changed by the following commands.

\begin{BDef}
\DefCm{newlength}{cmd} & \qquad \DefCmm{setlength}{cmd}{len}\\
\DefCmm{addtolength}{cmd}{len}\\
\DefCmm{settowidth}{cmd}{text} & \qquad\Lcs{width}\\
\DefCmm{settoheight}{cmd}{text}& \qquad\Lcs{height}\\
\DefCmm{settodepth}{cmd}{text} & \qquad\Lcs{depth} \\
                               & \qquad\Lcs{totalheight}
\end{BDef}

The new \Lcs{settoheight} and \Lcs{settodepth} commands,
in analogy with the \Lcs{settowidth} command, already
present in \LaTeXo{}, allow one to \lq\lq\nobreak{}measure\rq\rq\nobreak{} the height and
depth of some \TeX{} material.
The lengths \Lcs{width}, \Lcs{height}, \Lcs{depth}, and
\Lcs{totalheight} are also new in \LaTeXe{}, and can be used 
inside the box commands described in the next section.

For ease of reference an overview of \TeX{}\rq\nobreak{}s units of length is
given below.
 
\begin{center}
\small
\def\pip{\vrule height 4 true pt }
\begin{tabbing}
\Lit{dd}\  \= xxx \kill% \hspace{.68\linewidth} \= xxx \kill
\Lit{sp} \> scaled point (65536~sp = 1~pt) \TeX\rq\nobreak{}s smallest unit.     \\
\Lit{pt} \> point = \(\frac{1}{72.27}\)~in = 0.351~mm
         \` \hbox to 1 pt{\pip\hrulefill\pip}                        \\
\Lit{bp} \> big point (72~bp = 1~in), also PostScript point
         \` \hbox to 1 bp{\pip\hrulefill\pip}                        \\
\Lit{dd} \> Did\^ot point \( = \frac{1}{72}\) of a French inch,
                        \(= 0.376\)~mm
         \` \hbox to 1 dd{\pip\hrulefill\pip}                        \\
%
\Lit{mm} \> millimeter = 2.845~pt
         \` \hbox to 1 mm {\pip\hrulefill\pip}                       \\
%
\Lit{pc} \> pica = 12~pt = 4.218~mm
         \` \hbox to 1 pc{\pip\hrulefill\pip}                        \\
%
\Lit{cc} \> cicero = 12~dd = 4.531~mm
         \` \hbox to 1 cc{\pip\hrulefill\pip}                        \\
%
\Lit{cm} \> centimeter = 10~mm =2.371~pc
         \` \hbox to 1 cm{\pip\hrulefill\pip}                        \\
%
\Lit{in} \> inch = 25.4~mm = 72.27~pt = 6.022~pc
         \` \hbox to 1 in{\pip\hrulefill\pip}                        \\
%
\Lit{ex} \> height of a small \lq\lq\nobreak{}x\rq\rq\nobreak{} for the current font
         \` \hbox to 1 ex{\pip\hrulefill\pip}                        \\
%
\Lit{em} \> width of capital \lq\lq\nobreak{}M\rq\rq\nobreak{} in current font 
         \` \hbox to 1 em{\pip\hrulefill\pip}                        \\
%
\Lit{mu} \> math mode unit (18~mu = 1~em) 
         \` \hbox to .12em{\pip\hrulefill\pip}                       \\
%
\end{tabbing}
\end{center}

The following lines show how length commands are created,
defined, changed, and used. 
They work, most of the time, both for rigid and rubber lengths.

\begin{verbatim}
\newlength{\Mylen} Mylen = \the\Mylen 
\end{verbatim}

\newlength{\Mylen} Mylen = \the\Mylen 

\begin{verbatim}
\setlength{\Mylen}{10mm} Mylen = \the\Mylen       
\setlength{\Mylen}{5mm plus 1mm minus .5mm}
\par Mylen = \the\Mylen  % Use a rubber length
\end{verbatim}

\setlength{\Mylen}{10mm} Mylen = \the\Mylen       
\setlength{\Mylen}{5mm plus 1mm minus .5mm}
\par Mylen = \the\Mylen  % Use a rubber length
\begin{verbatim}
\setlength{\Mylen}{1em} One em is \the\Mylen;
\addtolength{\Mylen}{1pc} add one pica \the\Mylen.
\end{verbatim}

\setlength{\Mylen}{1em} One em is \the\Mylen;
\addtolength{\Mylen}{1pc} add one pica \the\Mylen.

\begin{verbatim}
\settowidth{\Mylen}{May} The width is \the\Mylen
\settowidth{\Mylen}{\Large May} and now \the\Mylen.

\settoheight{\Mylen}{May} The height is \the\Mylen
\settoheight{\Mylen}{\Large May} and now \the\Mylen.

\settodepth{\Mylen}{May} The depth is \the\Mylen
\settodepth{\Mylen}{\Large May} and now \the\Mylen.
\end{verbatim}

\settowidth{\Mylen}{May} The width is \the\Mylen
\settowidth{\Mylen}{\Large May} and now \the\Mylen.

\settoheight{\Mylen}{May} The height is \the\Mylen
\settoheight{\Mylen}{\Large May} and now \the\Mylen.

\settodepth{\Mylen}{May} The depth is \the\Mylen
\settodepth{\Mylen}{\Large May} and now \the\Mylen. 


\lq\lq\nobreak{}Rubber\rq\rq\nobreak{} (variable) lengths are very useful for placing information
on the page.

\begin{BDef}
  \Lmskip{fill}
\end{BDef}

This is a rubber length with a natural length of zero.
It can stretch to any positive value and its value should not be changed!
 
\BDefCm{stretch}{dec\_num}

This is a more useful rubber length, since
\Lmskip{fill} is equivalent to \Lit{\Lmcs{stretch}\lcb1\rcb}.
More generally, \Lit{\Lmcs{stretch}\lcb\Larg{dec\_num}\rcb} 
has a stretchability of \Larg{dec\_num} times \Lmskip{fill}.
It can be used to fine-tune the positioning of text horizontally or vertically.

Examples of the use of these stretchable lengths for controlling
the horizontal and vertical page layout are given below.

\begin{verbatim}
\newcommand{\HS}[1][1.]{\hspace{\stretch{#1}}}
\begin{center}
left \hfill                            right\\
left \HS[.5]\fbox{$\frac{1}{3}$}\hfill right\\
left \HS         middle \hfill         right\\
left \hrulefill\ middle \hrulefill\    right\\
left \dotfill\                         right\\
left \dotfill\ \HS[.5] \dotfill\       right\\
left \dotfill\ \HS     \dotfill\       right\\
left \dotfill\ \HS[2.] \dotfill\       right
\end{center}
\end{verbatim}
\newcommand{\HS}[1][1.]{\hspace{\stretch{#1}}}
\begin{center}
left \hfill                            right\\
left \HS[.5]\fbox{$\frac{1}{3}$}\hfill right\\
left \HS         middle \hfill         right\\
left \hrulefill\ middle \hrulefill\    right\\
left \dotfill\                         right\\
left \dotfill\ \HS[.5] \dotfill\       right\\
left \dotfill\ \HS     \dotfill\       right\\
left \dotfill\ \HS[2.] \dotfill\       right
\end{center}

\begin{verbatim}
\documentclass{article}
\usepackage{times}
\thispagestyle{empty}
\newcommand{\HRule}{\rule{\linewidth}{1mm}}
\setlength{\parindent}{0mm}
\setlength{\parskip}{0mm}
\begin{document}
  \vspace*{\stretch{1}}
  \HRule
  \begin{flushright}
    \Huge Geoffrey Chaucer\\[5mm]
          The Canterbury Tales
  \end{flushright}
  \HRule
  \vspace*{\stretch{2}}
  \begin{center}
    \Large\textsc{London 1400}
  \end{center}
\end{document}
\end{verbatim}

\begin{center}
\fbox{\epsfig{bbllx=90pt,bblly=160pt,bburx=520pt,bbury=720pt,%
        file=vspaceex.eps,height=9cm}}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
\subsection*{Page Markup---Several Kinds of Boxes}

Boxes are at the very heart of \TeX{}\rq\nobreak{}s basic typesetting paradigm,
and \LaTeX{} provides several commands which make it easy to make
use of this functionality.

\begin{BDef}
\DefCm{mbox}{text}\hspace*{1em}\DefCoom{makebox}{width}{pos}{text}  \\

\DefCm{fbox}{text}\hspace*{1em}\DefCoom{framebox}{width}{pos}{text} \\
\end{BDef}

In addition to centreing the text with positional argument \Lit{[c]}
(the default), you can position the text flush left (\Lit{[l]}) or
flush right (\Lit{[r]}).  \LaTeXe{} also offers you an \Lit{[s]}
specifier that will stretch your \Larg{text} from the left margin to
the right margin of the box provided it contains some stretchable
space.
As already mentioned in the previous section,
\LaTeXe{} also allows you to make use of four special length
parameters inside the
\Larg{width} argument of the box commands:
\Lmdim{width}, \Lmdim{height}, \Lmdim{depth}, and
\Lmdim{totalheight}. 
These parameters specify the natural size of the \Larg{text},
where \Lmdim{totalheight} is the sum of \Lmdim{height} and \Lmdim{depth}.

The examples below show how these various parameters are used
to control the layout in the box. Note that use is also
made of the \Lpack{calc} package, which allows arithmetic operations
in the arguments of the commands.

\begin{verbatim}
\framebox{A few words of advice}             \par
\framebox[\width + 6mm][s]{A few words of advice} 
\par  \framebox[1.5\width]{A few words of advice}   
\end{verbatim}

\framebox{A few words of advice}             \par
\framebox[\width + 6mm][s]{A few words of advice} 
\par  \framebox[1.5\width]{A few words of advice}   


\BDefComm{rule}{lift}{width}{total\_height}

Rules come in handy for controlling the height of a box.
Together with the new \LaTeX{} commands for measuring the 
height and depth of your boxes, they allow you to 
perform micro-typographic adjustments for tuning the
visual presentation of your document elements.

\begin{verbatim}
\newsavebox{\Maybox}\savebox{\Maybox}{\Large May}
\newlength{\Mdp}\settodepth{\Mdp}{\usebox{\Maybox}}
\newlength{\Mht}\settoheight{\Mht}{\usebox{\Maybox}}
\addtolength{\Mht}{\Mdp}

\framebox[1.6\width+1em][s]{\usebox{\Maybox}}
\quad
\framebox[1.6\width+1em][s]{\usebox{\Maybox}%
          \rule[-2\Mdp]{0mm}{2\Mht}}
\end{verbatim}

\newsavebox{\Maybox}\savebox{\Maybox}{\Large May}
\newlength{\Mdp}\settodepth{\Mdp}{\usebox{\Maybox}}
\newlength{\Mht}\settoheight{\Mht}{\usebox{\Maybox}}
\addtolength{\Mht}{\Mdp}

\framebox[1.6\width+1em][s]{\usebox{\Maybox}}
\quad
\framebox[1.6\width+1em][s]{\usebox{\Maybox}%
          \rule[-2\Mdp]{0mm}{2\Mht}}

Zero-width boxes are also useful in other circumstances.

\begin{verbatim}
\begin{center}
A centred sentence.\makebox[0cm][l]{$^{123}$}\\
Some more text in the middle.                 \\
\makebox[0cm][r]{$^{321}$}A centred sentence.\\
\end{center}
\noindent\makebox[0cm][r]{\(\Leftrightarrow\)}%
As seen in the margin of the current line, boxes 
with a vanishing width can stick out in the margin.
\end{verbatim}

\begin{center}
A centred sentence.\makebox[0cm][l]{$^{123}$}\\
Some more text in the middle.                 \\
\makebox[0cm][r]{$^{321}$}A centred sentence.\\
\end{center}
\noindent\makebox[0cm][r]{\(\Leftrightarrow\)}%
As seen in the margin of the current line, boxes 
with a vanishing width can stick out in the margin.

\subsection*{Moving boxes}

Boxes can be moved up or down by the command:

\BDefCmoom{raisebox}{lift}{depth}{height}{contents}
 
The simple example below shows its principle of use.

\begin{verbatim}
\begin{flushleft}
x111x \raisebox{-1ex}{downward} x222x     \\
x333x \raisebox{1ex}{upward} x444x        \\[1em]
x111x \raisebox{-1ex}[0cm][0cm]{downward} x222x\\
x333x \raisebox{1ex}[0cm]{upward} x444x
\end{flushleft}
\end{verbatim}
 
\begin{flushleft}
x111x \raisebox{-1ex}{downward} x222x     \\
x333x \raisebox{1ex}{upward} x444x        \\[1em]
x111x \raisebox{-1ex}[0cm][0cm]{downward} x222x\\
x333x \raisebox{1ex}[0cm]{upward} x444x
\end{flushleft}

A more useful example is the generation of text \lq\lq\nobreak{}between\rq\rq\nobreak{}
two rows in a table (by \lq\lq\nobreak{}hiding\rq\rq\nobreak{} the boxes\rq\nobreak{} content from
\TeX{}.)

\begin{verbatim}
\begin{center}
\begin{tabular}{|c|c|c|}               \hline
         & \multicolumn{2}{c|}{title}\\\cline{2-3}
\raisebox{1.5ex}[0cm][0cm]{100}
         & A         & B             \\\hline
20000000 & 10        & 10            \\\hline
\end{tabular}
\end{center}
\end{verbatim}

\begin{center}
\begin{tabular}{|c|c|c|}             \hline
         & \multicolumn{2}{c|}{title}\\\cline{2-3}
\raisebox{1.5ex}[0cm][0cm]{100}
         & A         & B           \\\hline
20000000 & 10        & 10          \\\hline
\end{tabular}
\end{center}

Finally, when your printer driver allows it, you can
rotate boxes.
In this case the use of the various
box dimension parameters becomes apparent.

\begin{verbatim}
\newcommand{\DoT}[1]{\begin{turn}{45}#1\end{turn}}
x1 \DoT{\fbox{Not so Good.}} x2 
\DoT{\raisebox{\depth}{\fbox{I like it.}}} x3
\DoT{\raisebox{-\height}{\fbox{Bad Choice.}}} x4
\end{verbatim}

\bigskip

\newcommand{\DoT}[1]{\begin{turn}{45}#1\end{turn}}
x1 \DoT{\fbox{Not so Good.}} x2 
\DoT{\raisebox{\depth}{\fbox{I like it.}}} x3
\DoT{\raisebox{-\height}{\fbox{Bad Choice.}}} x4

\subsection*{Placing parboxes and minipages}

In \LaTeXo{}, boxes which can contain more than one paragraph are defined
as follows. 
 
\begin{BDef}
\DefComm{parbox}{pos}{width}{text}  \\[1mm]
\DefEom{minipage}{pos}{width}        \\
\qquad\Larg{text}                    \\
\LmEND{minipage}                      
\end{BDef}

A simple example of its use is the following

\begin{verbatim}
\parbox{.3\linewidth}{This is the
 contents of the left-most parbox.}
\hfill Centerline \hfill
\parbox{.3\linewidth}{This is the right-most parbox.
 Note that the typeset text looks sloppy because 
 \LaTeX{} cannot nicely balance the material
 in these narrow columns.}
\end{verbatim}

\parbox{.3\linewidth}{This is the
 contents of the left-most parbox.}
\hfill Centerline \hfill
\parbox{.3\linewidth}{This is the
 right-most parbox.
 Note that the typeset
 text looks sloppy because \LaTeX{}
 cannot nicely balance the material
 in these narrow columns.}

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

\subsection*{Generalized parboxes and minipages}

Sometimes it is helpful to predefine the vertical dimension of a
paragraph box. For this \LaTeXe{} has additional optional
arguments for \Lmenv{minipage} and \Lmcs{parbox}.

\begin{BDef}
\DefCooom{parbox}{pos}{height}{inner-pos}{width}\Largb{text}  \\
\DefEooom{minipage}{pos}{height}{inner-pos}{width}\\
\qquad\Larg{text}\\
\LmEND{minipage}           
\end{BDef}

The \Larg{inner-pos} determines the position of \Larg{text} within
the box. It can be \Lit{t}, \Lit{c}, \Lit{b}, or \Lit{s}. If not
specified, the value of \Larg{pos} will be used. You can think of
\Larg{height} and \Larg{inner-pos} as the vertical equivalent of the
\Larg{width} and \Larg{pos} arguments of a \Lcs{makebox}. 
If you use the \Lit{s} position
the \Larg{text} will be vertically stretched to fill the given
\Larg{height}. 
Thus, in this case you are responsible for providing vertically
stretchable space if necessary  using, for example, \Lcs{vspace} 
or \Lcs{vfill} commands.

As with the other box commands you can use \Ldim{height},
\Ldim{totalheight}, and so on to refer to the natural dimensions of the
box when specifying the optional argument.

\begin{verbatim}
xx \fbox{\parbox[b][1.5\height][s]
         {30mm}{Some text on top. \par\vfill 
                In the middle. \par\vfill
                And a few lines on the
                bottom of the box.}}
   \fbox{\parbox[b][\height+\baselineskip][s]
         {30mm}{This time a few lines on the
                top of the box. But only one
                line \par\vfill down here.}} xx
\end{verbatim}

xx \fbox{\parbox[b][1.5\height][s]
         {30mm}{Some text on top. \par\vfill
                In the middle. \par\vfill
                And a few lines on the
                bottom of the box.}}
   \fbox{\parbox[b][\height+\baselineskip][s]
         {30mm}{This time a few lines on the
                top of the box. But only one
                line \par\vfill down here.}} xx

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

\subsection*{Manipulating Boxed Material}

Material can be typeset once and then stored inside a named box, so that its
contents can be retrieved later.
\LaTeX{} offers the following commands for dealing with this situation. 

\begin{BDef}
\DefCm{newsavebox}{cmd}                  & \quad declare box \\
\DefCmm{sbox}{cmd}{text}                 & \quad fill box    \\
\DefCmoom{savebox}{cmd}{width}{pos}{text}& \quad fill box    \\
\DefCm{usebox}{cmd}                      & \quad use contents\\[1mm]
\DefEm{lrbox}{cmd}                       & \quad fill box    \\
\qquad\Larg{text}  \\
\LmEND{lrbox}
\end{BDef}

Note that the environment \Lenv{lrbox} is an addition in \LaTeXe{}.
\Larg{cmd} should be a box register previously allocated with
\Lmcs{newsavebox}. 
The environment \Lmenv{lrbox} will save \Larg{text} in
this box for later use with \Lmcs{usebox}. Leading and trailing spaces
are ignored. Thus, \Lmenv{lrbox} is basically the environment form of 
\Lmcs{sbox}. You can make good use of this environment if you want to
save the body of some environment in a box for further processing. For
example, the following code defines the environment 
\Lmenv{fminipage}
that works like a \Lenv{minipage} but surrounds its body with a frame.
Note the use of the optional argument for controlling the width
of the boxed minipage, and the fact that
verbatim material can be used inside.
To be able to do the  arithmetic operations
you will also need to have the \Lpack{calc} package loaded.

\begin{verbatim}
\newsavebox{\fminibox}
\newlength{\fminilength}
\newenvironment{fminipage}
    [1][\linewidth]% default width is \linewidth
  {\setlength{\fminilength}%
        {#1-2\fboxsep-2\fboxrule}%
   \begin{lrbox}{\fminibox}%
   \begin{minipage}{\fminilength}}
  {\end{minipage}\end{lrbox}%
   \noindent\fbox{\usebox{\fminibox}}}
\end{verbatim}

\newsavebox{\fminibox}
\newlength{\fminilength}
\newenvironment{fminipage}
    [1][\linewidth]% default width is \linewidth
  {\setlength{\fminilength}%
        {#1-2\fboxsep-2\fboxrule}%
   \begin{lrbox}{\fminibox}%
   \begin{minipage}{\fminilength}}
  {\end{minipage}\end{lrbox}%
   \noindent\fbox{\usebox{\fminibox}}}

\begin{verbatim}
\begin{fminipage} 
  In this environment verbatim text like 
  \verb=\fminibox= can be used.
\end{fminipage}
\end{verbatim}

\begin{fminipage} 
  In this environment verbatim text like 
  \verb=\fminibox= can be used.
\end{fminipage}

\begin{verbatim}
\begin{fminipage}[.5\linewidth] 
  ....
\end{fminipage}
\end{verbatim}

\begin{fminipage}[.5\linewidth]
  In this environment verbatim text like 
  \verb=\fminibox= can be used.
\end{fminipage}

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

\subsection*{For hackers only: a list with two optional parameters}

What if we want to define a command or environment
with, \eg \emph{two} optional arguments?
Suppose we want a list where we are able to specify not only
the width of the label, but also whether the list should be \lq\lq\nobreak{}dense\rq\rq\nobreak{}
or not, \ie we want a syntax like:

\begin{verbatim}
\begin{Description}[<margin>][<style>]
\end{verbatim}

In this case we use a trick
(and the packages \Lmpack{calc} and \Lmpack{ifthen})
and introduce a multiple-step definition.
The example also shows how one can parameterize the various
typographic parameters for the
list so that they can be controlled more easily
(\eg the alignment of the label, its font, and the width of the margin).

\begin{verbatim}
\newcommand{\Descriptionlabel}[1]{%
       \mbox{\Descriptionfont #1}\hfil}

\newcommand\Descriptionfont{\itshape}
\newcommand\Descriptionmargin{}

\newenvironment{Description}[1][\kern\leftmargin]
 {\renewcommand\Descriptionmargin{#1}\xdescription}
 {\endlist}

\newcommand{\xdescription}[1][normal]{%
 \list{}{\settowidth{\labelwidth}%
  {\mbox{\Descriptionfont\Descriptionmargin}}%
  \setlength{\itemindent}{0pt}%
  \setlength{\leftmargin}{\labelwidth+\labelsep}%
  \let\makelabel\Descriptionlabel
  \ifthenelse{\equal{#1}{compact}}%
   {\setlength{\itemsep}{0pt}%
    \setlength{\topsep}{.5\topsep}}{}%
 }}
\end{verbatim}

\newcommand{\Descriptionlabel}[1]{%
       \mbox{\Descriptionfont #1}\hfil}

\newcommand\Descriptionfont{\itshape}
\newcommand\Descriptionmargin{}

\renewenvironment{Description}[1][\kern\leftmargin]
     {\renewcommand\Descriptionmargin{#1}%
      \xdescription
     }
     {\endlist}

\newcommand{\xdescription}[1][normal]
   {\list{}{\settowidth{\labelwidth}%
          {\mbox{\Descriptionfont\Descriptionmargin}}%
            \setlength{\itemindent}{0pt}%
            \setlength{\leftmargin}{\labelwidth+\labelsep}%
            \let\makelabel\Descriptionlabel
            \ifthenelse{\equal{#1}{compact}}%
             {\setlength{\itemsep}{0pt}%
              \setlength{\topsep}{.5\topsep}}{\itemsep2mm}%
            }}


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

\begin{verbatim}
Text before text before text before text before
\begin{Description}
  \item[First] This is the first item in the list.
  \item[Veryyy long] This is a veryyy long item.
  \item[] This is an empty item.
\end{Description}

\begin{Description}[Veryyy long]
  ...
\end{Description}

\begin{Description}[Veryyy long][compact] 
  ...
\end{Description}
\end{verbatim}

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

Text before text before text before text before
\begin{Description}
\item[First] This is the first item in the list.
\item[Veryyy long] This is a veryyy long item.
\item[] This is an empty item.
\end{Description}

\begin{Description}[Veryyy long]
\item[First] This is the first item in the list.
\item[Veryyy long] This is a veryyy long item.
\item[] This is an empty item.
\end{Description}

\begin{Description}[Veryyy long][compact]
\item[First] This is the first item in the list.
\item[Veryyy long] This is a veryyy long item.
\item[] This is an empty item.
\end{Description}

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


\section{Font commands---an overview}

This section covers the user commands in \LaTeXe{} for specifying
fonts, both in text as in mathematics.  We also mention some of the
more popular fonts packages and say a few words on compatibility with
\LaTeXo{}.

The first question you can naturally ask yourself is why 
new font commands were introduced at all.
To answer this question let us mention that \LaTeXo{} 
font commands had a few idiosyncrasies:
\begin{itemize}
\item their syntax, \ie \verb|{\it foo}| rather than \verb|\it{foo}|, which
      is unlike the syntax of (most) other \LaTeX{} commands
      (safe the size-changing series), which are specified with arguments;
\item the font commands were not \emph{orthogonal}, \eg
      \verb|\bf\sf| produces medium-weight sans, \ie only the inner
      font command is honoured;
\item some font substitutions were taking place \lq\lq\nobreak{}behind our backs\rq\rq\nobreak{},
      \eg \verb|\tiny\tt| produces tiny roman, since it was assumed that
      at such a small size the difference is hardly visible, so that
      one can as well use a font already loaded;
\item italic corrections must be introduced by hand, \eg 
      one has to write \verb|{\em my text\/}|, and even this is not
      correct in all circumstances.
\end{itemize}

\LaTeXe{} addresses these problems by introducing
the following new text font commands:
\begin{itemize}
\item[] \verb|\textmd{|\textmd{This is medium text}\verb|}|
\item[] \verb|\textbf{|\textbf{This is bold text}\verb|}|
\item[] \verb|\textup{|\textup{This is upright text\/}\verb|}|
\item[] \verb|\textit{|\textit{This is italic text\/}\verb|}|
\item[] \verb|\textsl{|\textsl{This is slanted text\/}\verb|}|
\item[] \verb|\textsc{|{T\footnotesize HIS IS SMALL CAPS TEXT}\verb|}|
\item[] \verb|\textrm{|\textrm{This is roman text}\verb|}|
\item[] \verb|\textsf{|\textsf{This is sans text}\verb|}|
\item[] \verb|\texttt{|\texttt{This is typewriter text}\verb|}|
\end{itemize}
Plus \verb|\emph{|\emph{This is emphasized text}\verb|}|.

The size changing commands remain unchanged (\ie \Lcs{large},
\Lcs{scriptsize}, \etc are still valid).

These commands do not have the problems of the \LaTeXo{} commands,
because:

\begin{itemize}
\item their syntax is the same as for the other \LaTeX{} commands;
\item \verb|\textbf{\textsf{|\textbf{\textsf{text}}\verb|}}| produces bold
      sans;
\item \verb|{\tiny\texttt{|{\tiny\texttt{text}}\verb|}}| produces tiny
      typewriter;
\item \verb|\emph{|\emph{text}\verb|}| does \emph{not} need \verb|\/|.
\end{itemize}
Note that there are still some restrictions, for instance,
\verb|\textbf{\texttt{|\texttt{text}\verb|}}| produces
medium typewriter for lack of a bold Computer Modern typewriter font,
but at least \LaTeXe{} warns you about the substitution.

In the area of math fonts,  
\LaTeXe{} provides the following new commands:

\begin{itemize}
\item[] \verb|\mathnormal{|$\mathnormal{This~is~normal~math~italic}$\verb|}|
\item[] \verb|\mathcal{|$\mathcal{MATH~CALLIGRAPHIC}$\verb|}|
\item[] \verb|\mathrm{|$\mathrm{This~is~roman~in~math}$\verb|}|
\item[] \verb|\mathbf{|$\mathbf{This~is~bold~in~math}$\verb|}|
\item[] \verb|\mathsf{|$\mathsf{This~is~sans~in~math}$\verb|}|
\item[] \verb|\mathit{|$\mathit{This~is~text~italic~in~math}$\verb|}|
\item[] \verb|\mathtt{|$\mathtt{This~is~typewriter~in~math}$\verb|}|
\end{itemize}

Note that these commands do not work outside mathematics.

It is now relatively easy (if you have the fonts) to
replace Computer Modern with other font families.
Various packages for popular fonts are already available, for example:
\begin{itemize}
\item In the area of PostScript fonts \verb|\usepackage{times}| provides Adobe Times, 
      \verb|\usepackage{palatino}|  Adobe Palatino, 
      \verb|\usepackage{lucidbrb}| Y\&Y\rq\nobreak{}s LucidaBright and
      LucidaNewMath, \etc;
\item \verb|\usepackage{amssymb}| provides the AMS fonts;
\item \verb|\usepackage{pandora}| allows you to use the Pandora fonts;
\item \verb|\usepackage{euler}| lets you experiment with Hermann
      Zapf\rq\nobreak{}s Euler font family.
\end{itemize}

\LaTeXo{}\rq\nobreak{}s old font commands (\Lcs{rm}, \Lcs{bf}, \etc) are still
available in \LaTeXe{}, but they are \emph{not} part of the \lq\lq\nobreak{}kernel\rq\rq\nobreak{}.
They are now defined in the document class files, where the definitions
of the size changing commands, like \Lcs{huge}, \Lcs{tiny}, have
always resided.
It is thus up to the document designer to define
how the old font commands behave.
Note, however, that for the \lq\lq\nobreak{}standard classes\rq\rq\nobreak{} 
(\Lclass{article}, \Lclass{book}, \etc)  the old
font commands behave as they did in \LaTeXo{}.

One more word about about \LaTeXo{} compatibility.
A document beginning with \Lcs{documentstyle} is run in
\emph{compatibility mode}, which emulates \LaTeX{} without NFSS.
If you want to emulate \LaTeX{} with NFSS you should say:
\begin{verbatim}
   \documentstyle[newlfont]{...}
\end{verbatim}

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

\section[]{Standard Classes in \LaTeXe}

This section discusses the files that come with the \LaTeXe{} distribution
and lists some of the packages which are already adapted to \LaTeXe{}.

Files associated to \LaTeXe{} are characterized by the extensions:
\begin{flushleft}
\textit{name}\texttt{.cls} for class files;\\
\textit{name}\texttt{.clo} for external option files;\\
\textit{name}\texttt{.sty} for package files\\
\textit{name}\texttt{.cfg} for runtime configuration files
\end{flushleft}

The \lq\lq\nobreak{}standard\rq\rq\nobreak{} document classes distributed with \LaTeXe{} are
\Lclass{article}, \Lclass{report}, \Lclass{book},  \Lclass{letter},
\Lclass{slide}, \Lclass{proc}, and \Lclass{ltxdoc}.
Below, we say a few words about each one of them.

\noindent\Lclass{article}, \Lclass{report}, \Lclass{book}
\begin{Itemize}
\item[--] they behave like the old \LaTeXo{} styles;
\item[--] \Loption{twocolumn} and \Loption{openbib} are now internal options;
\item[--] a set of new internal options was added:
          \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{letterpaper}, \Loption{legalpaper},
          \Loption{executivepaper}, \Loption{landscape}.
\end{Itemize}
\noindent \Lclass{letter}
\begin{Itemize}
\item[--] it behaves like the old style;
\item[--] it has a set of new internal  options:
          \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{letterpaper}, \Loption{legalpaper},
          \Loption{executivepaper}.
\end{Itemize}
\noindent \Lclass{slide}
\begin{Itemize}
\item[--] it behaves like the old style, but used with \LaTeXe;
\item[--] it supports local font configuration by looking for
          \texttt{sfonts.cfg};
\item[--] it has a set of new internal options:
          \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{letterpaper}, \Loption{legalpaper},
          \Loption{executivepaper}, \Loption{landscape};
\item[--] the option \Loption{twocolumn} is not supported.
\end{Itemize}
\noindent \Lclass{proc}
\begin{Itemize}
\item[--] it is no longer an option but a \emph{document class};
\item[--] it is built on the \Lclass{article} class;
\item[--] it disallows options \Loption{a5paper}, \Loption{b5paper}, 
          \Loption{onecolumn}, \Loption{titlepage}.
\end{Itemize}
\noindent \Lclass{ltxdoc}
\begin{Itemize}
\item[--] it is used to format the \LaTeXe\ source code;
\item[--] it is built on \Lclass{article} and requires the \Lpack{doc} package;
\item[--] it looks for the configuration file \texttt{ltxdoc.cfg};
\item[--] it defines the commands \Lcs{DocInclude} and \Lcs{GetFileInfo};
\item[--] it disallows the option \Loption{a5paper}.
\end{Itemize}

Presently the following packages are available:
\begin{Itemize}
  \item \Lpack{ifthen}, for building control structures.
         It provides on top of 
        \Lcs{ifthenelse} and \Lcs{whiledo} available previously with
        \LaTeXo{}, the new
        commands \Lcs{newboolean}, \Lcs{setboolean}, and \Lcs{boolean}.
  \item \Lpack{makeidx}, \Lpack{showidx},
        to help you make indexes.
  \item \Lpack{doc}, \Lpack{shortvrb}, for generating class and
        package file documentation.
  \item \Lpack{oldlfont}, \Lpack{newlfont}, for compatibility with
        \LaTeXo{} and version 1 of the NFSS.
  \item \Lpack{latexsym}
         \LaTeXe\ no longer loads the \texttt{lasy} fonts by default;
         if needed they become available by loading this package.
         Note that they are not necessary when either \Lpack{amsfonts} or
         \Lpack{amssymb} is used.
  \item \Lpack{exscale} allows for different math extension fonts.
  \item \Lpack{eufrak} and \Lpack{euscript} give access to the Euler
        fraktur and script alphabets, \Lpack{oldgerm} to Haralambous\rq\nobreak{}
        beautiful old German fonts, while \Lpack{pandora} allows you to
        use Billawala\rq\nobreak{}s Pandora font family.
  \item \Lpack{syntonly} will make \LaTeX{} only check the syntax of
        your document, while \Lpack{tracefnt}, with its various options
        \Loption{errorshow}, \Loption{warningshow}, \Loption{infoshow},
        and \Loption{debugshow}, allows you to trace NFSS as \LaTeX{}
        processes your document.
  \item \Lpack{varioref}
        provides a way to automatically adapt the text of
        a reference, depending on the position of the \Lcs{label}.
\end{Itemize}

Many other packages on CTAN already work with \LaTeXe{} 
or will soon be converted. In the first category  one finds 
\Lpack{a4}, \Lpack{epsfig}, \Lpack{exams}, \Lpack{labels},
\Lpack{layout}, the NTG document class family \Lclass{artikel1}, \Lclass{rapport3},
\etc, \Lpack{subeqnarray}, \Lpack{psnfss}, \Lpack{textfit}, while the
latter contains the \Lpack{babel} collection,
\Lpack{changebar}, \Lclass{ltugboat} and friends,
the \lq\lq\nobreak{}Mainz\rq\rq\nobreak{} packages \Lpack{array}, \Lpack{ftnright},
\Lpack{multicol}, \Lpack{theorem}, \Lpack{verbatim}, and \Lpack{supertabular}.

\section{Miscellaneous goodies}

This section describes some features which are perhaps not used every
day, but which can come in handy for solving certain practical
document preparation problems.

\subsection{Controlling page breaks}

Sometimes, when preparing the \emph{final} version of your document,
you might need to help \LaTeX\ break the pages in a suitable way. 
\LaTeXo{} had commands like \Lcs{clearpage}, \Lcs{samepage}, \etc,
while \LaTeXe\ provides, in addition, commands which increase or
decrease the height of the \emph{current} page from its \lq\lq\nobreak{}natural\rq\rq\nobreak{} height
\Lcs{textheight} by an amount \Larg{size}.

\begin{BDef}
\DefCm{enlargethispage}{size} \\
\DefCm{enlargethispage*}{size}
\end{BDef}

For example,
\verb!\enlargethispage{-\baselineskip}}! decreases the length
of the current page by one line, while 
\verb!\enlargethispage*{2\baselineskip}}! makes it two lines longer
than usual.

The starred form also shrinks any vertical white space on the page as
much as possible, so as to fit the maximum amount of text onto the
page.

\subsection{Floats}

A new command and a new \lq\lq\nobreak{}float specifier\rq\rq\nobreak{} will allow you more 
control over \LaTeX\rq\nobreak{}s float placement algorithm.

\BDefCo{suppressfloats}{placement}

This command stops any further floating environments from being placed
on the current page. 
The optional argument \Larg{placement} can be either
\Lit{t} or \Lit{b} (not both), and in this case the restriction applies only to putting
further floats at the top or at the bottom.

\begin{BDef}
Extra float placement specifier: \ \texttt{!}
\end{BDef}

This can be used, along with at least one of \texttt{h}, \texttt{t},
\texttt{b} and \texttt{p}, in the float placement optional argument.

If a \texttt{!} is present then, just for this particular float,
whenever it is processed by the float mechanism the following are
ignored:
\begin{itemize}
\item  all restrictions on the number of floats which can appear;
\item all explicit restrictions on the amount of space on a text page
which may be occupied by floats or must be occupied by text.
\end{itemize}
The mechanism will, however, still attempt to ensure that pages are
not overfull and that floats of the same type are printed in the
correct order.

Note that its presence has no effect on the production of float pages.

A \texttt{!} placement specifier overrides the effect of any \Lcs{suppressfloats}
command for this particular float.

\section*{Bibliography}

\begin{thebibliography}{1}
\bibitem{bib-Companion}
Michel Goossens, Frank Mittelbach and Alexander Samarin.
\newblock \emph{The \LaTeX{} Companion}.
\newblock Addison-Wesley, Reading, USA, 1994.

\bibitem{bib-Lamport}
Leslie Lamport.
\newblock {\em {\LaTeX}---A Document Preparation System.
          Second edition}
\newblock Addison-Wesley, Reading, USA, 1994.

\bibitem{Mittelbach:TB10-3-400-401}
Frank Mittelbach and Rainer Sch{\"{o}}pf.
\newblock Towards \LaTeX{} 2.10.
\newblock {\em TUGBoat}, 10(3):400--401, November 1990.

\bibitem{Mittelbach:TB11-3-337-345}
Frank Mittelbach.
\newblock {{E-\TeX: Guidelines for future \TeX{} extensions}}.
\newblock {\em TUGBoat}, 11(3):337--345, September 1990.

\bibitem{Mittelbach:TB13-1-96-101}
Frank Mittelbach and Chris Rowley,
\newblock \LaTeXo{} $\hookrightarrow$ \LaTeX3.
\newblock {\em TUGBoat}, 13(1):96-101, April 1992.

\bibitem{Rowley:TB13-3-390-391}
Chris Rowley.
\newblock \LaTeX3 update.
\newblock {\em TUGBoat}, 13(3):390-391, October 1992.

\bibitem{Mittelbach:TB13-4-510-515}
Frank Mittelbach and Chris Rowley and Michael Downes.
Volunteer work for the \LaTeX3 project.
\newblock {\em TUGBoat}, 13(4):510-515, December 1992.

\bibitem{Mittelbach:TTN3-1-7-11}
Frank Mittelbach and Chris Rowley.
\newblock Volunteer work for the \LaTeX3 project.
\newblock {\em \TeX{} and TUG NEWS}, 3(1):7-11, January 1994.

\end{thebibliography}

\end{Article} 

\endinput


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

\begin{Slide}{Making Your Own Lists}
 
Format of generic \Lenv{list} environment:
 
\begin{BDef}
  \DefEmm{list}{default\_label}{decls}\\ \quad \Larg{item\_list}\\ 
  \LEND{list}
\end{BDef}
 
\Larg{default\_label} text for label when \Lcs{item} command
issued without optional argument.

\Larg{decls} modify geometrical parameters of 
\Lenv{list} environment


Several \LaTeX{} environments use \Lenv{list} (e.g., \Lenv{quote},
\Lenv{quotation}, \Lenv{center}, \Lenv{flushleft}, and
\Lenv{flushright}).  They have only one item, and the
\Lit{\Lcs{item}[]} command is specified in the environment definition.

\end{Slide}

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

\begin{slide}
\footnotesize
\setlength{\unitlength}{.29mm}
\hspace*{14mm}\begin{picture}(240,250)(0,10)
% =====================  Following text  ========================
\put(0,30){\line(0,-1){20}\line(1,0){240}}
\put(240,10){\line(0,1){20}}
\put(120,20){\makebox(0,0){\emph{Text following list}}}
\put(120,45){\vector(0,-1){15}\vector(0,1){15}
             \makebox(0,0)[l]{\ttfamily\bs topsep + \bs parskip
             [+ \bs partopsep]}}
% =========================  Item 2  ============================
\put(210,90){\line(0,-1){30}\line(-1,0){120}}
\put(90,80){\line(0,1){10}\line(-1,0){20}}
\put(70,60){\line(0,1){20}\line(1,0){140}}
\put(128,75){\makebox(0,0)[l]{\emph{Item 2}}}
\put(10,80){\framebox(45,10){\emph{Label}}}
\put(120,100){\vector(0,-1){10}\vector(0,1){10}
             \makebox(0,0)[l]{\ttfamily\bs itemsep + \bs parsep}}
% ====================  Item 1 Paragraph 2  =====================
\put(70,110){\line(0,1){20}\line(1,0){140}}
\put(100,130){\line(0,1){10}\line(-1,0){30}}
\put(210,140){\line(0,-1){30}\line(-1,0){110}}
\put(128,134){\makebox(0,0)[l]{\emph{Item 1}}}
\put(128,117){\makebox(0,0)[l]{\emph{Paragraph 2}}}
\put(120,150){\vector(0,-1){10}\vector(0,1){10}
             \makebox(0,0)[l]{\ttfamily\bs parsep}}
\put(85,140){\vector(-1,0){15}\vector(1,0){30}}
\put(85,145){\makebox(0,0)[b]{\ttfamily\bs listparindent}}
% ====================  Item 1 Paragraph 1  =====================
\put(210,210){\line(0,-1){50}\line(-1,0){120}}
\put(90,200){\line(0,1){10}\line(-1,0){20}}
\put(70,160){\line(0,1){40}\line(1,0){140}}
\put(128,195){\makebox(0,0)[l]{\emph{Item 1}}}
\put(128,175){\makebox(0,0)[l]{\emph{Paragraph 1}}}
\put(35,175){\makebox(0,0)[t]{\rule{0mm}{4mm}\ttfamily\bs leftmargin}}
\put(35,175){\vector(1,0){35}\vector(-1,0){70}}
\put(10,200){\framebox(45,10){\emph{Label}}}
\put(33,196){\makebox(0,0)[t]{\rule{0mm}{4mm}\ttfamily\bs labelwidth}}
\put(33,196){\vector(1,0){22}\vector(-1,0){45}}% for \labelwidth
\put(95,197){\makebox(0,0)[t]{\rule{0mm}{4mm}\ttfamily\bs itemindent}}
\put(80,196){\vector(1,0){10}\vector(-1,0){20}}% for \itemindent
\put(80,210){\vector(1,0){10}\vector(-1,0){35}}% for \labelsep
\put(73,215){\makebox(0,0)[b]{\rule[-2mm]{0mm}{5mm}\ttfamily\bs labelsep}}
\put(225,210){\vector(1,0){15}\vector(-1,0){30}}
\put(210,206){\makebox(0,0)[l]{\ttfamily\bs rightmargin}}
\put(120,225){\vector(0,-1){15}\vector(0,1){15}
             \makebox(0,0)[l]{\ttfamily\bs topsep + \bs parskip
             [+ \bs partopsep]}}
% =====================  Preceding text  ========================
\put(0,240){\line(0,1){20}\line(1,0){240}}
\put(240,240){\line(0,1){20}}
\put(120,250){\makebox(0,0){\emph{Text preceding list}}}
\end{picture}

\end{slide}

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

\newcommand\showlen[1]{\makebox[#1]%
  {\rule{.5pt}{2mm}\hrulefill\rule{.5pt}{2mm}}} \tabcolsep1mm
\newcommand{\SHOWDIMS}%
{{\ttfamily \begin{tabular}{@{}lrl@{}} \bs leftmargin& \Leftmargin &
\showlen{\leftmargin}\\ \bs itemindent& \Itemindent &
\showlen{\itemindent}\\ \bs labelwidth& \Labelwidth &
\showlen{\labelwidth}\\ \bs labelsep & \Labelsep & \showlen{\labelsep}
\end{tabular}}}
\newcommand{\SHOWLAB}{\makebox[\labelwidth]{%
    \rule{.5pt}{2mm}\hfill\mbox{label}\hfill\rule{.5pt}{2mm}}}

\begin{Slide}{Example of list parameters}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{10mm}\def\Labelwidth{10mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{4mm}}\def\Itemindent{4mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

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

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{10mm}\def\Labelwidth{10mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{0mm}}\def\Itemindent{0mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

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

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{4mm}}\def\Itemindent{4mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

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

\begin{Slide}{Example of list parameters (cont.)}
 
  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{0mm}}\def\Itemindent{0mm}
  \renewcommand{\makelabel}[1]{\hfil\emph{#1}}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

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

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{4mm}}\def\Itemindent{4mm}
  \renewcommand{\makelabel}[1]{\emph{#1}\hfil}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS\\ 

  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}

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

\begin{Slide}{Example of list parameters (cont.)}

  Preceeding text.  Preceeding text.  Preceeding text.  Preceeding
  text.
\begin{list}{}{%
    \setlength{\leftmargin}{14mm}\def\Leftmargin{14mm}
    \setlength{\labelwidth}{14mm}\def\Labelwidth{14mm}
    \setlength{\labelsep}{4mm}\def\Labelsep{4mm}
    \setlength{\itemindent}{0mm}}\def\Itemindent{0mm}
  \renewcommand{\makelabel}[1]{\emph{#1}\hfil}
 
\item[\SHOWLAB] first para first item first para first item

  \SHOWDIMS\\ 
 
  second para first item second para first item

\item[label] first para second item first para second item

\item[very long label] first para third para first para third para
\end{list}

\end{Slide}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{Slide}{Option naming conventions in \LaTeXe{}}

\begin{description}
\item[\emph{Language options}] Language dependent \lq\nobreak{}fixed
  strings\rq\nobreak{} should use options compatible with the babel package.
\item[\emph{Paper size options}] The standard classes
  support the options \Loption{letterpaper}, \Loption{legalpaper}, \Loption{executivepaper},
  \Loption{a4paper}, \Loption{a5paper}, \Loption{b5paper}; any paper size can be modified by
  the option \Loption{landscape}.
\item[\emph{Driver options}] Many graphics related
  packages need to know dvi-driver (syntax of \Lcs{special} command.
  Currently the list includes: \Loption{emtex}, \Loption{dvips}, \Loption{oztex}, etc.
\item[\emph{Debugging options}] \Loption{errorshow},
  \Loption{warningshow}, \Loption{infoshow}, \Loption{debugshow}, \Loption{pausing}
\end{description}

\end{Slide}

\section{The font selection commands of \LaTeXe}

\begin{itemize}
\item the \LaTeXe{} font selection model
\item the user\rq\nobreak{}s interface
\item the designer\rq\nobreak{}s interface
\item the installer\rq\nobreak{}s interface
\end{itemize}

\section{\LaTeXo{} font selection}

Declaring new fonts in \LaTeXo{} was \emph{difficult}.

Using a text font other than CM meant redefining 50 or so internal
commands:
\begin{verbatim}
   \font\twlrm=ptmr at 12pt
\end{verbatim}
Adding new math fonts involved lots of low-level hacking with
\verb|\newfam|, \verb|\font| and \verb|\@addfontinfo|.

Many people thought that \LaTeX=CM.

This was improved with Mittelbach and Sch\"opf\rq\nobreak{}s \emph{New Font Selection
Scheme} (\emph{NFSS}).

NFSS~2 is part of \LaTeXe.

\section{Font selection model}

A \LaTeX{} font is defined by:
\begin{itemize}
\item an \emph{encoding}, e.g.~\lq\nobreak{}\TeX{} text\rq\nobreak{}
\item a \emph{family}, e.g.~\lq\nobreak{}Computer Modern\rq\nobreak{}
\item a \emph{series}, e.g.~\lq\nobreak{}Bold extended\rq\nobreak{}
\item a \emph{shape}, e.g.~\lq\nobreak{}Italic\rq\nobreak{}
\item a \emph{size}, e.g.~\lq\nobreak{}10pt\rq\nobreak{}
\end{itemize}
In this case, the font is
{\fontfamily{cmr}\fontseries{bx}\fontshape{it}\selectfont
cmbxi10}.

\section{Encodings}

An \emph{encoding} says which characters a font contains.

Some encodings are:
\begin{itemize}
\item \verb|OT1| Latin, e.g.~CM roman
\item \verb|OT2| Cyrillic, e.g.~CM cyrillic
\item \verb|OT3| International phonetic alphabet, e.g.~WSU IPA
\item \verb|U|   Unknown
\end{itemize}
Note \lq\nobreak{}\verb|O|\rq\nobreak{} means \lq\nobreak{}old\rq\nobreak{} means \lq\nobreak{}7-bit\rq\nobreak{}.

\section{Families}

A \emph{family} says what the name of the font collection is.

Some families are:
\begin{itemize}
\item \verb|cmr| Computer Modern Roman
\item \verb|cmss| Computer Modern Sans
\item \verb|cmtt| Computer Modern Typewriter
\item \verb|ptm| Adobe Times Roman
\item \verb|phv| Adobe Helvetica
\end{itemize}

\section{Series and shape}

The \emph{series} and \emph{shape}
say what the appearance
of a font is.

Some series are:
\begin{itemize}
\item \verb|m| medium
\item \verb|bx| \textbf{bold extended}
\end{itemize}
Some shapes are:
\begin{itemize}
\item \verb|n| \lq\nobreak{}normal\rq\nobreak{}
\item \verb|sl| \textsl{slanted}
\item \verb|sc| {\scriptsize SMALL CAPS}
\end{itemize}

\section{Size}

The \emph{size} says how large a font should be.

Some sizes are:
\begin{itemize}
\item \verb|5| {\fontsize{5}{5} 5pt}
\item \verb|10| {\fontsize{10}{10} 10pt}
\item \verb|14.4| {\fontsize{14.4}{14.4} 14.4pt}
\end{itemize}
Together, these five parameters determine every \LaTeX{} font.
For example:
\begin{itemize}
\item \verb|OT1/cmr/bx/it/10| is
   {\fontfamily{cmr}\fontseries{bx}\fontshape{it}\selectfont
      cmbxi10}
\item \verb|OT1/cmss/m/n/10| is cmss10
\item \verb|OML/cmm/m/it/10| is $\mathnormal{cmmi10}$
\end{itemize}

\section{User\rq\nobreak{}s interface}

The most important user command for selecting fonts is
\verb|\documentclass|.
The document class sets:
\begin{itemize}
\item the families for roman, sans and typewriter
\item the effects of \verb|\rm|, \verb|\bf|, \verb|\huge|, etc.
\item how \emph{logical} structure (e.g.~\verb|\section|) maps to
   \emph{optical} structure (e.g.~12pt bold)
\end{itemize}
The user commands:
\begin{itemize}
\item \verb|\textrm|, \verb|\textsf| \& \verb|\texttt| change the family
\item \verb|\textmd| \& \verb|\textbf| change the series
\item \verb|\textup|, \verb|\textit|, \verb|\textsl| \& \verb|\textsc|
   change the shape
\end{itemize}

\section{Designer\rq\nobreak{}s interface}

The document class designer has to set:
\begin{itemize}
\item the families for roman, sans and typewriter
\item the effects of \verb|\rm|, \verb|\bf|, \verb|\huge|, etc.
\item how \emph{logical} structure maps to
   \emph{optical} structure
\end{itemize}
The commands defined by the class include:
\begin{itemize}
\item \verb|\rmdefault|, \verb|\sfdefault|, \verb|\ttdefault|, etc.
\item \verb|\rm|, \verb|\bf|, \verb|\huge|, etc.
\item \verb|\section|, \verb|\maketitle|, etc.
\end{itemize}
For example, to say a document is set in Adobe Times, just say:
\begin{verbatim}
   \renewcommand{\rmdefault}{ptm}
\end{verbatim}

The designer\rq\nobreak{}s commands are:
\begin{itemize}
\item \verb|\fontencoding{|\emph{encoding}\verb|}|
\item \verb|\fontfamily{|\emph{family}\verb|}|
\item \verb|\fontseries{|\emph{series}\verb|}|
\item \verb|\fontshape{|\emph{shape}\verb|}|
\item \verb|\fontsize{|\emph{size}\verb|}{|\emph{baselineskip}\verb|}|
\item \verb|\selectfont|
\end{itemize}
For example:
\begin{verbatim}
   {\fontfamily{cmtt}\fontshape{sl}
      \selectfont hello}
\end{verbatim}
produces {\fontfamily{cmtt}\fontshape{sl}\selectfont hello}.

\section{Installer\rq\nobreak{}s interface}

The font installer has to say how the \LaTeX{} font selection model
relates to \TeX{} fonts, for example that \verb|OT1/cmtt/m/n/10| is
\verb|cmtt10|.

This is done with \emph{font definition} (\emph{fd}) files.

For each \emph{encoding} and \emph{family} there is a file
\emph{encodingfamily}\verb|.fd|, e.g.~\verb|OT1cmtt.fd|.

This uses the commands:
\begin{quotation}
\verb|\DeclareFontFamily{|\emph{encoding}\verb|}{|%
   \emph{family}\verb|}|\\\hspace*{2em}\verb|{|\emph{commands}\verb|}|
\\
\verb|\DeclareFontShape{|\emph{encoding}\verb|}{|%
   \emph{family}\verb|}|\\\hspace*{2em}\verb|{|\emph{series}\verb|}{|%
   \emph{shape}\verb|}{|\emph{loading}\verb|}{|%
   \emph{commands}\verb|}|
\end{quotation}

For example, a simple \verb|OT1ptm.fd| file is:
\begin{verbatim}
   \DeclareFontFamily{OT1}{ptm}{}
   \DeclareFontShape{OT1}{ptm}
      {m}{n}{<-> ptmr}{}
   \DeclareFontShape{OT1}{ptm}
      {b}{n}{<-> ptmb}{}
   \DeclareFontShape{OT1}{ptm}
      {m}{it}{<-> ptmri}{}
   \DeclareFontShape{OT1}{ptm}
      {b}{it}{<-> ptmbi}{}
\end{verbatim}
(The real \verb|OT1ptm.fd| file is a bit more complicated.)

The \emph{loading-commands} can be size-specific, for example:
\begin{verbatim}
   \DeclareFontShape{OT1}{ptmv}{m}{n}{
      <-11>ptmr10
      <11->ptmr
      }{}
\end{verbatim}
The \emph{loading-commands} also have options for:
\begin{itemize}
\item substituting fonts
\item generating font names from sizes automatically
\item running \LaTeX{} commands every time a font is loaded
\end{itemize}

\section{Mathematics and PostScript}

\section{Math font model}

A \LaTeX{} math font is defined by:
\begin{itemize}
\item a \emph{math version}, e.g.~\lq\nobreak{}normal\rq\nobreak{}
\item a \emph{math group}, e.g.~\lq\nobreak{}symbols\rq\nobreak{}
\item a \emph{math style}, e.g.~\lq\nobreak{}scriptstyle\rq\nobreak{}
\item a \emph{text size}, e.g.~\lq\nobreak{}10pt\rq\nobreak{}
\end{itemize}
In this case, the font is 7pt $\scriptstyle\mathcal{CMSY}$.

\section{Math versions}

A math version says which groups are available in math mode.

Some math versions are:
\begin{itemize}
\item \verb|normal| standard groups
\item \verb|bold| bold groups
\end{itemize}
Other math versions could include different subject areas
(e.g.~\verb|chemistry|) or national styles (e.g.~\verb|french|).

\section{Math groups}

A math group says which encoding, family, series and shape the font has.

There are two sorts of groups.

\emph{Symbol} groups are used with symbol commands like
\verb|\otimes|.  Some symbol groups are:
\begin{itemize}
\item \verb|operators| $\mathrm{roman~letters}$
\item \verb|letters| $\mathnormal{math~italic}$
\item \verb|symbols| $\mathcal{SYMBOLS}$
\item \verb|bigsymbols| big symbols such as $\sum$
\end{itemize}

\emph{Alphabet} groups are used with font commands like
\verb|\mathcal|.  Some alphabet groups are:
\begin{itemize}
\item \verb|\mathrm| $\mathrm{roman~letters}$
\item \verb|\mathnormal| $\mathnormal{math~italic}$
\item \verb|\mathcal| $\mathcal{CALLIGRAPHIC}$
\item \verb|\mathbf| $\mathbf{bold}$
\end{itemize}
Note that some groups are both symbol and alphabet groups.

\section{Math styles}

A math style says how large a font is compared with the text font.  The
three math styles are:
\begin{itemize}
\item \verb|textstyle| the size of text
\item \verb|scriptstyle| the size of subscripts
\item \verb|scriptscriptstyle| the size of subsubscripts
\end{itemize}

\section{User interface}

Is mostly unchanged.

Classes and packages change the available math versions and groups.

\verb|\normalmath| and \verb|\boldmath| change the math version.

\verb|\mathrm|, \verb|\mathnormal|, \verb|\mathcal| and \verb|\mathbf|
change the math group.

Commands like \verb|^| or \verb|\frac| change the math style.

\section{Designer interface}

Designers can provide new math versions and math groups, e.g.:
\begin{verbatim}
   \DeclareMathVersion{normal}
   \DeclareSymbolFont{operators}
      {OT1}{cmr}{m}{n}
   \DeclareMathAlphabet{\mathit}
      {OT1}{cmr}{m}{it}
\end{verbatim}
Symbol groups can have symbol declarations, e.g.:
\begin{verbatim}
   \DeclareMathSymbol{\alpha}
      {\mathord}{letters}{"0B}
\end{verbatim}
Symbol groups are less effecient than alphabet groups.

\section{PostScript fonts--User\rq\nobreak{}s and designer\rq\nobreak{}s interface}

As far as \LaTeX{} is concerned, PostScript fonts are just fonts like any
other (but the device driver may disagree).

So to select Times as a user:
\begin{verbatim}
   \usepackage{times}
\end{verbatim}
As a designer:
\begin{verbatim}
   \renewcommand{\rmdefault}{ptm}
\end{verbatim}

\section{Installer\rq\nobreak{}s interface}

The \verb|psnfss| software contains the \LaTeX{} PostScript fonts.

It contains:
\begin{itemize}
\item a set of \LaTeX{} packages
\item a set of font definition (\verb|fd|) files
\item a set of \TeX{} font metric (\verb|tfm|) files
\end{itemize}
For example Adobe Times is used with:
\begin{itemize}
\item \verb|times.sty|
\item \verb|T1ptm.fd|
\item \verb|ptmrq.tfm|, \verb|ptmriq.tmf|, \verb|ptmbq.tfm| and
 \verb|ptmbiq.tfm|
\end{itemize}

\section{Document portability}

The \verb|psnfss| package does \emph{not} say how the fonts should be
printed.  For example:
\begin{itemize}
\item with \verb|dvips| or Oz\TeX they can be printed using virtual fonts
\item with Textures or \verb|dvipsone| they can be
   printed using font re-encodings
\end{itemize}
But since every \LaTeX{} site has the same \verb|tfm| files, documents will
be portable.

A document may have three different encodings:
\begin{itemize}
\item the input encoding (e.g.~Macintosh)
\item the internal encoding (e.g.~Cork)
\item the driver encoding (e.g.~Adobe Standard)
\end{itemize}
\LaTeX{} supports the Cork internal encoding for PostScript fonts, but
doesn\rq\nobreak{}t specify input or driver encodings, so:
\begin{itemize}
\item documents are portable (since all documents use the \verb|T1|
   encoding)
\item documents can use specialist encodings (e.g.~Macintosh or ANSI)
\end{itemize}

Often users are unclear about why the alignment
of their paragraph boxes (or minipages) appears the
way it does. 
To help explain the observed behaviour a few examples 
are presented below, which hopefully,
clarify some of the issues.
 

\newcommand{\HR}{\rule{.5em}{0.4pt}}
\begin{verbatim}
\newcommand{\HR}{\rule{.5em}{0.4pt}}
\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
           A A A A A A A A A A A A A A A
  \end{minipage} xx
  \begin{minipage}[t]{20}
           B B B B B B B B B B B B B B B B B B B B B B B B
  \end{minipage}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR
\end{verbatim}

\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
           A A A A A A A A A A A A A A A
  \end{minipage} xx
  \begin{minipage}[t]{20mm}
           B B B B B B B B B B B B B B B B B B B B B B B B
  \end{minipage}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR

\begin{verbatim}
    ...
  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR
\end{verbatim}

\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
           A A A A A A A A A A A A A A A
  \end{minipage} xx
  \begin{minipage}[t]{20mm}
           B B B B B B B B B B B B B B B B B B B B B B B B
  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR
\begin{minipage}[b]{20mm}  C C C C C C C \end{minipage}\HR

\begin{verbatim}
\HR
\begin{minipage}[b]{20mm}
     A A A A A A A A A A A A A A A
\end{minipage}\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
     B B B B B B B B B B B B B B B B B B B B B B B B gg jj
  \end{minipage} xx
  \begin{minipage}[t]{20mm}  C C C C C C C  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR
\end{verbatim}

\HR
\begin{minipage}[b]{20mm}
     A A A A A A A A A A A A A A A
\end{minipage}\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
     B B B B B B B B B B B B B B B B B B B B B B B B gg jj
  \end{minipage} xx
  \begin{minipage}[t]{20mm}  C C C C C C C  \end{minipage}
  \par\vspace*{0mm}
\end{minipage}\HR

\begin{verbatim}
\settodepth{\Mylen}{gj}
    ...
  \begin{minipage}[t]{12mm}  C C C C C C C  \end{minipage}
  \par\vspace*{-\Mylen}
\end{minipage}\HR
\end{verbatim}

\settodepth{\Mylen}{gj}
\HR
\begin{minipage}[b]{20mm}
     A A A A A A A A A A A A A A A
\end{minipage}\HR
\begin{minipage}[b]{50mm}
  \begin{minipage}[t]{20mm}
     B B B B B B B B B B B B B B B B B B B B B B B B gg jj
  \end{minipage} xx
  \begin{minipage}[t]{20mm}  C C C C C C C  \end{minipage}
  \par\vspace*{-\Mylen}
\end{minipage}\HR
