Changes

Jump to navigation Jump to search
1,408 bytes added ,  15:10, 16 January 2011
→‎Modules writing guidelines: revised a bit; needs expanding
==Modules writing guidelines==
Prior to release 2005.05.25, ConTeXt silently truncated all file names in <cmd>usemodule</cmd> commands to 8 characters long and lowercased them to "prevent cross platform problems ===Module requirements===All modules should start with filenames"a block containing ''meta information'' about that module. Thus, There is a [[module files that are template]] available to be used with older versions of ConTeXt must have filenames help setting up that fit those restrictions, or they will (somewhat cryptically) not be foundheader correctly.
All modules should start with Do not forget to specify a block containing meta information about that module''license'' as the permitted modes of distributiondepend on which one you choose.The [http://wiki. There is contextgarden.net/Read_Me#The_Code ConTeXt sources] are licensedeither under GPLv2 or the LPPL, so you might want to stick to these or amore permissivelicense.(Choose one: [[module templatehttp://www.opensource.org/]] available to help setting that up correctly.)Including the full text of your license in your source repo is best practice.
<b>TODO</b>In order to avoid ''conflicting macros'' it is essential for a module that it adhere 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]). Probably one day this will become Its purpose is a comprehensive listing of the optional and non-optionalarguments that a macro defined in the module accepts.From the interface a part good deal of documentation can be auto-generated,as are for instance the [http://texshowpragma-ade.com/general/qrcs/setup-en.pdf ConTeXt Quick Reference]and the initial input of the [http://wiki.contextgarden.net/ texshowCategory:Reference/en Command Reference] and will also be easy-to-edit,which itself started as a wikification of the now obsolete ''TeXShow''.
When documenting your module, you can use
</context>
By default, this places a frame around the setup. If you want to get gray backgroudbackground, as in the context documentation, add the following
<texcode>
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 [[ConTeXt_Mailing_Lists|mailing list]].
 
===Legacy modules disclaimer===
<!-- This info is obsolete, the section could be kicked out, doesn’t it? -->
Prior to release ''2005.05.25'', ConTeXt silently truncated all file names in <cmd>usemodule</cmd> 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.
188

edits

Navigation menu