## NIU Department of Mathematical Sciences LaTeX 2e Essentials

#### Changes and new features

• better handling (placement) of figures, tables etc.
• enhancements in macro (command) definitions, some useful (see below)
• changes in handling of different type styles (see below)
• most styles are now called packages', and read in using \usepackage{...} in the preamble
• some math symbols (\lhd, \sqsubset, \leadsto, \Box and a few others) require the latexsym package (\usepackage{latexsym})
• \documentclass replaces \documentstyle
• some basic formatting styles are still specified as optional arguments to \documentclass[...]{...}
• there's no SliTeX, use class slides instead
• better picture environment, allows to draw Bezier curves; will replace some included PostScript files
• packages called graphics and a more powerful graphicx for inserting and manipulating (scaling, rotating etc.) graphics from other programs; might replace the epsf option in the future

#### 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.

#### Typefaces

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.

#### Macros


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.

webmaster@math.niu.edu