Next: Using classes and packages Up: The structure of a Previous: The structure of a Contents

## Identification

The first thing a class or package file does is identify itself. Package files do this as follows:

       \NeedsTeXFormat{LaTeX2e}
       \ProvidesPackage{<package>}[<date> <other information>]

For example:

       \NeedsTeXFormat{LaTeX2e}
       \ProvidesPackage{latexsym}[1994/06/01 Standard LaTeX package]

Class files do this as follows:

       \NeedsTeXFormat{LaTeX2e}
       \ProvidesClass{<class-name>}[<date> <other information>]

For example:

       \NeedsTeXFormat{LaTeX2e}
       \ProvidesClass{article}[1994/06/01 Standard LaTeX class]

The <date> should be given in the form `YYYY/MM/DD' and must be present if the optional argument is used (this is also true for the `\NeedsTeXFormat` command). Any derivation from this syntax will result in low-level TEX errors--the commands expect a valid syntax to speed up the daily usage of the package or class and make no provision for the case that the developer made a mistake!

This date is checked whenever a user specifies a date in their `\documentclass` or `\usepackage` command. For example, if you wrote:

       \documentclass{article}[1995/12/23]

then users at a different location would get a warning that their copy of `article` was out of date.

The description of a class is displayed when the class is used. The description of a package is put into the log file. These descriptions are also displayed by the `\listfiles` command. The phrase `Standard LaTeX` must not be used in the identification banner of any file other than those in the standard LATEX distribution.

Next: Using classes and packages Up: The structure of a Previous: The structure of a Contents