[dev-context] What about dynamic documentation?

Patrick Gundlach patrick at gundla.ch
Thu Jul 20 22:09:38 CEST 2006


Long time ago, I wrote:

>>> 5 - The command variants might need specials (eg \setupinterlinespace).
>>
>> Yes, the current solution for that command is not very nice. But
>> there are more than a few commands with such variant calling
>> conventions, 

> I can only find setupinterlinespace in cont-en.xml. The xml-element is
> cd:choice, and only appears in that cmd. What others (undocumented)
> commands are there that have this?
>
>> and it is hard to come up with a nice-looking solution. Suggestions
>> for solutions are welcome.

>
> instead of 
>
> \setupinterlinespace[...]|[...,...=...,...]
> [...]	reset small medium big on off
> height	number
> depth	number
> line	dimension
> top	number
> bottom	number
>
> we could have two entries:
>
>
> \setupinterlinespace[...]
> [...]	reset small medium big on off
>
> \setupinterlinespace[...,...=...,...]
> height	number
> depth	number
> line	dimension
> top	number
> bottom	number


Could we split this up with variant="1" and variant="2"? (see attached
patch)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cont-en.xml-patch
Type: application/octet-stream
Size: 1065 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/dev-context/attachments/20060720/d79b2228/attachment.obj>
-------------- next part --------------


This would give:


<cd:command name="setupinterlinespace" variant="1">
  <cd:sequence>
    <cd:string value="setupinterlinespace"/>
  </cd:sequence>
  <cd:arguments>
    <cd:keywords optional="yes">
      <cd:constant type="reset"/>
      <cd:constant type="small" default="yes"/>
      <cd:constant type="medium"/>
      <cd:constant type="auto"/>
      <cd:constant type="big"/>
      <cd:constant type="on"/>
      <cd:constant type="off"/>
    </cd:keywords>
  </cd:arguments>
</cd:command>

<cd:command name="setupinterlinespace" variant="2">
  <cd:sequence>
    <cd:string value="setupinterlinespace"/>
  </cd:sequence>
  <cd:arguments>
    <cd:assignments list="yes">
      <cd:parameter name="height">
        <cd:constant type="cd:number"/>
      </cd:parameter>
      <cd:parameter name="depth">
        <cd:constant type="cd:number"/>
      </cd:parameter>
      <cd:parameter name="line">
        <cd:constant type="cd:dimension"/>
      </cd:parameter>
      <cd:parameter name="top">
        <cd:constant type="cd:number"/>
      </cd:parameter>
      <cd:parameter name="bottom">
        <cd:constant type="cd:number"/>
      </cd:parameter>
    </cd:assignments>
  </cd:arguments>
</cd:command>



Patrick

-- 
ConTeXt wiki and more: http://contextgarden.net


More information about the dev-context mailing list