I am learning to work with ConTeXt. At the moment I have the following
defined:
    \newdimen\CheckBoxMargin
    \CheckBoxMargin=2em
    \newdimen\CheckBoxWidth
    \CheckBoxWidth=2.5em
    \newdimen\CheckBoxDistance
    \CheckBoxDistance=.5em
    \definesymbol[CheckBox][{[~~~]}]
    \def\startcheckbox[#1]{
      \blank
      \leftaligned{#1}
      \startitemize[packed, intro, joinedup][margin=\CheckBoxMargin,
                    symbol=CheckBox, width=\CheckBoxWidth,
                    distance=\CheckBoxDistance]
    }

    \def\stopcheckbox{
      \stopitemize
      \blank
      \crlf
    }

    \def\GetNiveauOfService[#1]{
      \blank
      #1 {\switchtobodyfont[0.5em](1 = low, 9 = high)}
      \startitemize[packed, intro, joinedup, columns][n=9,
                    symbol=CheckBox, width=\CheckBoxWidth,
                    distance=\CheckBoxDistance]
      \dorecurse{9}{
        \item \recurselevel
      }
      \stopcheckbox
    }

I have a few questions about this.

In GetNiveauOfService 9 is used three times. I like DRY, so I was
wondering if there would be a better way to do this?

Next step would be that the number of checkboxes could be a parameter.
The default would be nine and if given, the given value would be used.
How would I do this?

Then the 'normal' checkboxes. The default is one column. But I would
like to have the possibility to use a parameter to for example make
checkboxes in three columns. How would I do this?

Lastly, in GetNiveauOfService there is text. How can I make this
language dependent. For example in English I want:
    (1 = low, 9 = high)
but in Dutch:
    (1 = weinig, 9 = veel)
and properly it would be a good idea to have two optional parameters
when you want other descriptions.
How would I do this?

-- 
Cecil Westerhof
M cldwester...@gmail.com

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Please do not send me Microsoft Office/Apple iWork documents.
Send OpenDocument instead! http://fsf.org/campaigns/opendocument/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to