Having recently gotten back into writing with LaTeX, I explored XeTeX and found advances in using modern fonts, explored LuaTeX and found a next-gen development underway, and explored ConTeXt and found … a focus on formatting?
To me, LaTeX and its variations have always been about separating the content from the formatting. This is why we use \begin{abstract} ... \end{abstract}
and don't worry about how that is typeset. Every now and then we want to tweak a setting, but myself, I've found that rare.
But in reading about ConTeXt and how to use it I find articles such as this one about Document Titles that teaches how to format the title page, something that was trivial in LaTeX. This article advocates writing 60 lines of formatting code and putting it into a separate module so that you can achieve a similar effect.
I cannot help but feel that I am missing something in the philosophy behind ConTeXt. The project page doesn't make it clear other than to say that it is a "document processing system". It also says that "ConTeXt documents are written without formatting", which isn't quite true, as I'm starting to learn (e.g. see article above).
Can someone please explain the mindset one should take while using ConTeXt? Am I expected to supply extensive formatting instructions while using this typesetting system?
Best Answer
ConTeXt also focuses on separation of content and presentation. In all ConTeXt documents that I write, I use:
which gives a nice document title, sets the appropriate fields of the PDF file (something that you do using
hyperref
package in LaTeX), and I have markingsmetadata:title
andmetadata:author
that can be used in the headers and footers. Similar to LaTeX. The difference being that the macros that does this was not provided by ConTeXt but written by me.The reason ConTeXt does not provide a default implementation for something similar to
\maketitle
is that it is impossible to find a solution that fits everyone. The information that goes into a title is different for books, articles, reports, etc. So, ConTeXt leaves it to the document authors to create a command for typesetting titles, as they see fit. ConTeXt provides enough high-level commands that it is relatively easy for users to create sophisticated macros.LaTeX takes a different approach. It provides a default implementation for
\maketitle
. Inarticle.cls
it is defined as:Other document classes redefine it as appropriate. For example,
scrartcl.cls
(Koma Script) defines it as:Note that Koma Script has added other keywords such as
dedication
,publisher
, which were not provided byartcle
class. One might ask, why only these additional keywords? What if I need others?Note that the macro on ConTeXt wiki for document titles is pretty similar to the LaTeX implementation. It is also configurable. For example, I can use:
which will typeset the title in blue color and the author in italic font. The Koma Script classes provide additional commands (and hence additional lines of code) to provide this flexibility.
When it comes to document preparation, LaTeX and ConTeXt are quite similar; both use high-level markup and assume that a style file is available to take care of the formatting. The difference is that LaTeX assumes that the user who is preparing the document is different from the user who created the style file; so very little high-level commands are provided to tweak the default styles. ConTeXt assumes that the user who is preparing the document is the same as the user who is creating the style file; and provides high-level commands to tweak the default styles.
The other difference is that of culture. The LaTeX community releases a lot of packages; but the ConTeXt community releases relatively few packages. For example, you would not have complained if the code for document titles from the ConTeXt wiki had been released as a ConTeXt package.