[Tex/LaTex] Classes and packages – what’s the difference

document-classespackages

Could someone explain the difference between classes and packages? We call prosper a class and amsmath a package. I couldn't find out the difference.

Best Answer

See section 2.3 of LaTeX2e for class and package writers, "Is it a class or a package?" It states the following "rule of thumb":

If [new] commands could be used with any document class, then make them a package; and if not, then make them a class.

The following quote is somewhat more enlightening:

[A] company might have a local ownlet class for printing letters with their own headed note-paper. Such a class would build on top of the existing letter class but it cannot be used with any other document class, so we have ownlet.cls rather than ownlet.sty.

The graphics package, in contrast, provides commands for including images into a LaTeX document. Since these commands can be used with any document class, we have graphics.sty rather than graphics.cls.

Related Question