When writing homework sheets, I make use of a template whose preamble incorporates all of the LaTeX goodies that I typically require: packages, page parameters, user-defined commands and environments, etc.. To write a new homework sheet, I simply copy and paste the contents of this template into a new document and begin writing. This saves me time and helps ensure consistency across all of my many homework sheets. Unfortunately, this preamble information has grown quite extensive so that I have to scroll down a good deal to even see where my document begins. Moreover, much of the preamble content will not apply to a given homework sheet, and I don't want to have to weed it out on a case-by-case basis.
My question is: can this template be implemented more like a true template that can be invoked (like a document class) but whose preamble is otherwise "hidden" from view? Indeed, is this a simple example of a user-defined document class?
.sty
file is 'hidden' from the user in direct view as it is stored in the tex tree or in a local user-defined directory, so the answer is yes – user31729 Dec 18 '14 at 22:11mystuff.sty
then your documents can be\docuemntclass{article}\usepackage{mystuff}\begin{docuemnt}...
– David Carlisle Dec 18 '14 at 22:12