What are LaTeX classes and packages?

Current LaTeX makes a distinction between the macros that define the overall layout of a document, and the macros that tweak that layout (to one extent or another) to provide what the author really wants.

The distinction was not very clear in LaTeX 2.09, and after some discussion (in the later stages of development of current LaTeX) the names “class” and “package” were applied to the two concepts.

The idea is that a document’s class tells LaTeX what sort of document it’s dealing with, while the packages the document loads “refine” that overall specification.

On the disc, the files only appear different by virtue of their name “extension” — class files are called *.cls while package files are called *.sty. Thus we find that the LaTeX standard article class is represented on disc by a file called article.cls, while the footmisc package (which refines article’s definition of footnotes) is represented on disc by a file called footmisc.sty.

The user defines the class of his document with the \documentclass command (typically the first command in a document), and loads packages with the \usepackage command. A document may have several \usepackage commands, but it may have only one \documentclass command. (Note that there are programming-interface versions of both commands, since a class may choose to load another class to refine its capabilities, and both classes and packages may choose to load other packages.)

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=clsvpkg