[Tex/LaTex] Customizing LaTeX – create a document class or a package

document-classesdocumentclass-writingpackage-writingpackages

Are there general rules for when to create a document class vs. creating a package to customize LaTeX? Does one have benefits over the other?

My specific need is to create a customized page layout, but I'm interested in the general response to this question as well.

I did quite a bit of poking around for an answer to this, but surprisingly couldn't find much information.

Best Answer

Maybe one could say a package is for extending possibilities, a class is for restricting possibilities.

If you want to add new features which can help users create specific effects in a lot of different document types, a package is for you.

If you want to set sensible defaults and create an optimal environment for efficiently creating documents of a specific type without having to do a lot of customisation, make a class.

There are a lot of fringe cases, of course ;-)