In the internet LaTeX templates for all kinds of documents are circulating again and again. These templates usually consist of a huge preamble in which all sorts of partly contradictory and totally obsolete packages are loaded and in which then various internal macros and interface commands of the class and packages are redefined and a whole bunch of new commands and environments are defined. Most of these definitions then also depart from long outdated class and package versions, are never needed by the users, or even do something that the user doesn't even want. In order to hide all this jumble from the user, the preamble is often located in another file that is included in the document preamble via \input
or, by mistake, even via \include
. Since this whole kerfuffle is then also documented from not at all over insufficiently up to wrongly, the whole template leads sooner or later inevitably into a trap. I therefore usually recommend a different approach, namely to start with a minimal document and then gradually include only what the user has already dealt with and knows he needs. Incidentally, this also has the advantage that the user understands at least halfway what he is doing and does not have to live with the uneasy feeling that he is poking around in the fog all the time.
The very first step should of course be to get a good, detailed LaTeX introduction and to work through at least the chapters with the basic things. Such an introduction can be found in “Programming LaTeX - A survey of documentation and packages”. If necessary, but really only if necessary, a LaTeX short introduction is sufficient. But then you should really work through it completely and thoroughly.
By the way, the following articles and suggestions contain several hours of work and several years of experience. Nevertheless, errors have crept in for sure and hints will become obsolete sometime. Anyone who finds such things is welcome to report them so I can fix them if necessary.
This inevitably leads me to an appeal to all those who publish a LaTeX template. Such a publication also implies a responsibility. This means that one should provide support for a template that one publishes. Likewise, it should be ensured that the template is also maintained. An unmaintained template without support is not only a trap for users, it also imposes support on others, because sooner or later users will post in public LaTeX forums with problems resulting from the template. If you are not willing to do the work involved, to keep yourself informed about current developments and to adapt and improve your own work if necessary, it is better not to publish a template. For yourself, on the other hand, you may write whatever you want into your personal template. Nevertheless, I recommend to keep your templates lean and above all to document them thoroughly, so that in a few years you will still know why you did something and have a chance to adapt them to new developments. By the way, you can find sample solutions for certain problems here in the wiki.
In order not to cause maximum problems with overloaded maximum solutions, here is an approach for minimal templates, which can easily be extended to fit the respective task:
Since these very minimal templates often do not meet special requirements, some of the more frequently requested extension options are listed here as examples:
However, it should be noted that only those extension options should be loaded that are actually used. Cluttering the document preamble with unneeded packages and code should be avoided.
Wiki (English): HowTo
Wiki (English): HowTo_Abstract
Wiki (English): HowTo_Bibliography
Wiki (English): HowTo_Images
Wiki (English): HowTo_LargeThesis
Wiki (English): HowTo_Links
Wiki (English): HowTo_Math
Wiki (English): HowTo_Template_LuaLaTeX_XeLaTeX
Wiki (English): HowTo_Template_PDFLaTeX
Wiki (English): HowTo_Titlepage
Wiki (English): HowTo_addlistof