[dev-context] CSV, alpha 2 ;)

Aditya Mahajan adityam at umich.edu
Wed Jul 19 02:11:14 CEST 2006


On Tue, 11 Jul 2006, Taco Hoekwater wrote:

> For the bib module docs I have used a hack that goes like this:
>
>   \usemodule[int-load] % preload \loadsetups command
>   \def\loadsetups{}    % disable loading cont-en.xml
>   \usemodule[mod-01]
>   \startXMLmapping[zero]
>   \processXMLfilegrouped{t-bib.xml}
>   \stopXMLmapping
>
> It seems this part of the core needs a minor extension to make it easier
> to document modules (but it may be that you have that already :))

Well, after a suggestion from Mojca, the simplest way seems to the 
following

\usemodule[int-load]    %Allow context to parse xml markup
\loadsetups[arrows.xml] %Name of the file with xml markup

% Get gray backgrounds for setups
\setupframedtexts
    [setuptext]
    [background=screen,
     frame=off]


Then you can use \setup{command} to show its syntax.

\showsetup is just defined as

\def\showsetup#1%
   {{\def\y##1{\writestatus{setups}{warning: remove y! from #1}}%
     \setup{#1}}}

which seems to do some checking for commands that defined twice.

For the purpose of documenting modules one can even say

\let\showsetup\setup


Aditya


More information about the dev-context mailing list