Changes

Jump to navigation Jump to search
11,012 bytes added ,  11:39, 20 December 2023
Checkouts work now; hint about dev ML.
< [[The ConTeXt Way]]Modules are extensions to ConTeXt’s core functions.
Modules There are extensions to not as many modules for ConTeXt's as packages for LaTeX, because ConTeXt’s core functionsalready contains a lot that needs a package in LaTeX.
There are not as many modules for ConTeXt as packages for LaTeX, because a lot of LaTeX package features are in ConTeXt's core.=Installation=
==Installation== ===Basics===
The installation of extra files in TeX (called modules in ConTeXt) can be difficult
* 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, createthe subdirectories in the way described above and place the file there.
===Installation by hand===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.
When you want to install a new module which is available as file only createAfter the subdirectories in the way described above and place the file therefiles are installed, formodules which are available as zip files with precreated subdorectories youmust update ConTeXt’s database to let it know where it can unzip the archive in find the top-level directory (e.g. texmf-local/) and allfiles are on the correct place.:
After the files are placed at the right place you have to update TeX's databaseto let it know where it can find the files, this is done for MkII with context --generate
mktexlsr (command name depends on the TeX distributionConTeXt doesn’t use `ls-R` files or `kpsewhich` any more.)
and for MkIV with==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:  context mtxrun --script install-modules --install --all Previously, the ConTeXt LMTX distribution did not provide a built-generatein 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 <tt>install.sh</tt>.
===ConTeXt standalone===Because the final <tt>tex/texmf-modules</tt> must contain the union of all individual module directories, the commands create and leave an intermediate <tt>modules</tt> directory that wastes less than 50 MB.
Users of # Synchronize all modules from ConTeXt Garden in the ConTeXt standalone (formerly "'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") distribution don't have to download /current/modules/ modules # Create the module files and unzip them union of all modules in tex/texmf-modules (the local directoryis created if it doesn’t exist). # If you have personal modules in tex/texmf-modules, because they can use 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 <tt>firstnext update. # rm -setup</tt> script for thisrf modules # Update the ConTeXt file database. mtxrun --generate
To install for example the simpleslides modules you write
first-setup.sh --modules="t-simpleslides"=Installation by script (MkIV) ==
To Users of the ConTeXt MkIV standalone can use the <tt>first-setup</tt> script to install more modules at the same time write:
first-setupE.sh --g. to install the simpleslides modules="t-simpleslides,t-french":
The complete list of availables first-setup.sh --modules in standalone is:="t-simpleslides"
* [http://modules.contextgarden.net/account t-account] draw T-accounts* [http://modules.contextgarden.net/algorithmic t-algorithmic] like LaTeX algorithmic* [http://modules.contextgarden.net/animation t-animation] create animations* [http://modules.contextgarden.net/annotation t-annotation] todo lists* [http://modules.contextgarden.net/t-bnf t-bnf] BNF grammar* [http://modules.contextgarden.net/chromato t-chromato] chromatograms* [http://modules.contextgarden.net/cmscbf t-cmscbf] bold small caps* [http://modules.contextgarden.net/cmttbf t-cmttbf] bold typewriter* [http://modules.contextgarden.net/t-construction-plan t-construction-plan] figures with defined scale* [http://modules.contextgarden.net/t-degrade t-degrade] degrading JPEG images* [http://modules.contextgarden.net/fancybreak t-fancybreak] thought breaks* [http://modules.contextgarden.net/filter t-filter] run external programs on inline code* [http://modules.contextgarden.net/fixme t-fixme] like LaTeX fixme* [http://modules.contextgarden.net/t-french t-french]* [http://modules.contextgarden.net/fullpage t-fullpage]* [http://modules.contextgarden.net/games t-games] board games* [http://modules.contextgarden.net/gantt t-gantt] Gantt charts* [http://modules.contextgarden.net/gnuplot t-gnuplot] include GNUplot graphics* [http://modules.contextgarden.net/t-layout t-layout]* [http://modules.contextgarden.net/letter t-letter] formal letters* [http://modules.contextgarden.net/t-lettrine t-lettrine] decorative paragraph starts (initials)* [http://modules.contextgarden.net/t-lilypond t-lilypond] include musical scores with GNU LilyPond* [http://modules.contextgarden.net/mathsets t-mathsets] mathematical sets, probabilities etc.* [http://modules.contextgarden.net/pararef t-pararef] {{cmd|startParagraph|link=no}}, for paragraphs as ‘thought blocks’ that may contain To install more than one 'TeX paragraph'. These paragraphs are numbered and can be referenced. See [[Paragraph Referencing]].* t-pgfplots* [http://modules.contextgarden.net/ruby t-ruby] Ruby markup (for Chinese, not programming language)* [http://modules.contextgarden.net/simplefonts t-simplefonts] simplified font mechanism* [http://modules.contextgarden.net/simpleslides t-simpleslides] presentations* [http://modules.contextgarden.net/typearea t-typearea] like LaTeX/KoMa typearea* [httpat the same time://modules.contextgarden.net/typescripts t-typescripts] collection of typescripts* [http://modules.contextgarden.net/urwgaramond t-urwgaramond]* [http://modules.contextgarden.net/urwgothic t-urwgothic]* [http://modules.contextgarden.net/vim t-vim] syntax highlighting using vim’s syntax files
(some of these are obsolete first-setup...)sh --modules="t-simpleslides,t-french"
===TeX Live===
TeX Live is a large TeX distribution for most Linux and BSD based common operating systems. It provides binaries and many other files necessary to run TeX and its flavors. Many ConTeXt modules are included.
<!--
The following modules are available:
* context-typearea
* context-vim
-->
==Usage==
When you load a module with <code>\usemodule[modulename]</code> ConTeXt looks for a file with the following names:
* m-modulaname modulename (core module)
* p-modulename (private module)
* s-modulename (ConTeXt style file)
* x-modulename (XML module)
* t-modulename (Third "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 file files with the same name but different prefixes , you can tell ConTeXt which file it should load with
<code>\usemodule[<prefix>][modulename]</code>
==Included Modules=as of 2023-09-30 ==Macro modules== * {{code|x-asciimath}} ({{src|x-asciimath.mkxl}} etc.): Support for [http://asciimath.org/ ASCII math] input (used by [https://www.math4all.nl/ math4all])* {{code|m-asymptote}} ({{src|m-asymptote.mkiv}}): Inclusion of Asymptote code* {{code|m-barcodes}} ({{src|m-barcodes.mkiv}} {{src|m-barcodes.mkxl}}): generate [[Barcodes|barcodes]] using PStricks (MkIV), redirects to `m-zint` in LMTX.* {{code|x-calcmath}} ({{src|x-calcmath.mkxl}} {{src|x-calcmath.lmt}} etc.): calculator math syntax* {{code|x-cals}} ({{src|x-cals.mkiv}} {{src|x-cals.lua}}): XML cals table renderer* {{code|m-catchword}} ({{src|m-catchword.mkiv}}): show the first word of the next page in the footer (like in medieval manuscripts; Custode, Reklamante, Blatthüter)* {{code|m-chart}} ({{src|m-chart.lua}} {{src|m-chart.mkvi}}): [[Flow Charts]]* {{code|m-chemic}} ({{src|m-chemic.mkiv}}): dummy module, since [[Chemistry|PPCHTeX]] (chemical structure formulae) is now built in* {{code|x-chemml}} ({{src|x-.mkiv}} {{src|x-.lua}}): [[ChemML]] syntax support* {{code|m-circuitikz}} ({{src|m-circuitikz.mkiv}} {{src|m-circuitikz.mkxl}}): drawing circuits with [[TikZ]]* {{code|m-compatible}} ({{src|m-compatible.mkiv}}): compatibility for older versions (unattended since 2018)* {{code|m-crappyspec}} ({{src|m-crappyspec.mkxl}}): limit text to a certain number of characters per line* {{code|x-ct}} ({{src|x-ct.mkiv}} {{src|x-ct.lua}}): tabulate and combination structures in XML* {{code|m-cweb}} ({{src|m-cweb.mkiv}}): [[CWEB]] pretty printing* {{code|m-database}} ({{src|m-database.lua}} {{src|m-database.mkiv}}): creating simple tables (or forwarding data to user-defined commands) using comma/space/tab-separated values. Wiki: [[M-database]].* {{code|m-directives}} ({{src|m-directives.mkiv}}): just calls {{cmd|showdirectives}}* {{code|m-educat}} ({{src|m-educat.mkiv}}): educational additions (for settings school tests or questionaires)* {{code|x-entities}} ({{src|x-entities.mkiv}}): load character entities for HTML interpretation* {{code|m-escrito}} ({{src|m-escrito.mkiv}} {{src|m-escrito.lua}}): limited PostScript interpreter* {{code|m-examn}} ({{src|m-examn.mkiv}}): testing and examination in JavaScript (outdated)* {{code|m-fields}} ({{src|m-fields.mkiv}}): fill-in form field with JS check* {{code|m-format}} ({{src|m-format.mkiv}}): for formatting poetry (very old code)* {{code|x-foxet}} ({{src|x-foxet.mkiv}}): support for formatting objects, not usable* {{code|m-gimmicks}} ({{src|m-gimmicks.mkxl}}): “whatever comes up” (?)* {{code|m-gnuplot}} ({{src|m-gnuplot.mkxl}}): limited support for GNUplot via SVG* {{code|m-graph}} ({{src|m-graph.mkiv}} {{src|mp-grap.mpiv}}): support for [[MetaPost]] graph module* {{code|m-hemistich}} ({{src|m-hemistich.mkiv}}): hemistiches (half-line poetry)* {{code|x-html}} ({{src|x-html.mkiv}}): [[HTML|HTML_to_ConTeXt]] setup* {{code|m-ipsum}} ({{src|m-ipsum.mkiv}}): lorem ipsum filler text with options* {{code|m-json}} ({{src|m-json.mkiv}} {{src|m-json.mkxl}} {{src|util-jsn.lua}}): activates Lua functions to interprete JSON* {{code|m-layout}} ({{src|m-layout.mkiv}}): defines some [[Layout]] presets* {{code|x-ldx}} ({{src|x-ldx.mkiv}} {{src|x-ldx.ctx}} {{src|x-ldx.lua}}): Lua source code formatter* {{code|x-lmx-html}} ({{src|x-lmx-html.mkiv}} {{src|x-lmx-demo.mkiv}}): interpretation of filled-in HTML forms* {{code|m-logcategories}} ({{src|m-logcategories.mkiv}}): just calls {{cmd|showlogcategories}}* {{code|m-mathcrap}} ({{src|m-mathcrap.mkiv}}): use Unicode super-/subscripts in math (not recommended)* {{code|m-mathfun}} ({{src|m-mathfun.mkxl}}): “weird stuff” (?)* {{code|x-mathml}} ({{src|x-mathml.mkxl}} {{src|x-mathml.lmt}} {{src|x-mathml.mkiv}} {{src|x-mathml.lua}} {{src|x-mathml-basics.mkiv}}): [[MathML]] syntax support* {{code|x-mathml-html}} ({{src|x-mathml-html.mkiv}}): [[MathML]] syntax, support for some HTML tags* {{code|x-math-svg}} ({{src|x-math-svg.mkiv}} {{src|x-math-svg.lua}}): convert [[MathML]] to [[SVG]]* {{code|m-oldmath}} ({{src|m-oldmath.mkxl}}): support for some obsolete math commands like `\over`* {{code|m-matrix}} ({{src|m-matrix.mkiv}}): calculation and typsetting of [[Matrix_in_maths|matrices]]* {{code|m-maybe}} ({{src|m-maybe.mkiv}}): experimental code* {{code|m-media}} ({{src|m-media.mkiv}}): support for SWF and U3D (deactivated)* {{code|m-mkii}} ({{src|m-mkii.mkiv}}): re-activate some MkII font switches (no general MkII compatibility)* {{code|m-mkivhacks}} ({{src|m-mkivhacks.mkiv}}): temporary hacks* {{code|m-morse}} ({{src|m-morse.mkvi}}): convert text to Morse code and back* {{code|m-narrowtt}} ({{src|m-narrowtt.mkiv}}): using a narrower [[Latin Modern]] font for verbatim* {{code|m-nodechart}} ({{src|m-nodechart.mkvi}} {{src|m-nodechart.lua}}): extension for `m-chart` ([[Flow Charts]])* {{code|m-ntb-to-xtb}} ({{src|m-ntb-to-xtb.mkiv}}): map [[TABLE]] to [[xtables]]* {{code|m-obsolete}} ({{src|m-obsolete.mkiv}}): print obsolete module warning* {{code|m-old-columnsets}} ({{src|m-old-columnsets.mkiv}} {{src|page-set.mkiv}}): activates old [[Columns|columsets]] code* {{code|m-old-multicolumns}} ({{src|m-old-multicolumns.mkiv}} {{src|page-mul.mkiv}}): activates old [[Columns|multicolumn]] code* {{code|m-oldfun}} ({{src|m-oldfun.mkiv}}): old implementation of initials (drop caps) etc. (current: {{cmd|setupinitial}})* {{code|m-oldnum}} ({{src|m-oldnum.mkiv}}): old implementation of {{cmd|digit}}* {{code|m-openstreetmap}} ({{src|m-openstreetmap.mkxl}} {{src|m-openstreetmap.lmt}}): limited OSM XML renderer (no labels)* {{code|x-pandoc}} ({{src|x-pandoc.mkiv}}): Pandoc [[DocBook]] rendering (misleading name)* {{code|x-pfs-01}} ({{src|x-pfs-01.mkiv}}): [https://www.pfsense.org/ pfsense] status rendering* {{code|x-physml}} ({{src|x-physml.mkiv}}): [[PhysML]] syntax support* {{code|m-pictex}} ({{src|m-pictex.mkiv}}): [[PicTeX]] support for MkIV; not supported in LMTX any more* {{code|m-pipemode}} ({{src|m-pipemode.mkiv}}): disables directive `system.errorcontext` ({{cmd|disabledirective}})* {{code|m-polynomial}} ({{src|m-polynomial.mkxl}}): typesetting of polynomials* {{code|m-pstricks}} ({{src|m-pstricks.lua}} {{src|m-pstricks.mkiv}}): PStricks support for MkIV; not supported in LMTX any more* {{code|m-punk}} ({{src|m-punk.mkiv}}): support for the Punk metapost font* {{code|m-scite}} ({{src|m-scite.mkiv}}): syntax highlighting with [[Scite|SciTE]] lexers* {{code|x-setups}} ({{src|x-setups.mkiv}} etc.): load and typeset command syntax from interface files* {{code|m-simulate}} ({{src|m-simulate.mkiv}}): fake words, similar to `m-visual`’s {{cmd|fakewords}}* {{code|m-spreadsheet}} ({{src|m-spreadsheet.lua}} {{src|m-spreadsheet.mkiv}}): calculations in tables* {{code|m-sql}} ({{src|m-sql.mkiv}} {{src|util-sql.lua}}): access to SQL databases* {{code|m-steps}} ({{src|m-steps.lua}} {{src|m-steps.mkvi}} {{src|x-steps.mkiv}}): Step Charts, see [[XML]] step charts* {{code|m-subsub}} ({{src|m-subsub.tex}}): Defines subsections up to level 12; obsolete, part of the core* {{code|m-svg}} ({{src|m-svg.mkxl}}): auxiliary functions for [[SVG]] rendering via MetaPost* {{code|m-system-aliasing}} ({{src|m-system-aliasing.mkiv}}): support for file aliases incl. globbing (?)* {{code|m-system-readers}} ({{src|m-system-readers.mkxl}}): reading from files* {{code|m-three}} ({{src|m-three.mkiv}} {{src|mp-tres.mpiv}}): support for pseudo-3D projections with Metapost module `tres`* {{code|m-tikz}} ({{src|m-tikz.mkiv}} {{src|m-tikz.mkxl}}): [[TikZ]] support* {{code|m-tikz-pgfplots}} ({{src|m-tikz-pgfplots.tex}}): [[TikZ]] support* {{code|m-tikz-pgfplotstable}} ({{src|m-tikz-pgfplotstable.tex}}): [[TikZ]] support* {{code|m-timing}} ({{src|m-timing.mkiv}} {{src|m-timing.mkxl}}): where does TeX spend its processing time?* {{code|m-trackers}} ({{src|m-trackers.mkiv}}): just calls {{cmd|showtrackers}}* {{code|m-translate}} ({{src|m-translate.mkiv}}): text replacements* {{code|m-typesetting}} ({{src|m-typesetting.mkiv}}): sample pages for documentation (?)* {{code|x-udhr}} ({{src|x-udhr.mkiv}}): typeset the declaration of human rights in several languages as Unicode test files ([http://unicode.org/udhr/ UDHR])* {{code|m-units}} ({{src|m-units.mkiv}}): Structured input of values with [[units]]; obsolete, part of the core* {{code|m-visual}} ({{src|m-visual.mkiv}}): [[Visual Debugging]] (described in [[This_Way_-_My_Way#ThisWay|ThisWay]] no.7 [[magazine:0007|Faking Text and More]])* {{code|x-xfdf}} ({{src|x-xfdf.mkiv}}): support for XFDF (XML Forms Data Format, PDF form exports) files* {{code|m-zint}} ({{src|m-zint.mkiv}}): Generate [[Barcodes|barcodes]] using [http://www.zint.org.uk zint] <!--* {{code|m-}} ({{src|m-.mkxl}}):* {{code|x-}} ({{src|x-.mkiv}} {{src|x-.lua}}):
these are outdated or part of the core:* [[source:t{{code|bibl-bib.texlua}} ({{src|tbibl-bib]].mkiv}}): [[Bibliography]] (maintained by Taco)
* {{code|m-arabtex}} ({{src|m-arabtex.mkii}}): loading of Lagally's [[Arabian and Hebrew|ArabTeX]]
* {{code|m-barcodes}} ({{src|m-barcodes.mkiv}}): generate barcodes using PStricks. You should probably use m-zint instead.
* {{code|m-chart}} ({{src|m-chart.lua}} {{src|m-chart.mkii}} {{src|m-chart.mkvi}}): [[Flow Charts]]
* {{code|m-chemic}} ({{src|m-chemic.mkii}} {{src|m-chemic.mkiv}}): [[Chemistry|PPCHTeX]] (chemical structure formulae)
* {{code|m-cweb}} ({{src|m-cweb.tex}}): [[CWEB]] pretty printing
* {{code|m-database}} ({{src|m-database.lua}} {{src|m-database.mkii}} {{src|m-database.mkiv}}): creating simple tables (or forwarding data to user-defined commands) using [[m-database|comma/space/tab-separated values]]
* {{code|m-datastrc}} ({{src|m-datastrc.tex}}):
* {{code|m-directives}} ({{src|m-directives.mkiv}}):
* {{code|m-dratex}} ({{src|m-dratex.mkii}}): loading of DraTeX
* {{code|m-edtsnc}} ({{src|m-edtsnc.mkii}}): support for editor synchronization, will replace m-pdfsync
* {{code|m-educat}} ({{src|m-educat.tex}}): educational additions (for settings school tests or questionaires)
* {{code|m-fields}} ({{src|m-fields.mkiv}}):
* {{code|m-format}} ({{src|m-format.tex}}):
* <strike>[[source:m-gamma.tex|m-gamma]]: [[Aleph|Omega]] support</strike>
* {{code|m-graph}} ({{src|m-graph.mkii}} {{src|m-graph.mkiv}}): support for [[MetaPost]] graph module
* {{code|m-ipsum}} ({{src|m-ipsum.mkiv}}): lorem ipsum filler text
* {{code|m-layout}} ({{src|m-layout.tex}}): defines some [[Layout]] presets
* {{code|m-level}} ({{src|m-level.mkii}}): module for catching nesting errors
* {{code|m-logcategories}} ({{src|m-logcategories.mkiv}}):* <strike>{{code|m-markdown}} ({{src|m-markdown.lua}} {{src|m-markdown.mkiv}}):* {{code|m-mathcrap}} ({{src|m-mathcrap.mkiv}}):* {{code|m-mkii}} ({{src|m-mkii.mkiv}}):* {{code|m-mkivhacks}} ({{src|m-mkivhacks.mkiv}}):* {{code|m-morse}} ({{src|m-morse.mkvi}}):* {{code|m-narrowtt}} ({{src|m-narrowtt.tex}}): using a narrower [[Latin Modern]] font for verbatim</strike>
* {{code|m-newmat}} ({{src|m-newmat.tex}}): support for some AMSmath features, is loaded by [[Math with amsl|amsl]], see [[Math with newmat]]
* {{code|m-ntb-to-xtb}} ({{src|m-ntb-to-xtb.mkiv}}):
* {{code|m-obsolete}} ({{src|m-obsolete.mkii}} {{src|m-obsolete.mkiv}}):
* {{code|m-oldfun}} ({{src|m-oldfun.mkiv}}):
* {{code|m-oldnum}} ({{src|m-oldnum.mkiv}}):
* {{code|m-pdfsnc}} ({{src|m-pdfsnc.mkii}}): editor/PDF synchronization support (used by iTeXMac and TeXShop)
* {{code|m-pictex}} ({{src|m-pictex.tex}}): needed for [[PicTeX]] without eTeX
* <strike>[[source:m-plus.tex|m-plus]]: loads some extra features (currently empty)</strike>
* {{code|m-pstricks}} ({{src|m-pstricks.lua}} {{src|m-pstricks.mkii}} {{src|m-pstricks.mkiv}}):
* {{code|m-punk}} ({{src|m-punk.mkiv}}):
* <strike>[[source:m-quest.tex|m-quest]]: module for fill-in forms
* (dutch only)</strike>
* {{code|m-r}} ({{src|m-r.tex}}): typing and executing [http://www.r-project.org/ R] scripts
* {{code|m-spreadsheet}} ({{src|m-spreadsheet.lua}} {{src|m-spreadsheet.mkiv}}):
* {{code|m-steps}} ({{src|m-steps.lua}} {{src|m-steps.mkii}} {{src|m-steps.mkvi}}): Step Charts, see [[XML]] step charts
* {{code|m-streams}} ({{src|m-streams.tex}}): Synchronised typesetting from different sources
* {{code|m-subsub}} ({{src|m-subsub.tex}}): Defines 5 extra sectioning levels
* {{code|m-tex4ht}} ({{src|m-tex4ht.mkii}}): convert a ConTeXt document to html, more about it on [[tex4ht]]
* {{code|m-timing}} ({{src|m-timing.mkiv}}):> ==Style modules== * {{code|min `texmf-trackers}} ({{src|m-trackers.mkiv}})context/tex/context/modules/common`:* {{code|ms-translate}} ({{src|mcdr-translate00.mkivtex}}):CD-ROM cover style* {{code|ms-units}} ({{src|mfaq-units00.mkiitex}} {{src|mto `-units.mkiv}})03`: Structured input of values with [[units]]FAQ styles* {{code|ms-visual}} ({{src|mpre-visual00.mkiitex}} {{src|mto `-visual.mkiv}})96`: [[Visual Debugging]] Several old presentation styles (described replaced by the following) in [[This Way]] no.7 [[magazine`texmf-context/tex/context/modules/mkiv`:0007|Faking Text and More]])* {{code|ms-zint}} ({{src|mpresent-zint*.mkivtex}}): Generate barcodes using [http:Several presentation styles (examples in `texmf-context/doc/context/presentations/www.zint.org.uk zint.exe]examples`)
==Contributed Modules==For a list of contributed modules see [http://tlcontrib.metatex.org/ tlcontrib] and/or [http://modules.contextgarden.net the modules section] on contextgarden.net.… many more …
{{todo|=Contributed Modules=For a list more of contributed modules see [http://modules.contextgarden.net the modules or none of them}}section] on contextgarden.net:
* [http://modules.contextgarden.net/account t-account] draw T-accounts
* [http://modules.contextgarden.net/algorithmic t-algorithmic] like LaTeX algorithmic
* [http://modules.contextgarden.net/animation t-animation] create animations
* [http://modules.contextgarden.net/annotation t-annotation] todo lists
* [http://modules.contextgarden.net/t-bnf t-bnf] BNF grammar
* [http://modules.contextgarden.net/chromato t-chromato] chromatograms
* [http://modules.contextgarden.net/cmscbf t-cmscbf] bold small caps
* [http://modules.contextgarden.net/cmttbf t-cmttbf] bold typewriter
* [http://modules.contextgarden.net/t-construction-plan t-construction-plan] figures with defined scale
* [http://modules.contextgarden.net/t-degrade t-degrade] degrading JPEG images
* [http://modules.contextgarden.net/fancybreak t-fancybreak] thought breaks
* [http://modules.contextgarden.net/filter t-filter] run external programs on inline code
* [http://modules.contextgarden.net/fixme t-fixme] like LaTeX fixme
* [http://modules.contextgarden.net/t-french t-french]
* [http://modules.contextgarden.net/fullpage t-fullpage]
* [http://modules.contextgarden.net/games t-games] board games
* [http://modules.contextgarden.net/gantt t-gantt] Gantt charts
* [http://modules.contextgarden.net/gnuplot t-gnuplot] include GNUplot graphics
* [http://modules.contextgarden.net/t-layout t-layout]
* [http://modules.contextgarden.net/letter t-letter] formal letters AKA correspondence
* [http://modules.contextgarden.net/t-lettrine t-lettrine] decorative paragraph starts (initials)
* [http://ctan.org/pkg/markdown t-markdown] render markdown documents
* [http://modules.contextgarden.net/mathsets t-mathsets] mathematical sets, probabilities etc.
* [http://modules.contextgarden.net/pararef t-pararef] {{cmd|startParagraph|link=no}}, for paragraphs as ‘thought blocks’ that may contain more than one 'TeX paragraph'. These paragraphs are numbered and can be referenced. See [[Paragraph Referencing]].
* [http://modules.contextgarden.net/ruby t-ruby] Ruby markup (for Chinese, not programming language)
* [http://modules.contextgarden.net/simpleslides t-simpleslides] presentations
* [http://modules.contextgarden.net/typearea t-typearea] like LaTeX/KoMa typearea (MkII)
* [http://modules.contextgarden.net/vim t-vim] syntax highlighting using vim’s syntax files
 
<!--
* [[Extended description|xdesc]] (extended description, e.g. for epigrams)
* [[Math with nath|nath]] (natural math, see [[Math]])
* [[Math with amsl|amsl]] (AMSmath, see [[Math]])
* [[Gnuplot]]: support for direct inclusion of Gnuplot graphs out of the source (the module has been removed from the main distribution and will be included into third party modules again when ready)
* [[Modules/Karnaugh|Karnaugh]]: draws Karnaugh maps
-->
File names of included modules start with "m-", but third party (contributed) modules should start with "t-".
In order to install a contributed module, copy its directory into <code>$TEXMF/tex/context/third</code> then run <code>luatools --generate</code>. ==Special Purpose Modules==
The following modules implement special formatting requirement for journals or magazines. These modules are distributed with ConTeXt, so you need not download anything.
* [[Modules/This Way - My Way#MyWay|MyWayMy Way]] , User documentation on ConTeXt* `cgj` Articles for ConTeXt Journal (proceedings of ConTeXt meetings)
* [[Modules/Pracjourn|pracjourn]] Articles for [http://tug.org/pracjourn/ The PracTeX Journal]
* [[Modules/Maps|maps]] Articles for [http://www.ntg.nl/maps.html MAPS], the publication of NTG (Nederlandstalige TeX Gebruikersgroep or Netherlands TeX Group)
==Modules Module writing guidelines= '''Please don’t publish font support modules any more!''' They’re usually unnecessary. Instead publish [[Typescripts_examples|typescripts]] in the wiki instead. ==Module requirements== While a module usually consists of one main file with a name like <tt>t-modulename.[tex|ctx|mkiv|mkxl]</tt>, there can be many more files, and there should be some documentation. Please adhere to the filename conventions outlined in [#Usage]. Sort these files into folders according to TDS (TeX directory structure) – just have a look at the distribution to understand what goes where. * Module code and data files go into tex/context/third/modulename* Documentation files go into doc/context/third/modulename* You can also look at properly setup git repositories like that of [https://codeberg.org/fiee/context-simpleslides the simpleslides module]. === Module release file === * A release file is a ZIP archive that contains the necessary files in a TDS compliant structure.* The filename should be <code>t-modulename-version.zip</code>, where the version is usually a date like <tt>YYYY.MM.DD</tt> (but that’s up to you).* On the top level there must be a VERSION file that only contains your version string.* On the top level there should be a README(|.md|.txt) file with some metadata like a short description and author info.* On the top level there can be a LICENSE file containing the text of an open source license of your choice, if the license is not included in the README.* On the top level there must NOT be a folder with the module name, but only TDS folders like "doc" and "tex". The same applies for git/SVN repositories containing ConTeXt modules. VERSION and README files are important for publication on [https://ctan.org CTAN]. README is also displayed on git platforms like GitHub or Codeberg and should contain basic documentation. All top level files are ignored by the LMTX module installer. Instead of zip files, also tar.gz archives are possible, but the installer script can only handle zip – libzip is a necessary part of Lua(Meta)TeX, while other archive formats are not. === Module main file ===
===Module requirements===All modules module files should start with a block containing ''meta information'' about that module.There is a [[module Module template]] available to help setting up that header correctly. === License ===
Do not forget to specify a ''license'' as the permitted modes of distribution
Including the full text of your license in your source repo is best practice.
In order to avoid ''conflicting macros'' it is essential for a module that it adhere adheres
to the [[Module_Namespaces|namespace convention]].
After releasing a module its namespace[s] should be registered in the [[Module_Namespaces#List_of_Module_Namespaces|list]] for other module authors to know.
===XML Interface file=== 
Each module should have an associated XML specification file
(as in [http://source.contextgarden.net/tex/context/interface/cont-en.xml /tex/context/interface/cont-en.xml]).
Its purpose is a comprehensive listing of the optional and non-optional
arguments that a macro accepted by macros defined in the module accepts
From the interface a good deal of documentation can be auto-generated,
as are for instance the [http://pragma-ade.comnl/general/qrcs/setup-en.pdf ConTeXt Quick Reference]
and the initial input of the [http://wiki.contextgarden.net/Category:Reference/en Command Reference],
which itself started as a wikification of the now obsolete ''TeXShowTeXshow''.
When documenting your module, you can use
<texcode>
\usemodule[intsetups-loadbasics] %Allow xml parsing \loadsetups[mt-name-of-your-module.xml] % to load the file with definitions
\setup{nameofyourcommand}
</texcode>
<context source="yes">
\setuppapersize[A5]
\usemodule[intsetups-loadbasics]\loadsetups[i-framed]\setup{externalfiguresetupframed}
</context>
By default, this places a frame around the setup. If you want to get gray background, as in the context ConTeXt documentation, add the followinga setup like:
<texcode>
\setupframedtexts
[setuptext]
[background=screencolor, backgroundcolor=lightgray,
frame=off]
</texcode>
Apart from the existing XML files in the ConTeXt tree , there is little
documentation online, so feel free to relay your questions to
the [[Mailing list|mailing list]].
===Self-documenting source code=== 
Source files are supposed to contain explanatory comments that document
implementation details and other peculiarities the reader should be
aware of.
 
In <tt>.tex</tt> files (and other files containing primarily TeX code, e.g.
<tt>.mki[iv]</tt>) any line beginning with the comment leader <tt>%D</tt>
will be treated as such a docstring.
Formatting is done via ordinary TeX commands.
 
In Lua files (e.g. <tt>.cld</tt>) multi-line comments start with
<tt>--[[ldx--</tt> and end with <tt>--ldx]]--</tt>.
* [[source:x-ldx.ctx|<tt>x-ldx.ctx</tt>]] for Lua files, and
* [[source:s-mod.ctx|<tt>s-mod.ctx</tt>]] for TeX files.
 Thus, in order to generate the documentation for thehypothetical[https://bitbucket.org/wolfs/simplefonts/src ''simplefontssimple'']module you first have to `chdir ` to the <tt>files</tt> subdirectory of
your checkout.
 
Next you run the pretty printer on its main file
<pre>
context --ctx=s-mod t-simplefontssimple.tex
</pre>
to get a <tt>t-simplefontssimple.pdf</tt> which contains the &ndash; sparse
&ndash; annotations in serif and the actual code as colorful listing.
 
Likewise the processing of Lua code, e.g. <tt>[[source:font-def.lua|font-def.lua]]</tt> from
the main ConTeXt tree:
Which should generate a font-def.pdf in your current directory.
==Publication and maintenance== * Please upload your module(The autogenerated documentation of all s) to https://modules.contextgarden.net! Our server scripts handle distribution for ConTeXt sources and CTAN.* Register an account, then you can login to the “member section”.* If you lost your password, please ask Taco or Mojca (via the mailing list if you don’t know them).* Please read the help page (it’s mostly the same as here). * Create a '''new module''' entry with a distinct name (e.g. “simple”; this will become the internal ID) and fill in the metadata:** Title, e.g. “Simple” (This will get used in filenames!)** Short and longer description (the short one gets published e.g. in CTAN updates).** Home URL, if the module has beena homepage, e.g. a wiki page or git repository.** Keywords (for CTAN search)** Type: Macro or font (Please don’t publish font modules any more!)** Works with Mk... (please check)made available ** License (there are licenses missing, we need to fix that)** Check “Put in download section” (yes please, allows installation by Luigi at [httpscript)** Check “Put in ConTeXt distribution” (not sure if this works)** Check “Synch with CTAN” (yes please, makes it visible)** CTAN location://foundrye.supelecg.fr“<tt>/gfmacros/projectcontext/modulescontrib/context-simple</].tt>”Go there ** Comment: for examples of you or the outputserver admins* Create a '''new module version''' from a ZIP upload/download or checkout from SVN or git** Log message: short information about changes in this version** Version: usually YYYY.MM.)DD, but up to you** File upload / HTTP download URL: release file as ZIP, as outlined above** SVN/GIT URL: repository checkout, structured like the ZIP, as outlined above
===Legacy modules disclaimer===<!-- This info is obsolete, the section could be kicked outAs an module author, doesn’t it? -->Prior makes sense to subscribe to release ''2005the [https://mailman.05ntg.25'', ConTeXt silently truncated all file names in <cmd>usemodule<nl/mailman3/lists/cmd> commands to 8 characters long and lowercased them to "prevent cross platform problems with filenames"dev-context.ntg. Thus, module files that are to be used with older versions of ConTeXt must have filenames that fit those restrictions, or they will (somewhat cryptically) not be foundnl/ developers mailing list].

Navigation menu