ConTeXt, styled as ConT e Xt, is a tool for creating documents. Like LaTeX, it is based on the TeX typesetting system. ConTeXt is especially useful for creating structured documents, producing documents automatically, achieving detailed typography, and typesetting in many languages. It uses parts of TeX and a language for writing documents. ConTeXt has many features for designing text, such as tools for handling small typographic details, organizing footnotes, and using special font features. It also supports colors, backgrounds, hyperlinks, slideshows, combining text with images, and choosing which parts of a document to include. It allows users to control how documents look, while making it simple to create new designs without learning complex programming.
ConTeXt and LaTeX are similar, but their main goals are different. ConTeXt was designed from the start to give users direct and consistent access to advanced typographic tools, which is important for creating general-purpose documents. LaTeX, on the other hand, was originally created to hide typographic choices from users, which was helpful for tasks like submitting scientific articles to journals. While LaTeX has changed over time, ConTeXt’s unified design avoids problems that often happen with LaTeX, such as conflicts between different tools.
ConTeXt supports writing in English, Dutch, German, French, and Italian, and can create documents in many scripts, including those used in Western Europe, Eastern Europe, Arabic, Chinese, Japanese, and Korean. It also works with different versions of TeX, such as LuaTeX (MkIV) and LuaMetaTeX (LMTX). Older versions (MkII) used pdfTeX or XeTeX.
ConTeXt includes a drawing tool called MetaFun, which is an improved version of MetaPost. This tool helps users create backgrounds and decorative elements for pages. MetaFun can also be used directly with MetaPost. ConTeXt also supports other drawing tools, like PGF/TikZ and PSTricks.
ConTeXt includes a package for drawing chemical diagrams with TeX, called PPCHTeX, along with many other tools. This package can also be used with plain TeX and LaTeX.
Originally named pragmatex, ConTeXt was renamed in 1996 by Hans Hagen from PRAGMA Advanced Document Engineering (Pragma ADE), a company based in the Netherlands.
License
ConTeXt is software that can be used without cost. The program code (anything not in the /doc folder) is allowed to be used and shared freely under the GNU GPL license. The user guides are allowed to be shared and used under the Creative Commons Attribution NonCommercial ShareAlike license.
The official ConTeXt manual from 2001 and the official mini tutorial from 1999 are owned by Pragma. However, there is a place where future manuals can be found, released under the GNU Free Documentation License. As of April 2009, a current version of the chapters about fonts and typography is available.
Versions
The latest version of ConTeXt is called LMTX. It was released in April 2019 as the replacement for Mark IV (MkIV). Earlier versions, Mark II (MkII) and Mark I, are no longer updated or supported.
The developers explain that the main difference between LMTX and older versions is the use of a new software tool called LuaMetaTeX. This tool was created specifically for ConTeXt and has been greatly improved for its use. Before LMTX, MkIV used LuaTeX, and MkII used pdfTeX.
History
ConTeXt was created by Hans Hagen and Ton Otten of Pragma ADE in the Netherlands around 1991 because there was a need for educational typesetting materials.
In 1996, Hans Hagen gave the name ConTeXt, which means "text with tex" (con-tex-t; "con" is a Latin word meaning "together with"). Before 1996, ConTeXt was only used by Pragma ADE, but in 1996, it began to be used by more people.
In July 2004, a wiki page called contextgarden.net was created.
The low-level code for ConTeXt was originally written in Dutch. Around 2005, the developers started translating this code into English, which led to the version called MKII. This version is now stable and no longer changes.
In August 2007, Hans Hagen introduced the MKIV version. The first public beta of this version was released later that year.
At the ConTeXt User Meeting in 2008, Mojca Miklavec presented ConTeXt Minimals, a version of ConTeXt that includes the latest software and is designed to use less memory and bandwidth. In August 2008, this version was registered as a project on the Canonical Launchpad website.
In June 2008, Patrick Gundlach wrote the first post for the ConTeXt blog.
In July 2009, ConTeXt started using a git repository.
In November 2010, the ConTeXt Group was formed.
In April 2019, LMTX (ConTeXt LuaMetaTeX) was announced.
Example of code
Creating ConTeXt documents is straightforward: first, create a plain text file, then use the context script to process it. The outcome of this process is a PDF file (ConTeXt can also create a DVI file). An example is shown below.
ConTeXt documents use file extensions to indicate their type. The most common extension is .tex. Other extensions, such as .mkii, .mkiv, or .mkxl, are used for regular TeX versions. For versions that include additional features, such as support for named macro parameters alongside TeX’s numeric ones, the extensions .mkvi or .mklx are used.