### LaTeX 2e/LaTeX 2.09

#### LaTeX 2e vs LaTeX 2.09

Before LaTeX 2.09, fonts were selected via the OFSS (Old Font Selection Scheme). Around the time that LaTeX 2.09 was released it was realised that a new scheme would need to be devised to manage the vast array of fonts becoming available.

In OFSS, \it\bf switched the font to italic and then (upright) boldface. What if you had wanted a bold italic font? The idea behind NFSS was to make such influences on the font orthogonal so that the sequence \it\bf would indeed give a bold italic font. (That's not quite true ... the effect of such a sequence depends on how it's defined by the particular document class loaded - in many the behaviour is the same as OFSS - but \itfamily\bfseries and \bfseries\itfamily do give a bold italic font.)

Now, LaTeX 2.09 was released both with OFSS and NFSS ... and along with other influences various incompatible versions of LaTeX were in common use; so users were faced with having files that weren't portable.

LaTeX 2e made NFSS standard and it [LaTeX 2e] became the only officially supported version of LaTeX. A true LaTeX 2e file starts with

\documentclass ....
but, to provide compatibility with LaTeX 2.09, when a file starts with
\documentstyle ....
latex emulates LaTeX 2.09.

#### Converting a LaTeX 2.09 document into LaTeX 2e

Most documents written for LaTeX 2.09 can be converted to LaTeX 2e my modifying just the first line of the file. The first line of a LaTeX 2.09 document is of form:
\documentstyle[opt1,...,optm, pkg1,...,pkgn] {docsty}
In LaTeX 2.09 parlance the argument in the curly braces (docsty) was called a document style. Some possibilities for docsty were article, report, book. If say, docsty was article then LaTeX 2.09 loaded the file article.sty. Between the square brackets were both options supported by the document style; and packages unrelated to the document style. Having pkg1 in the square-bracketed list caused LaTeX 2.09 to load the file pkg1.sty.

The equivalent LaTeX 2e commands required to replace the above are:

\documentclass[opt1,...,optm] {docsty}
\usepackage{pkg1,...,pkgn}
In LaTeX 2e parlance the argument in the curly braces is called a document class. Like LaTeX 2.09 some possibilities for the class are article, report, book. If the class is article, say, then LaTeX 2e loads the file article.cls (so class would have been a more appropriate variable name than docsty). Between the square brackets go options supported by the document class and nothing else. Any packages required are listed between curly braces as arguments of \usepackage. Having pkg1 in such a curly-braced list causes LaTeX 2e to load the file pkg1.sty.

The correct LaTeX 2e terminology for a .sty file is package. Even with LaTeX 2.09 such files were not style files, but as most such files originally created for LaTeX 2.09 still work with LaTeX 2e the LaTeX designers decided to retain the .sty extension for package files.

Sometimes the additional package latexsym needs to be included (first) among the list of packages, but the single package uwamaths should serve Maths department users for most purposes (it loads the AmS-LaTeX package amssymb instead of latexsym, as well as some other packages).

Some LaTeX 2.09 documents use old font names like twlrm (12 point roman). In such cases, you will need to add

\usepackage{rawfonts}
to the preamble (along with the changes indicated above) to get a valid LaTeX 2e document. See The rawfonts package [rawfonts.dvi| rawfonts.ps] for more information.

Below, we consider a LaTeX 2.09 file that was upgraded to LaTeX 2e and AmS-LaTeX.

You will find some documents cannot be converted to LaTeX 2e so simply. Some can be processed in the original form by LaTeX 2e ... the \documentstyle command signals LaTeX 2e to go into LaTeX 2.09 compatibility mode. Yet other files, though, can only be processed with the old LaTeX ... then, you should use the command latex209 instead of latex to process the file.

#### A case study: conversion of a LaTeX 2.09 document into LaTeX 2e with AmS-LaTeX

Preliminary words of caution: You will need to do some things differently using AmS-LaTeX 1.2+ ... but the extra features definitely make it worthwhile. The changes that will cause people the most bother are the plain TeX commands:

