Classes, Packages and Page Styles
Author: Luc Maranget

## B.5 Classes, Packages and Page Styles

- Document Class
- Packages and Page Styles
- The Title Page and Abstract

### B.5.1 Document Class

Both LATEX 2є `\documentclass` and old LATEX `\documentstyle` are accepted. Their argument style is interpreted by attempting to load a style.hva file. Presently, only the style files article.hva, seminar.hva, book.hva and report.hva exist, the latter two being equivalent.

If one of the recognized styles has already been loaded at the time when `\documentclass` or `\documentstyle` is executed, then no attempt to load a style file is made. This allows to override the document style file by giving one of the four recognized style files of HEVEA as a command line argument (see 2.2).

Conversely, if HEVEA attempt to load style.hva fails, then a fatal error is flagged, since it can be sure that the document cannot be processed.

### B.5.2 Packages and Page Styles

HEVEA reacts to `\usepackage[`options`]{`pkg`}` in the following way:

1. The whole `\usepackage` command with its arguments gets echoed to the image file (see 6).
2. HEVEA attempt to load file pkg.hva, (see section C.1.1.1 on where HEVEA searches for files).

Note that HEVEA will not fail if it cannot load pkg.hva and that no warning is issued in that case.

The HEVEA distribution contains implementations of some packages, such as verbatim, colors, graphics, etc.

In some situations it may not hurt at all if HEVEA does not implement a package, for instance HEVEA does not provide an implementation for the fullpage package.

Users needing an implementation of a package that is widely used and available are encouraged to contact the author. Experienced users may find it fun to attempt to write package implementations by themselves.

### B.5.3 The Title Page and Abstract

All title related commands exist, with the following peculiarities:

- The argument to the `\title` command appears in the html document header. As a consequence, titles should remain simple. Normal design (as regards HEVEA) is for `\title` to occur in the document preamble, so that the title is known at the time when the document header is emitted (while processing `\begin{document}`). However, there are two subtleties.

  If no `\title` command occurs in document preamble and that one `\title` command appears in the document, then the title is saved into the .haux file for a next run of HEVEA to put it in the html document header.

  If `\title` commands are present both in preamble and after `\begin{document}`, then the former takes precedence.

- When not present the date is left empty. The `\today` command generates will work properly only if hevea is invoked with the `-exec xxdate.exe` option. Otherwise `\today` generates nothing and a warning is issued.

The `abstract` environment is present is all base styles, including the book style. The `titlepage` environment does nothing.