Difference between revisions of "Modules"
m (Installing contributed modules) |
m (Installing contributed modules) |
||
Line 47: | Line 47: | ||
File names of included modules start with "m-", but third party (contributed) modules should start with "t-". | 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== | ==Special Purpose Modules== |
Revision as of 07:04, 28 May 2009
Modules are extensions to ConTeXt's core functions.
There are not as many modules for ConTeXt as packages for LaTeX, because a lot of LaTeX package features are in ConTeXt's core.
Contents
Included modules:
- t-bib: Bibliography (maintained by Taco)
- m-arabtex: loading of Lagally's ArabTeX
- m-chart: Flow Charts
- m-chemic: PPCHTeX (chemical structure formulae)
- m-cweb: CWEB pretty printing
- m-database: creating simple tables (or forwarding data to user-defined commands) using comma/space/tab-separated values
- m-dratex: loading of DraTeX
- m-edtsnc: support for editor synchronization, will replace m-pdfsync
- m-educat: educational additions (for settings school tests or questionaires)
- m-gamma: Omega support
- m-graph: support for MetaPost graph module
- m-layout: defines some Layout presets
- m-level: module for catching nesting errors
- m-narrowtt: using a narrower Latin Modern font for verbatim
- m-newmat: support for some AMSmath features, is loaded by amsl, see Math with newmat
- m-pdfsnc: editor/PDF synchronization support (used by iTeXMac and TeXShop)
- m-pictex: needed for PicTeX without eTeX
- m-plus: loads some extra features (currently empty)
- m-pstric: connection macros for PSTricks (PostScript tricks)
- m-r: typing and executing R scripts
- m-quest: module for fill-in forms (dutch only)
- m-steps: Step Charts, see XML step charts
- m-streams: Synchronised typesetting from different sources
- m-subsub: Defines 5 extra sectioning levels
- m-tex4ht: convert a ConTeXt document to html, more about it on tex4ht
- m-tryout: Contains temporary functions for testing
- m-units: Structured input of values with units
- m-visual: Visual Debugging (described in This Way no.7 Faking Text and More)
Contributed modules:
For a list of contributed modules see the modules section on contextgarden.net.
TODO: list more modules or none of them (See: To-Do List) |
- xdesc (extended description, e.g. for epigrams)
- nath (natural math, see Math)
- 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)
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 $TEXMF/tex/context/third
then run luatools --generate
.
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.
- MyWay User documentation on ConTeXt
- pracjourn Articles for The PracTeX Journal
- maps Articles for MAPS, the publication of NTG (Nederlandstalige TeX Gebruikersgroep or Netherlands TeX Group)
Modules writing guidelines
Prior to release 2005.05.25, ConTeXt silently truncated all file names in \usemodule commands to 8 characters long and lowercased them to "prevent cross platform problems with filenames". 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 found.
TODO
Each module should have an associated specification file (as in /tex/context/interface/cont-en.xml). Probably one day this will become a part of texshow and will also be easy-to-edit.
When documenting your module, you can use
\usemodule[int-load] %Allow xml parsing \loadsetups[m-name-of-your-module.xml] % to load the file with definitions \setup{nameofyourcommand}
An example:
\usemodule[int-load] \loadsetups \setup{externalfigure}
By default, this places a frame around the setup. If you want to get gray backgroud, as in context documentation, add the following
\setupframedtexts [setuptext] [background=screen, frame=off]