Next: Class and package options
Up: Classes and packages
Previous: Classes and packages
The main difference between LATEX 2.09 and LATEX2e is in the
commands before \begin{document}
.
In LATEX 2.09, documents had styles,
such as article or book, and options,
such as twoside or epsfig.
These were indicated by the \documentstyle
command:
\documentstyle
[<options>]{<style>}
For example, to specify a two-sided article with encapsulated
PostScript figures, you said:
\documentstyle[twoside,epsfig]{article}
However, there were two different types of document style option:
built-in options such as twoside
; and packages such as
epsfig.sty
. These were very different, since any LATEX document
style could use the epsfig package but only document styles
which declared the twoside option could use that option.
To avoid this confusion, LATEX2e differentiates between built-in
options and packages. These are given by the new \documentclass
and
\usepackage
commands:
\documentclass
[<options>]{<class>}
\usepackage
[<options>]{<packages>}
For example, to specify a two-sided article with encapsulated
PostScript figures, you now write:
\documentclass[twoside]{article}
\usepackage{epsfig}
You can load more than one package with a single \usepackage
command; for example, rather than writing:
\usepackage{epsfig}
\usepackage{multicol}
you can specify:
\usepackage{epsfig,multicol}
Note that LATEX2e still understands the LATEX 2.09 \documentstyle
command. This command causes LATEX2e to enter LATEX 2.09
compatibility mode, which is described in Section 4.
You should not, however, use the \documentstyle
command for new
documents because this compatibility mode is very slow and the new
features of LATEX2e are not available in this mode.
To help differentiate between classes and packages, document classes
now end with .cls
rather than .sty
. Packages still end with
.sty
, since most LATEX 2.09 packages work well with LATEX2e.
Next: Class and package options
Up: Classes and packages
Previous: Classes and packages
LaTeX3 Mail Server
1999-07-12