ConTeXt MkIV online
Compile ConTeXt MkIV online in your browser: the frozen LuaTeX branch, kept for documents that were written for it.
Open in LaTeX.to Download the example (zip)
- Frozen, 2007
- Magic comment:
% !TeX program = context-mkivon the first line of main.tex, which is how the example picks it under Auto. - License: Public domain, use freely.
- Files:
main.tex
% !TeX program = context-mkiv % ConTeXt MkIV is the frozen branch of ConTeXt on the LuaTeX engine, kept % beside the current LMTX. The \starttext fingerprint always auto-detects to % the current ConTeXt, so MkIV has to be named: this magic comment, or the % engine dropdown. Everything else is the same setup-driven ConTeXt. \setuppapersize[A4] \setupbodyfont[modern,11pt] \setupwhitespace[medium] \starttext \startsection[title={Why ConTeXt MkIV}] MkIV is the ConTeXt of the LuaTeX years: the branch that first joined the TeX engine to Lua and OpenType fonts, and the one that years of existing documents, house styles and modules were written against. It is frozen now, and current development happens in LMTX, but it still compiles exactly as it always did, which is the whole point of keeping it. \stopsection \startsection[title={One consistent interface}] Everything that makes ConTeXt ConTeXt is already here. The page size came from \type{\setuppapersize}, the typeface from \type{\setupbodyfont}, and the paragraph spacing from \type{\setupwhitespace}. There is no document class and no package list, only the one family of setup commands. \startitemize \item Setups read almost like plain English options. \item Sensible defaults keep short documents short. \item Finer control is always one more setup command away. \stopitemize \stopsection \startsection[title={When to pick MkIV}] Choose it for a document or a house style that was written for MkIV and has not been moved yet, or when a module you depend on has no LMTX release. New documents should start on the current ConTeXt, whose engine, LuaMetaTeX, is leaner and actively developed. Because both branches share the \type{\starttext} fingerprint, MkIV is never picked automatically: the magic comment on the first line of this file, or the engine dropdown, is what selects it. \stopsection \stoptext
How to compile with ConTeXt (MkIV) on LaTeX.to
Everything runs in your browser: nothing to install, no login, no compile timeout.
- Click Open in LaTeX.to. The example opens as a project with main.tex in the editor and its finished PDF in the preview.
- Edit, then press Ctrl+Enter (Cmd+Enter on a Mac). The first compile downloads what this engine needs; after that a compile takes seconds.
What MkIV is
MkIV is the ConTeXt of the LuaTeX years: the branch that first married the TeX engine to Lua and OpenType fonts, and for more than a decade simply "ConTeXt". When the developers wrote their own engine, LuaMetaTeX, development moved to LMTX and MkIV was frozen. It still ships with TeX Live, it still compiles exactly what it compiled before, and it will not get new features.
The example on this page is a MkIV document. Apart from the first line it is indistinguishable from an LMTX document, because the language is the same; only the engine underneath differs, luatex here and luametatex on the current ConTeXt page.
When to use it
- A document, a house style or a module written against MkIV and not yet moved. Most MkIV documents compile unchanged on LMTX, but a long-lived book project is exactly where the differences bite.
- A module you depend on that has no LMTX release.
- Comparing output: if a page looks different under LMTX, compiling the same source under MkIV tells you whether the change is yours or the engine's.
- Not for anything new. The current ConTeXt is leaner, actively developed, and where every fix lands.
You have to name it
An LMTX document and a MkIV document look the same to a detector, no \documentclass and a \starttext, so Auto always picks the current branch. MkIV is reachable in two ways:
- The engine dropdown, under More engines and the Legacy heading.
- The magic comment on the first line of the file, which the example carries:
% !TeX program = context-mkiv
Good to know:
- It runs the
luatexbinary against a prebuilt MkIV format inside your browser; the first compile downloads the ConTeXt tree. - A typeface other than Latin Modern costs about a minute the first time, while MkIV reads the font files.
- To move a document to LMTX, change that first line to
% !TeX program = contextand read the log: Lua code that reached into LuaTeX internals and third-party modules are what usually needs a touch.
More engines: ConTeXt and all engines.