Do I need to download a distribution -TeXLive or MiKTeX- to compile a ConTeXt code?


1 Answer 1


No. You don't even need to download anything. By the way, MiKTeX doesn't include a ConTeXt distribution, whereas TeXLive does. Some options for using ConTeXt are presented below:

  • As Marijn says, there's a standalone version available here. It includes ConTeXt LMTX (LuaMetaTeX) and ConTeXt MkIV (LuaTeX). I'd recommend this as it's updated at least once a week.
  • Another possibility, a bit rudimentary one, is ConTeXt Live. Nowadays it runs ConTeXt LMTX. It works for small documents and sometimes I use it for answers in this site.
  • Yet another possibility discovered by David Carlisle through abusing latexmk makes possible to compile ConTeXt files in Overleaf. However, TL 2020 (and some older versions) only includes ConTeXt MkII (pdfTeX/XeTeX) and ConTeXt MkIV (LuaTeX). LMTX isn't currently (2020) available. As for the trick itself, you need to create a latexmkrc file with the following content:
$pdflatex="context --result=output %S; cp output.log /compile/output.log;cp output.pdf /compile/output.pdf";
  • TeXLive.net runs TeX snippets, so you can also run small ConTeXt documents. Using the % !TEX context magic comment is mandatory so that the document isn't compiled as a LaTeX one. For an example, try https://texlive.net/run?%25%20!TEX%20context%0A%0A%5Cstarttext%0Ahello%0A%5Cstoptext%0A (courtesy of David Carlisle). It currently (March 2021) runs ConTeXt MkIV from TeXLive 2020.
  • There are Docker images too. Images are for LMTX, MkIV (current release or "beta") and MkIV (TL "stable", annual release). MkII isn't available. To be honest, I'm not familiar with Docker itself, so I cannot elaborate here.
  • 2
    @ljrk ConTeXt Live runs LMTX. TL 2020 doesn't include it. Docker images include MkIV and LMTX. Is that what you mean?
    – user226564
    Mar 6, 2021 at 23:42
  • Yup, perfect answer now!
    – ljrk
    Mar 7, 2021 at 9:44
  • @JairoA.delRio ConTeXt only work with MikTeX 2.9 , wiki.contextgarden.net/MikTeX Mar 13, 2021 at 21:32
  • @MamounMohammed I don't use MiKTeX nor Windows, so I cannot test it now. Are you having trouble with a double installation?
    – user226564
    Mar 13, 2021 at 21:39
  • 1
    @MamounMohammed I find your remarks strange and unexpected because I use ConTeXt on a daily basis and I know MiKTeX doesn't support it (maybe somewhere in the past it did, as mentioned in the link you share), but it isn't the case anymore. Furthermore, that info is outdated (current LuaTeX is 1.12)
    – user226564
    Mar 13, 2021 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .