Regarding LaTeX I understand terms such as
package, and so on but I don't understand the meaning of
template as used by many questioners. Is it what is traditionally called a
class or is it an example of a complete TeX document where the user edits the textual content, or ...?
Regarding LaTeX I understand terms such as
As one of the resident linguists here, I'd like to add my two cents to this discussion.
First off, language meanings aren't carved in stone (or in dictionaries), but are essentially determined by language use. And although there are some experienced LaTeX users on the site who would like to prescribe a particular meaning to the term, this is fundamentally a losing battle. So we need to look at (i) the people who tend to use the term (new users, mainly) and (ii) the contexts in which they seem to use the term.
It's fairly clear that most new users think of a template as a TeX document which, upon the addition of some content, will produce a document with particular formatting characteristics, a document type, so to speak. Although some users do seem to use it as roughly synonymous to 'document class' (e.g. I'm using the
This is partially where the confusion comes about when this term gets used with experienced users. We clearly distinguish between document types from tokens of a particular document type. We implement this by means of a class or a package, of course (see Customizing LaTeX - create a document class or a package? for some discussion on the distinction).
So often times part of the answer to a new user's request for a 'template' will lead to pointing them to a particular document class or package that helps to produce a document of the type they are requesting. But I think users who make such requests expect more than just this. They expect also, a sample document using that class or package so that they can see how a full document would look like. The sample document should have most of the basic elements but not much content.
I maintain a thesis class for my university. In addition to the class itself and the documentation, I also provide a commented 'template' which is a TeX document which uses the class and contains most of the basic elements needed. This gets new users started on using the class quite quickly, and certainly make my life easier in providing support, since it fends off most basic user questions.
So a 'template' for most users is a TeX document (a token) that instantiates a particular type of document.
If we keep this in mind when answering questions, it might be helpful for everyone.
P.S. I don't think that characterizing users who request such documents as 'lazy' is helpful or even accurate.
The term isn't used (in that sense) anywhere in latex itself.
It is usually means a small sample document that loads up some particular class and selection of packages and has some dummy text, so people can just start from that and edit rather than read enough documentation to build a new document from scratch.
A template is a complete example code for example to write the formalias for the master thesis of a special university. Then there are added special commands to insert author, etc. at the required place, fullfilling the given title page etc. of the special university.
The problem with template is that a lot of them are buggy ...
The template uses classes (for example the class
thesis.cls), which defines the layout of the paper and if needed special packages to add special funtions to the paper.
moderncv.cls is a class, including a template
example.tex to create an cv.
That very same question has been asked before by Barbara Beeton in TUGboat
That question is impossible to answer though, because the term template is not defined for LaTeX.
Let's take a look from different perspectives.
Why is someone searching for a template?
Almost all users using that term want a base to start with. A mould to pour in content. An example to write a letter, or a thesis, a table with colored rows or something else and customize it to suit the requirements.
I am just working on my template for my bachelor report and have problems with the headers.
Can somebody share a template for this table?
Some users looking for a template are rather searching for a special style.
I like that template because it has colored headers.
Does someone have a nice looking thesis template?
Where can i get a template?
Let's have a look at where templates are available online.
There are journal templates, often available at the journal homme page, often based on a special in-house class. The user opens a zip-file and finds a skeleton document along with some other needed files and can input his own text. Since a journal has a fixed layout, the style is fixed. Often so fix that it is merely impossible to alter the style.
There are templates for theses or CVs (and other stuff), some on CTAN, some not. They differ in quality. When downloaded from a web site, usually a zip is provided, with a sample document and supporting files. Some of those zip files are simple, merely pure examples of a normal latex file. Others are complex structures of directories, complex classes, a bunch of stuff. Usually, at least a bit of expertise goes into those documents.
Overleaf and ShareLaTeX (and others) also provide templates. You can open a template and jhust start writing your journal article or thesis (it is advertised as such on one of the sites). Creating a template is as easy as pushing the Publish as template button, for every document you want. There is an incredible amount of templates around.
Can template usage get messy?
Yes, for sure. It occasionally happens that a user found the template of the International Journal for Wombat Research (IJWR) nice for his homework assignment. Just the headers and footers need to be fixed, and the margins. For a fixed journal layout, this isn't that easy.
Many templates are unmaintained. They often use old or conflicting packages, some templates even cannot be compiled with a current TeX Live1.
Some more thoughts can be found in Template Confusion.
It is hard to put a label on the word template and one has to find out what is meant at every instance. If someone is eager to discuss the template issue to find some solutions or common terms, or even has some ideas, please write a mail to email@example.com. You can also drop into our chat room.
1 An Indian university provides a LaTeX
thesis template starting with
I've discovered that I'm a Grumpy Old Man (GOM) but I want to thank everyone who has answered and obviously put a lot of thought into it. As a GOM, and considering the other answers I'm now thinking of a Template as being example (La/TeX) code, preferably as a complete example document or as a code snippet for a particular task. I think that my summary word is `Example'. Putting on the GOM hat I feel that, given a Template, questioners should be able, perhaps with a little effort and reading of the documentation, to generate the document that they want.
I've just come across a website http://www.LaTeXTemplates.com which has many LaTeX examples. Perhaps this explains the popularity of `Template'.
A good and common synonym for Template is Form. Templates aid in achieving sameness. Templates do that by setting or constraining visual or physical parameters of some productive process. Which aspects are duplicated by a template will vary by domain. For example, in a text document, the visual parameters of style are set by the template; but in the domain of manufacturing, a template is a physical object that either restricts movement parameters of material acted on by tools or restricts movement of tools acting on material. Across all domaines though, the point is efficient modes of achieving sameness in production.
I think this particular usage of the word template comes from Microsoft Word users. In that application, a template is essentially an example document with placeholder text and styling that can be customized to suit one's needs. Word ships with several templates for letters, invoices, agendas, etc.
Templates can be pretty sophisticated with their own styles (in the MS Word sense) and even macros (I think). I think the best analogue of this kind of template in the TeX universe is document class.