The first major difference between LaTeX 2.09 style files and LaTeX2e packages and classes is that LaTeX2e supports modularity, in the sense of building files from small building-blocks rather than using large single files.
A LaTeX package or class can load a package as follows:
\RequirePackage[<options>]{<package>}[<date>]For example:
\RequirePackage{ifthen}[1994/06/01]This command has the same syntax as the author command
\usepackage
.
It allows packages or classes to use features provided by other
packages. For example, by loading the ifthen
package, a package
writer can use the `if...then...else...' commands provided
by that package.
A LaTeX class can load one other class as follows:
\LoadClass[<options>]{<class-name>}[<date>]For example:
\LoadClass[twocolumn]{article}This command has the same syntax as the author command
\documentclass
.
It allows classes to be based on the syntax and appearance of another
class. For example, by loading the article
class, a class writer
only has to change the bits of article
they don't like, rather than
writing a new class from scratch.
The following commands can be used in the common case that you want to simply load a class or package file with exactly those options that are being used by the current class.
\LoadClassWithOptions{<class-name>}[<date>] \RequirePackageWithOptions{<package>}[<date>]For example:
\LoadClassWithOptions{article} \RequirePackageWithOptions{graphics}[1995/12/01]