NIU Department of Mathematical Sciences
LaTeX 2e Essentials


Changes and new features

Running LaTeX 2e

Note: as of late 2000 latex2e is the default for all users.

When your configuration files are adjusted to access the new version by default, you will be able to use it just like the old one, i.e. the standard command names (tex, latex) will simply start the new programs.

If you do switch, please try writing new documents so they conform to the new conventions. You may want to use this simple template to get started.

latex2e will automatically run in a `compatibility mode' when it sees the documentstyle keyword, and will most of the time emulate the old LaTeX to a tee. But sometimes the printed results might not be exactly the same, and it's slower then. Moreover, auxiliary files created with the old and new versions may be incompatible - if you are getting errors, try rm *.aux *.log *.toc *.bbl first. We strongly encourage users to update their documents to LaTeX 2e rather than using compatibility mode.

When latex2e complains that it can't find files or fonts, e-mail the whatever.log file to me and I'll try to install the missing components.


Instead of changing type styles and typefaces inside a pair of brackets, one should now put the text to be altered in an argument of a command: \textbf{This is bold} rather than {\bf This is...}, and \emph{This is emphasis} rather than {\em This...}. In other words, commands of the form \style{...text...} should be used instead of declarations {\style ...text...}.

You can then easily combine such styles, even though overusing them isn't in good taste: \textsf{\textit{...}} will produce italicized sans-serif type. Old LaTeX often had trouble with such combinations.

The biggest changes involve the math mode. The traditional way of getting the typeface to change was to use the \mbox{\bf ...} or some such. The preferred way is to type \mathbf{...} instead. This makes everything more consistent and the results are better. You can use the following commands: \mathit{...}, \mathrm{...}, \mathbf{...}, \mathsf{...}, \mathtt{...}, and \mathcal{...} for - respectively - italics, roman (upright), boldface, sans-serif (`TV Guide'), typewriter (monospaced Courier) and calligraphy (upper case only) styles.

\mathbf makes all letters and symbols in a formula bold, but not the commands such as \sin. If everything in a math formula should be bold, use \boldmath$...$. This cannot be used in math mode, so to use it inside a formula you have to type $x + y = \mbox{\boldmath$\Gamma$}_z$. This won't be done often, but if it is - as usual - it's best to define a command for it: \newcommand{\bgamma}{\mbox{\boldmath$\Gamma$}} so you can alter it easily later on.


When you define a macro such as \newcommand{\mn}{M_n} and then use it in regular text mode, TeX will complain that subscripts can only be used inside math. So you define it as \newcommand{\mn}{$M_n$}, and have to say $\mn$ every time in normal text. You can now say \newcommand{\mn}{\ensuremath{M_n}}, and LaTeX 2e will add the dollar signs automatically when they are needed.

Macros can now have a default value for the first argument. For example, we would define \newcommand{\mat}[2]{M_{#1}(#2)}, and then use $\mat{n}{\R}$ to get Mn(R). This is a pain if we need Mn(R) fifty times, and M2(R) only once in a while.

Now we can define \newcommand{\mat}[2][n]{M_{#1}(#2)}, and use the macro with one argument or two. \mat[2]{\R} will mean M2(R) as before, but \mat{\R} will also work and produce Mn(R). In some cases this can save a lot of typing.