\over, \choose, \atop, \above etc.
are not allowed. Essentially the infix syntax of these commands caused a lot of bother. They are replaced by prefix style commands based on the new command \genfrac (see AmS-LaTeX version 1.2 User's Guide [amsldoc.dvi |amsldoc.ps] pages 13-15), in particular: \frac must be used rather than \over and \binom must be used rather than \choose.

Now we investigate what was needed to convert a typical LaTeX 2.09 document to LaTeX 2e and using AmS-LaTeX 1.2. In this case study the user was using LaTeX 2.09 with article style at 11pt and was reading in bbbold.tex to get blackboard bold fonts (which are 10pt fonts! ... and so didn't quite look right particularly in headings!!! ... which tend to be larger than the normal fontsize).

Below are the list of changes that were required'' to be compatible with the AmS-LaTeX 1.2+. The old code is always to the left and the replacement code to the right (as per the heading). (Some changes you will notice were made to rectify non-ideal use of LaTeX 2.09.)

(N) LaTeX 2.09 AmS-LaTeX 1.2, LaTeX 2e
(0) \documentstyle[11pt]{article}
\input bbbold
\documentclass[11pt]{article}
\usepackage{amsmath,amsfonts,amsthm}
bbbold(.tex) is replaced by amsfonts(.sty).
You may choose to use package: amssymb instead ... this loads up package amsfonts as a side-effect.
Alternatively you might like to just load the package: uwamaths.
Notice several packages can be read in with the one \usepackage command ... so long as the packages without their .sty extensions are separated by commas and there are no blanks, and options if there are any are common.
The package: amsmath invokes AmS-LaTeX 1.2+.
The package: amsthm is required to make (4) and (5) valid below.
(1) \baselineskip=20pt \renewcommand{\baselinestretch}{1.25}
Usually put in the preamble, i.e. before \begin{document}.
(Redefining \baselinestretch is the LaTeX way of changing interline spacing ... 1.24 to 1.25 corresponds to one-and-a-half spacing.)
If using package: uwamaths then you can use the more descriptive: \oneandhalfspacing instead.
(2) \pmatrix{......} \begin{pmatrix}
......
\end{pmatrix}
Can use \\ in place of \cr if you wish ... but you must not have a \\ or \cr just before \end{pmatrix}.
(3) \cases{
....&if $...$\cr
....&if $...$\cr
}
\begin{cases}
....&\text{if $...$}\\
....&\text{if $...$}
\end{cases}
After the & in LaTeX you are still in math-mode (not text-mode as in plain TeX).
So to get text-mode you need to put what comes after & in an \mbox{...} (or \text{...} if using AmS-LaTeX).
Note: the AmS-LaTeX command \text is better than LaTeX's \mbox ... \text is more descriptive and automatically adjusts fontsize, \mbox doesn't!
Also note: as with all LaTeX environments, there is no \\ or \cr before \end{...}.
(4) \proof
...
\qed
\begin{proof}
...
\end{proof}
AmS-LaTeX now puts the \qedsymbol flush right ... just as we like it!
(5) {\bf Proof of Theorem ...}
...
\qed
\begin{proof}[Proof of Theorem ...]
...
\end{proof}
A proof can start with text differing from Proof, by providing the text that you want in square brackets.
(6) { ... \over ... } \frac{...}{...}
This is probably the most painful of the changes.
Unfortunately, the plain TeX commands \over, \atop, \choose, \above etc. are disabled in AmSLaTeX.
All of these can be obtained using \genfrac ... see pages 13-15 of the AmS-LaTeX version 1.2 User's Guide [amsldoc.dvi |amsldoc.ps]
On the plus side, however, you get \dfrac for \displaystyle{\frac{...}{...}} and \tfrac for the corresponding \textstyle version of \frac.
(7) { ... \choose ... } \binom{...}{...}
Similar to \over. AmSLaTeX actually uses the \genfrac command to define \binom. Again this is a bit painful, but having \genfrac gives a huge increase in versatility.
(8) \def\xxx#1#2#3{...} \newcommand{\xxx}[3]{...}