Modules are extensions to ConTeXt’s core functions.
There are not as many modules for ConTeXt as packages for LaTeX, because ConTeXt’s core already contains a lot that needs a package in LaTeX.
Contents
Installation
Basics
The installation of extra files in TeX (called modules in ConTeXt) can be difficult for people who are new to TeX or are not themselves interested in TeX programming.
According to the TDS (TeX directory structure) and the ConTeXt developers, user-written files reside under the path
$TEXMF/tex/context/third/<modulename>/<files>
In the private TeX directory ($TEXMF), directories can have the names
- texmf-local
- texmf-extra
- texmf-project
but their existence depends on the TeX distribution; among these, texmf-local is the most common.
Installation by hand
When you want to install a new single-file module, create the subdirectories in the way described above and place the file there.
Most modules consist of several files though and are distributed as ZIP archives that contain the necessary TDS tree. These you can unzip in the top-level directory (e.g. texmf-local/), and all files should be in the correct place.
After the files are installed, you must update ConTeXt’s database to let it know where it can find the files:
context --generate
(ConTeXt doesn’t use ls-R files or kpsewhich any more.)
Installation by script (LMTX)
Since 2023-05, there’s a script for mtxrun to list and install modules, usually from https://modules.contextgarden.net. Some modules, get special treatment: For the TikZ modules files are downloaded from CTAN and patches for incompatibilities are applied.
First, cd into the tex directory of your ConTeXt LMTX installation (above the texmf-* trees), the modules installer works only there.
mtxrun --script install-modules --list
For the installation to work, you must change into the tex directory that contains the texmf-* trees.
mtxrun --script install-modules --install filter simpleslides
If you list single modules to install, leave out the prefix (t-* or whatever)!
But since there aren’t many, you can just install all modules:
mtxrun --script install-modules --install --all
Installation by script (old)
Previously, the ConTeXt LMTX distribution did not provide a built-in way to install or update modules.
Here’s a method using rsync, to be run from the toplevel directory of the ConTeXt LMTX distribution, i.e. the directory that contains install.sh.
Because the final tex/texmf-modules must contain the union of all individual module directories, the commands create and leave an intermediate modules directory that wastes less than 50 MB.
# Synchronize all modules from ConTeXt Garden in the 'modules' directory, which is created if it doesn’t exist. rsync --recursive --links --times --info=progress2,remove,symsafe,flist,del --human-readable --del rsync://contextgarden.net/minimals/current/modules/ modules # Create the union of all modules in tex/texmf-modules (the directory is created if it doesn’t exist). # If you have personal modules in tex/texmf-modules, they won’t be modified. mkdir -p tex rsync -rlt --exclude=/VERSION --del modules/*/ tex/texmf-modules # You may delete the 'modules' directory to reclaim some space or keep it to speed up the next update. # rm -rf modules # Update the ConTeXt file database. mtxrun --generate
Installation by script (MkIV)
Users of the ConTeXt MkIV standalone can use the first-setup script to install modules:
E.g. to install the simpleslides modules:
first-setup.sh --modules="t-simpleslides"
To install more modules at the same time:
first-setup.sh --modules="t-simpleslides,t-french"
TeX Live
TeX Live is a large TeX distribution for most common operating systems. It provides binaries and many other files necessary to run TeX and its flavors. Many ConTeXt modules are included.
Usage
When you load a module with \usemodule[modulename] ConTeXt looks for a file with the following names:
- m-modulename (core module)
- p-modulename (private module)
- s-modulename (ConTeXt style file)
- x-modulename (XML module)
- t-modulename ("third party" contributed module)
- modulename
Once a file is found, ConTeXt stops the search and loads the found file (only once).
When you have two files with the same name but different prefixes, you can tell ConTeXt which file it should load with
\usemodule[<prefix>][modulename]
Included Modules
as of 2023-09-30
Macro modules
-
x-asciimath( x-asciimath.mkxl etc.): Support for ASCII math input (used by math4all ) -
m-asymptote( m-asymptote.mkiv ): Inclusion of Asymptote code -
m-barcodes( m-barcodes.mkiv m-barcodes.mkxl ): generate Create barcodes using PStricks (MkIV), redirects tom-zintin LMTX. -
x-calcmath( x-calcmath.mkxl x-calcmath.lmt etc.): calculator math syntax -
x-cals( x-cals.mkiv x-cals.lua ): XML cals table renderer -
m-catchword( m-catchword.mkiv ): show the first word of the next page in the footer (like in medieval manuscripts; Custode, Reklamante, Blatthüter) -
m-chart( m-chart.lua m-chart.mkvi ): Flow charts -
m-chemic( m-chemic.mkiv ): dummy module, since PPCHTeX (chemical structure formulae) is now built in -
x-chemml( x-.mkiv x-.lua ): ChemML syntax support -
m-circuitikz( m-circuitikz.mkiv m-circuitikz.mkxl ): drawing circuits with TikZ -
m-compatible( m-compatible.mkiv ): compatibility for older versions (unattended since 2018) -
m-crappyspec( m-crappyspec.mkxl ): limit text to a certain number of characters per line -
x-ct( x-ct.mkiv x-ct.lua ): tabulate and combination structures in XML -
m-cweb( m-cweb.mkiv ): CWEB pretty printing -
m-database( m-database.lua m-database.mkiv ): creating simple tables (or forwarding data to user-defined commands) using comma/space/tab-separated values. Wiki: M-database . -
m-directives( m-directives.mkiv ): just calls \showdirectives -
m-educat( m-educat.mkiv ): educational additions (for settings school tests or questionaires) -
x-entities( x-entities.mkiv ): load character entities for HTML interpretation -
m-escrito( m-escrito.mkiv m-escrito.lua ): limited PostScript interpreter -
m-examn( m-examn.mkiv ): testing and examination in JavaScript (outdated) -
m-fields( m-fields.mkiv ): fill-in form field with JS check -
m-format( m-format.mkiv ): for formatting poetry (very old code) -
x-foxet( x-foxet.mkiv ): support for formatting objects, not usable -
m-gimmicks( m-gimmicks.mkxl ): “whatever comes up” (?) -
m-gnuplot( m-gnuplot.mkxl ): limited support for GNUplot via SVG -
m-graph( m-graph.mkiv mp-grap.mpiv ): support for MetaPost and MetaFun graph module -
m-hemistich( m-hemistich.mkiv ): hemistiches (half-line poetry) -
x-html( x-html.mkiv ): HTML_to_ConTeXt setup -
m-ipsum( m-ipsum.mkiv ): lorem ipsum filler text with options -
m-json( m-json.mkiv m-json.mkxl util-jsn.lua ): activates Lua functions to interprete JSON (part of the core, no need to load the module) -
m-layout( m-layout.mkiv ): defines some page layout presets -
x-ldx( x-ldx.mkiv x-ldx.ctx x-ldx.lua ): Lua source code formatter -
x-lmx-html( x-lmx-html.mkiv x-lmx-demo.mkiv ): interpretation of filled-in HTML forms -
m-logcategories( m-logcategories.mkiv ): just calls \showlogcategories -
m-mathcrap( m-mathcrap.mkiv ): use Unicode super-/subscripts in math (not recommended) -
m-mathfun( m-mathfun.mkxl ): “weird stuff” (?) -
x-mathml( x-mathml.mkxl x-mathml.lmt x-mathml.mkiv x-mathml.lua x-mathml-basics.mkiv ): MathML syntax support -
x-mathml-html( x-mathml-html.mkiv ): MathML syntax, support for some HTML tags -
x-math-svg( x-math-svg.mkiv x-math-svg.lua ): convert MathML to SVG -
m-oldmath( m-oldmath.mkxl ): support for some obsolete math commands like\over -
m-matrix( m-matrix.mkiv ): calculation and typsetting of Mathematics/Matrices -
m-maybe( m-maybe.mkiv ): experimental code -
m-media( m-media.mkiv ): support for SWF and U3D (deactivated) -
m-mkii( m-mkii.mkiv ): re-activate some MkII font switches (no general MkII compatibility) -
m-mkivhacks( m-mkivhacks.mkiv ): temporary hacks -
m-morse( m-morse.mkvi ): convert text to Morse code and back -
m-narrowtt( m-narrowtt.mkiv ): using a narrower Latin Modern font for verbatim -
m-nodechart( m-nodechart.mkvi m-nodechart.lua ): extension form-chart( Flow charts ) -
m-ntb-to-xtb( m-ntb-to-xtb.mkiv ): map |Natural tables with TABLE to Extreme tables with xtable -
m-obsolete( m-obsolete.mkiv ): print obsolete module warning -
m-old-columnsets( m-old-columnsets.mkiv page-set.mkiv ): activates old columsets code -
m-old-multicolumns( m-old-multicolumns.mkiv page-mul.mkiv ): activates old multicolumn code -
m-oldfun( m-oldfun.mkiv ): old implementation of initials (drop caps) etc. (current: \setupinitial ) -
m-oldnum( m-oldnum.mkiv ): old implementation of \digit -
m-openstreetmap( m-openstreetmap.mkxl m-openstreetmap.lmt ): limited OSM XML renderer (no labels) -
x-pandoc( x-pandoc.mkiv ): Pandoc DocBook rendering (misleading name) -
x-pfs-01( x-pfs-01.mkiv ): pfsense status rendering -
x-physml( x-physml.mkiv ): PhysML syntax support -
m-pictex( m-pictex.mkiv ): PicTeX support for MkIV; not supported in LMTX any more -
m-pipemode( m-pipemode.mkiv ): disables directivesystem.errorcontext( \disabledirective ) -
m-polynomial( m-polynomial.mkxl ): typesetting of polynomials -
m-pstricks( m-pstricks.lua m-pstricks.mkiv ): PStricks support for MkIV; not supported in LMTX any more -
m-punk( m-punk.mkiv ): support for the Punk metapost font -
m-scite( m-scite.mkiv ): syntax highlighting with SciTE lexers -
x-setups( x-setups.mkiv etc.): load and typeset command syntax from interface files -
m-simulate( m-simulate.mkiv ): fake words, similar tom-visual’s \fakewords -
m-spreadsheet( m-spreadsheet.lua m-spreadsheet.mkiv ): calculations in tables -
m-sql( m-sql.mkiv util-sql.lua ): access to SQL databases -
m-steps( m-steps.lua m-steps.mkvi x-steps.mkiv ): Step Charts, see XML step charts -
m-subsub( m-subsub.tex ): Defines subsections up to level 12; obsolete, part of the core -
m-svg( m-svg.mkxl ): auxiliary functions for SVG rendering via MetaPost -
m-system-aliasing( m-system-aliasing.mkiv ): support for file aliases incl. globbing (?) -
m-system-readers( m-system-readers.mkxl ): reading from files -
m-three( m-three.mkiv mp-tres.mpiv ): support for pseudo-3D projections with Metapost moduletres -
m-tikz( m-tikz.mkiv m-tikz.mkxl ): TikZ support -
m-tikz-pgfplots( m-tikz-pgfplots.tex ): TikZ support -
m-tikz-pgfplotstable( m-tikz-pgfplotstable.tex ): TikZ support -
m-timing( m-timing.mkiv m-timing.mkxl ): where does TeX spend its processing time? -
m-trackers( m-trackers.mkiv ): just calls \showtrackers -
m-translate( m-translate.mkiv ): text replacements -
m-typesetting( m-typesetting.mkiv ): sample pages for documentation (?) -
x-udhr( x-udhr.mkiv ): typeset the declaration of human rights in several languages as Unicode test files ( UDHR ) -
m-units( m-units.mkiv ): Structured input of values with units ; obsolete, part of the core -
m-visual( m-visual.mkiv ): Visual Debugging (described in ThisWay no.7 Faking Text and More ) -
x-xfdf( x-xfdf.mkiv ): support for XFDF (XML Forms Data Format, PDF form exports) files -
m-zint( m-zint.mkiv ): Generate barcodes using zint
Style modules
in texmf-context/tex/context/modules/common:
-
s-cdr-00.tex: CD-ROM cover style -
s-faq-00.texto-03: FAQ styles -
s-pre-00.texto-96: Several old presentation styles (replaced by the following)
in texmf-context/tex/context/modules/mkiv:
-
s-present-*.tex: Several presentation styles (examples intexmf-context/doc/context/presentations/examples)
… many more …
Contributed Modules
(as of 2025-09-01)
For a list of contributed modules see the modules section on contextgarden.net:
- account draw T-accounts (2009, but works with LMTX)
- algorithmic like LaTeX algorithmic (2013)
- animation create animations (2013)
- annotation todo lists (2013)
- aquamints AquaMints symbol support (2005, obsolete)
- basicexam typesetting exams in Chinese (2025)
- bnf BNF grammar (2006)
- cgj rewrite of the included module for the context group journal (2025)
- chat typesetting messenger chats (2024)
- chromato chromatograms (2008)
- cmscbf bold small caps (2006, outdated)
- cmttbf bold typewriter (2006, outdated)
- collating-marks collating marks (signature marks, DE Flattermarken) for multi-signature books (2023)
- calendar-examples Examples for the PocketDiary module (2023)
- construction-plan figures with defined scale (2008)
- crossref cross-document references (2012, obsolete)
- cyrillic numbers traditional Cyrillic numerals (2018, MkIV)
- date-driven-lists Extension for the PocketDiary module (2023)
- degrade downsampling (degrading) JPEG images (2009, outdated)
- enigma Enigma I cipher (2013)
- fancybreak thought breaks (2015)
- filter run external programs on inline code (2022, works with LMTX)
- folders draw directory trees (2025, LMTX)
- french settings for French documents (2011, obsolete)
- fullpage equal margins without \setuplayout (2017)
- gantt Gantt charts (2012)
- gnuplot include GNUplot graphics, context and tikz terminals (2013)
- Greek Ancient (polytonic) Greek support (2013, obsolete)
- handlecsv CSV support for mail merging etc. (2024)
- high syntax highlighting (2017; 2021 version )
- inifile .ini files (2008, outdated)
- karnaugh Karnaugh maps (2021)
- layout first version of \showlayout (2007, obsolete)
- letter formal letters AKA correspondence (2021, works with LMTX)
- letterspace letterspacing (2013, MkIV, obsolete)
- lua-widow-control automatical avoidance of widows and orphans in grid mode (2022, latest version )
- markdown render markdown documents (LaTeX: 2024, ConTeXt example is MkII)
- mathsets mathematical sets, probabilities etc. (2011, probably outdated)
- metaducks partial port of TikZducks to MetaPost (2023)
- pararef \startParagraph , for paragraphs as ‘thought blocks’ that may contain more than one 'TeX paragraph'. These paragraphs are numbered and can be referenced. See Paragraph referencing . (2012, probably obsolete)
- pandocxml Typeset Pandoc JSON documents with ConTeXt (2025, LMTX)
- pauta practise grids for medieval calligraphy (2024, LMTX)
- PocketDiary PocketMod-style (and other) calendars incl. sun & moon data (2023, LMTX)
- president “ConTeXt for pres(id)entations”, a few presentation styles with graphical progress indicator (2025, LMTX)
- PresVoz automatical PDF presentations with recorded voice (2024, LMTX, works only with Acrobat on Windows)
- pret-c syntax highlighting (pretty printing) for C (2010, outdated)
- rst RestructuredText support (2014, MkIV)
- simplebib simple bibliography (2012)
- simplefonts simple font support (2013, obsolete)
- simpleslides presentations (2023, works with LMTX)
- squares magic/Latin squares (2024)
- statistical-charts pie charts, bar charts etc. (2024)
- sudoku port of Peter Norvig’s sudoku solver (2023)
- title document title pages (2017)
- transliterator scientific transliteration of Russian, Church Slavonic etc. (2021)
- typearea like LaTeX/KoMa typearea (2008, MkII, obsolete)
- vim syntax highlighting using vim’s syntax files (2022, works with LMTX)
- visualcounter counters for presentations (2013; 2019 version )
- Extended description xdesc , e.g. for epigrams (2001)
Special Purpose Modules
The following modules implement special formatting requirement for journals or magazines. These modules are distributed with ConTeXt, so you don’t need to download anything.
- My Way , User documentation on ConTeXt
- cgj Articles for the ConTeXt Group Journal (proceedings of ConTeXt meetings) – new version 2025 WIP
- pracjourn Articles for The PracTeX Journal (obsolete, 2012)
- maps Articles for MAPS , the publication of NTG (Nederlandstalige TeX Gebruikersgroep or Netherlands TeX Group)
Module writing guidelines
(Section moved to ConTeXt and Lua programming/Module writing)