Difference between revisions of "Modules"

From Wiki
Jump to navigation Jump to search
m (→‎Special Purpose Modules: Added that these modules are part of ConTeXt)
Line 47: Line 47:
  
 
==Special Purpose Modules==
 
==Special Purpose Modules==
These modules implement special formatting requirement for journals or magazines.
+
The following modules implement special formatting requirement for journals or magazines. These modules are distributed with ConTeXt, so you need not download anything.
  
 
* [[Modules/MyWay|MyWay]] User documentation on ConTeXt
 
* [[Modules/MyWay|MyWay]] User documentation on ConTeXt

Revision as of 19:09, 25 December 2006

< The ConTeXt Way

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.

Included modules:

Contributed modules:

For a list of contributed modules see the modules section on contextgarden.net.

File names of included modules start with "m-", but third party (contributed) modules should start with "t-".


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 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]