ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Making checkboxes
@ 2010-09-06  9:14 Cecil Westerhof
  2010-09-06 10:55 ` Wolfgang Schuster
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-06  9:14 UTC (permalink / raw)
  To: NTG ConTeXt mailing list

I am trying to define a (paper) feedback form. One of the things I
need is checkboxes. A first stab for this (for example I need also a
start text, but I do one step at a time) is, based on TeX by Topic, a
Texnician's Reference page 106:
    \def\checkBox#1,{\space\space\space\space[\space\space] #1\par}

    \def\checkBoxes(#1,){\xcheckBoxes#1, xxx,}
    \def\endpiece{xxx}
    \def\xcheckBoxes#1,{\def\temp{#1}%
      \ifx\temp\endpiece
      \else \checkbox#1,%
        \expandafter\xcheckBox
      \fi}

    \starttext

    Some text

    \checkBoxes Yes, No, A little bit,xxx

    \stoptext

I would expect:
    Some text
        [  ] Yes
        [  ] No
        [  ] A little bit
but I get:
    Some text
    es, No, A little bit,xxx

What am I doing wrong?

Something else: how do I 'eat' spaces between parameters. I would like
to have:
    \checkBoxes Yes,No,A little bit,xxx
and:
    \checkBoxes Yes, No,   A little bit,    xxx
the same result.

And is there a way to know how many parameters a macro gets? Like ${#}
in Bash. That would make things easier.

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06  9:14 Making checkboxes Cecil Westerhof
@ 2010-09-06 10:55 ` Wolfgang Schuster
  2010-09-06 11:50   ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: Wolfgang Schuster @ 2010-09-06 10:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.09.2010 um 11:14 schrieb Cecil Westerhof:

> I am trying to define a (paper) feedback form. One of the things I
> need is checkboxes. A first stab for this (for example I need also a
> start text, but I do one step at a time) is, based on TeX by Topic, a
> Texnician's Reference page 106:
>    \def\checkBox#1,{\space\space\space\space[\space\space] #1\par}
> 
>    \def\checkBoxes(#1,){\xcheckBoxes#1, xxx,}
>    \def\endpiece{xxx}
>    \def\xcheckBoxes#1,{\def\temp{#1}%
>      \ifx\temp\endpiece
>      \else \checkbox#1,%
>        \expandafter\xcheckBox
>      \fi}


\def\CheckBoxes[#1]%
  {\par
   \getcommalistsize[#1]% count the number of arguments
   \processcommalist[#1]\doCheckBoxes}

\def\doCheckBoxes#1%
  {\hskip1em[ ] #1\par}

The number of arguments is available with the command \commalistsize.

Wolfgang

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 10:55 ` Wolfgang Schuster
@ 2010-09-06 11:50   ` Cecil Westerhof
  2010-09-06 12:58     ` Wolfgang Schuster
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-06 11:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op maandag 6 sep 2010 12:55 CEST schreef Wolfgang Schuster:

> \def\CheckBoxes[#1]%
> {\par
> \getcommalistsize[#1]% count the number of arguments
> \processcommalist[#1]\doCheckBoxes}
>
> \def\doCheckBoxes#1%
> {\hskip1em[ ] #1\par}

I changed the code to:
    \def\CheckBoxes[#1]%
     {\par
      \getcommalistsize[#1]% count the number of arguments
      \processcommalist[#1]\doCheckBoxes}

    \def\doCheckBoxes#1%
     {\hskip1em[ ] #1\par}

    \starttext

    Some text

    \CheckBoxes{Yes, No, A little bit}

    \stoptext

But I get:
    Some text
    Yes, No, A little bit

When calling with:
    \CheckBoxes Yes, No, A little bit
I get:
    Some text
    es, No, A little bit

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 11:50   ` Cecil Westerhof
@ 2010-09-06 12:58     ` Wolfgang Schuster
  2010-09-06 13:34       ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: Wolfgang Schuster @ 2010-09-06 12:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.09.2010 um 13:50 schrieb Cecil Westerhof:

> Op maandag 6 sep 2010 12:55 CEST schreef Wolfgang Schuster:
> 
>> \def\CheckBoxes[#1]%
>> {\par
>> \getcommalistsize[#1]% count the number of arguments
>> \processcommalist[#1]\doCheckBoxes}
>> 
>> \def\doCheckBoxes#1%
>> {\hskip1em[ ] #1\par}
> 
> I changed the code to:
>    \def\CheckBoxes[#1]%
>     {\par
>      \getcommalistsize[#1]% count the number of arguments
>      \processcommalist[#1]\doCheckBoxes}
> 
>    \def\doCheckBoxes#1%
>     {\hskip1em[ ] #1\par}
> 
>    \starttext

How about this:

\def\CheckBoxes[#1]%
  {\startitemize[packed]
   \processcommalist[#1]\doCheckBoxes
   \stopitemize}

\def\doCheckBoxes#1%
  {\sym{\mathematics{\Box}}#1\par}

Wolfgang





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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 12:58     ` Wolfgang Schuster
@ 2010-09-06 13:34       ` Cecil Westerhof
  2010-09-06 15:55         ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-06 13:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

Op maandag 6 sep 2010 14:58 CEST schreef Wolfgang Schuster:

> How about this:
>
> \def\CheckBoxes[#1]%
> {\startitemize[packed]
> \processcommalist[#1]\doCheckBoxes
> \stopitemize}
>
> \def\doCheckBoxes#1%
> {\sym{\mathematics{\Box}}#1\par}

Does not work either.

I have now (I added a SimpleCheckBoxes that does reasonable what I
want, but where you always need three checkbox parameters):
    \def\SimpleCheckBoxes#1,#2,#3,#4\par{
      #1\par
      \hskip2.5em[\hskip1em] #2\par
      \hskip2.5em[\hskip1em] #3\par
      \hskip2.5em[\hskip1em] #4\par}

    \def\CheckBoxes[#1]%
     {\startitemize[packed]
      \processcommalist[#1]\doCheckBoxes
      \stopitemize}

    \def\doCheckBoxes#1%
     {\sym{\mathematics{\Box}}#1\par}

    \starttext

    Intelligent way\par
    \CheckBoxes Yes, No,   A little bit

    \blank
    Always three checkboxes and with the initial question\par
    \SimpleCheckBoxes Does this what you want?, Yes,   No, A little bit

    \stoptext

This gives:
    Intelligent way
    es, No, A little bit
    Always three checkboxes and with the initial question
    Does this what you want?
         [ ] Yes
         [ ] No
         [ ] A little bit

I attached the pdf also.


[-- Attachment #2: Generated pdf --]
[-- Type: application/pdf, Size: 26656 bytes --]

[-- Attachment #3: Type: text/plain, Size: 240 bytes --]


-- 
Cecil Westerhof
M CLDWesterhof@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/

[-- Attachment #4: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 13:34       ` Cecil Westerhof
@ 2010-09-06 15:55         ` Cecil Westerhof
  2010-09-06 16:37           ` Wolfgang Schuster
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-06 15:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I ran it with batchmode and silent, so I did not see errors, but it is
not correct.
I get:
    ! Use of \CheckBoxes doesn't match its definition.
    l.19 \CheckBoxes Y
                      es, No, A little bit

H gives:
    If you say, e.g., `\def\a1{...}', then you must always
    put `1' after `\a', since control sequence names are
    made up of letters only. The macro here has not been
    followed by the required stuff, so I'm ignoring it.

So '\def\CheckBoxes[#1]%' is wrong, but what should it be?

2010/9/6 Cecil Westerhof <cldwesterhof@gmail.com>:
> Op maandag 6 sep 2010 14:58 CEST schreef Wolfgang Schuster:
>
>> How about this:
>>
>> \def\CheckBoxes[#1]%
>> {\startitemize[packed]
>> \processcommalist[#1]\doCheckBoxes
>> \stopitemize}
>>
>> \def\doCheckBoxes#1%
>> {\sym{\mathematics{\Box}}#1\par}
>
> Does not work either.
>
> I have now (I added a SimpleCheckBoxes that does reasonable what I
> want, but where you always need three checkbox parameters):
>    \def\SimpleCheckBoxes#1,#2,#3,#4\par{
>      #1\par
>      \hskip2.5em[\hskip1em] #2\par
>      \hskip2.5em[\hskip1em] #3\par
>      \hskip2.5em[\hskip1em] #4\par}
>
>    \def\CheckBoxes[#1]%
>     {\startitemize[packed]
>      \processcommalist[#1]\doCheckBoxes
>      \stopitemize}
>
>    \def\doCheckBoxes#1%
>     {\sym{\mathematics{\Box}}#1\par}
>
>    \starttext
>
>    Intelligent way\par
>    \CheckBoxes Yes, No,   A little bit
>
>    \blank
>    Always three checkboxes and with the initial question\par
>    \SimpleCheckBoxes Does this what you want?, Yes,   No, A little bit
>
>    \stoptext
>
> This gives:
>    Intelligent way
>    es, No, A little bit
>    Always three checkboxes and with the initial question
>    Does this what you want?
>         [ ] Yes
>         [ ] No
>         [ ] A little bit
>
> I attached the pdf also.
>
>
>
> --
> Cecil Westerhof
> M CLDWesterhof@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/
>
>



-- 
Cecil Westerhof
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 15:55         ` Cecil Westerhof
@ 2010-09-06 16:37           ` Wolfgang Schuster
  2010-09-06 17:57             ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: Wolfgang Schuster @ 2010-09-06 16:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.09.2010 um 17:55 schrieb Cecil Westerhof:

> I ran it with batchmode and silent, so I did not see errors, but it is
> not correct.
> I get:
>    ! Use of \CheckBoxes doesn't match its definition.
>    l.19 \CheckBoxes Y
>                      es, No, A little bit
> 
> [...]
> 
> So '\def\CheckBoxes[#1]%' is wrong, but what should it be?


Use the command in the correct way: \CheckBoxes[Yes, No,   A little bit]

\def\CheckBoxes[#1]%
  {\startitemize[packed][margin=2.5em,width=2em]
   \processcommalist[#1]\doCheckBoxes
   \stopitemize}

\def\doCheckBoxes#1%
  {\sym{[\hspace[big]]}#1\par} % \hspace[big] = 1em


For a paragraph delimited version of \Checkboxes you can write

\def\CheckBoxes#1\par
  {\startitemize[packed][margin=2.5em,width=2em]
   \processcommalist[#1]\doCheckBoxes
   \stopitemize}

but this is not very context like.

Wolfgang

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 16:37           ` Wolfgang Schuster
@ 2010-09-06 17:57             ` Cecil Westerhof
  2010-09-06 18:29               ` Wolfgang Schuster
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-06 17:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op maandag 6 sep 2010 18:37 CEST schreef Wolfgang Schuster:

> Use the command in the correct way: \CheckBoxes[Yes, No, A little bit]
>
> \def\CheckBoxes[#1]%
> {\startitemize[packed][margin=2.5em,width=2em]
> \processcommalist[#1]\doCheckBoxes
> \stopitemize}
>
> \def\doCheckBoxes#1%
> {\sym{[\hspace[big]]}#1\par} % \hspace[big] = 1em

I start to understand it. Thanks.

I changed it a little. I implemented 'title'. And with startitemize I
got empty space between my 'title' and the checkboxes. So I coded it
like:
    \def\CheckBoxes[#1,#2]%
     {#1\par
      \processcommalist[#2]\doCheckBoxes
     }

    \def\doCheckBoxes#1%
     {\hskip2.5em[\hskip1em] #1\par
     }

    \starttext

    \CheckBoxes[Intelligent way, Yes, No, A little bit]
    \blank
    \CheckBoxes[Long list, First, Second, Thirth, Fourth, Fifth]
    \blank
    \CheckBoxes[Short list, Yes, No]

    \stoptext

Is there a way that I do not need al the '\blank' lines. After a
checkbox list, I always want an empty line.

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 17:57             ` Cecil Westerhof
@ 2010-09-06 18:29               ` Wolfgang Schuster
  2010-09-06 21:32                 ` Aditya Mahajan
                                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Wolfgang Schuster @ 2010-09-06 18:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1095 bytes --]


Am 06.09.2010 um 19:57 schrieb Cecil Westerhof:

> I start to understand it. Thanks.
> 
> I changed it a little. I implemented 'title'. And with startitemize I
> got empty space between my 'title' and the checkboxes.

The blank line comes from itemize, you can get rid of it with \startitemize[joinedup].

> So I coded it
> like:
>    \def\CheckBoxes[#1,#2]%
>     {#1\par
>      \processcommalist[#2]\doCheckBoxes
>     }
> 
> [...]
> 
> Is there a way that I do not need al the '\blank' lines. After a
> checkbox list, I always want an empty line.

Add \blank at the begin and end of your macro:

\def\CheckBoxes[#1][#2]%
  {\blank
   #1\par
   \processcommalist[#2]\...
   \blank}

I wonder why need this command when can get the same result with normal context commands:

\definesymbol[checkbox][{[~~~]}]
\defineitemgroup[checkbox]
\setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]

\starttext

\startcheckbox
\nop title
\item Yes
\item No
\item A little bit
\stopcheckbox

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1969 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 18:29               ` Wolfgang Schuster
@ 2010-09-06 21:32                 ` Aditya Mahajan
  2010-09-06 23:07                 ` Cecil Westerhof
  2010-09-07  7:18                 ` Cecil Westerhof
  2 siblings, 0 replies; 25+ messages in thread
From: Aditya Mahajan @ 2010-09-06 21:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 6 Sep 2010, Wolfgang Schuster wrote:

>
> Am 06.09.2010 um 19:57 schrieb Cecil Westerhof:
>
>> I start to understand it. Thanks.
>>
>> I changed it a little. I implemented 'title'. And with startitemize I
>> got empty space between my 'title' and the checkboxes.
>
> The blank line comes from itemize, you can get rid of it with \startitemize[joinedup].
>
>> So I coded it
>> like:
>>    \def\CheckBoxes[#1,#2]%
>>     {#1\par
>>      \processcommalist[#2]\doCheckBoxes
>>     }
>>
>> [...]
>>
>> Is there a way that I do not need al the '\blank' lines. After a
>> checkbox list, I always want an empty line.
>
> Add \blank at the begin and end of your macro:
>
> \def\CheckBoxes[#1][#2]%
>  {\blank
>   #1\par
>   \processcommalist[#2]\...
>   \blank}
>
> I wonder why need this command when can get the same result with normal context commands:
>
> \definesymbol[checkbox][{[~~~]}]
> \defineitemgroup[checkbox]
> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>
> \starttext
>
> \startcheckbox
> \nop title
> \item Yes
> \item No
> \item A little bit
> \stopcheckbox
>
> \stoptext

Or even

\items{Yes, No, A little bit}

maybe with

\setupitems[symbol=checkbox]

Search the main manual for details.

Aditya

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 18:29               ` Wolfgang Schuster
  2010-09-06 21:32                 ` Aditya Mahajan
@ 2010-09-06 23:07                 ` Cecil Westerhof
  2010-09-07  0:18                   ` Aditya Mahajan
  2010-09-07  7:18                 ` Cecil Westerhof
  2 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-06 23:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Op maandag 6 sep 2010 20:29 CEST schreef Wolfgang Schuster:

> I wonder why need this command when can get the same result with normal
> 	context commands:
>
> \definesymbol[checkbox][{[~~~]}]
> \defineitemgroup[checkbox]
> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>
> \starttext
>
> \startcheckbox
> \nop title
> \item Yes
> \item No
> \item A little bit
> \stopcheckbox
>
> \stoptext

I am still new to ConTeXt, so I did not know this. But in the future I
properly want to work with:
    [  ] a     [  ] b     [  ] c
    [  ] d     [  ] e     [  ] f
    [  ] g     [  ] h     [  ] i
    [  ] j     [  ] k     [  ] l
instead of:
    [  ] a
    [  ] b
    [  ] c
    [  ] d
    [  ] e
    [  ] f
    [  ] g
    [  ] h
    [  ] i
    [  ] j
    [  ] k
    [  ] l
or is that also possible with your way?

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 23:07                 ` Cecil Westerhof
@ 2010-09-07  0:18                   ` Aditya Mahajan
  2010-09-07  7:29                     ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: Aditya Mahajan @ 2010-09-07  0:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users



On 2010-09-06, at 7:07 PM, Cecil Westerhof <cldwesterhof@gmail.com> wrote:

> 
> Op maandag 6 sep 2010 20:29 CEST schreef Wolfgang Schuster:
> 
>> I wonder why need this command when can get the same result with normal
>>    context commands:
>> 
>> \definesymbol[checkbox][{[~~~]}]
>> \defineitemgroup[checkbox]
>> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>> 
>> \starttext
>> 
>> \startcheckbox
>> \nop title
>> \item Yes
>> \item No
>> \item A little bit
>> \stopcheckbox
>> 
>> \stoptext
> 
> I am still new to ConTeXt, so I did not know this. But in the future I
> properly want to work with:
>    [  ] a     [  ] b     [  ] c
>    [  ] d     [  ] e     [  ] f
>    [  ] g     [  ] h     [  ] i
>    [  ] j     [  ] k     [  ] l
> instead of:
>    [  ] a
>    [  ] b
>    [  ] c
>    [  ] d
>    [  ] e
>    [  ] f
>    [  ] g
>    [  ] h
>    [  ] i
>    [  ] j
>    [  ] k
>    [  ] l
> or is that also possible 

Add

\setupitemgroup[checkbox][column,three]

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-06 18:29               ` Wolfgang Schuster
  2010-09-06 21:32                 ` Aditya Mahajan
  2010-09-06 23:07                 ` Cecil Westerhof
@ 2010-09-07  7:18                 ` Cecil Westerhof
  2010-09-07  7:32                   ` Cecil Westerhof
  2010-09-07  7:42                   ` luigi scarso
  2 siblings, 2 replies; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-07  7:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Op maandag 6 sep 2010 20:29 CEST schreef Wolfgang Schuster:

> I wonder why need this command when can get the same result with normal
> 	context commands:
>
> \definesymbol[checkbox][{[~~~]}]
> \defineitemgroup[checkbox]
> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>
> \starttext
>
> \startcheckbox
> \nop title
> \item Yes
> \item No
> \item A little bit
> \stopcheckbox
>
> \stoptext

I tried this. There is one problem.
I want:
    title
        [  ] Yes
        [  ] No
        [  ] A little bit
but I get:
             title
        [  ] Yes
        [  ] No
        [  ] A little bit

I already tried:
    \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em][itemize][indentnext=no]
but that does not work. How can I make the 'title' not indented?

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  0:18                   ` Aditya Mahajan
@ 2010-09-07  7:29                     ` Cecil Westerhof
  0 siblings, 0 replies; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-07  7:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op dinsdag 7 sep 2010 02:18 CEST schreef Aditya Mahajan:

>> I am still new to ConTeXt, so I did not know this. But in the future I
>> properly want to work with:
>> [  ] a     [  ] b     [  ] c
>> [  ] d     [  ] e     [  ] f
>> [  ] g     [  ] h     [  ] i
>> [  ] j     [  ] k     [  ] l
>> instead of:
>> [  ] a
>> [  ] b
>> [  ] c
>> [  ] d
>> [  ] e
>> [  ] f
>> [  ] g
>> [  ] h
>> [  ] i
>> [  ] j
>> [  ] k
>> [  ] l
>> or is that also possible 
>
> Add
>
> \setupitemgroup[checkbox][column,three]

Does not work. I have:
    \startcheckbox
    \nop Heeft u iets aan deze workshop gehad?
    \item Ja
    \item Nee
    \item Een beetje
    \stopcheckbox
    \setupitemgroup[checkbox][column,three]
    \startcheckbox
    \nop Een lange versie.
    \item A
    \item B
    \item C
    \item D
    \item E
    \item F
    \item G
    \item H
    \item I
    \item J
    \item K
    \item L
    \stopcheckbox

The first part does mostly what it should. The only problem is that
the 'title' is indented, what I do not want.
But the second part is still one column, but with empty lines between
the elements.

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  7:18                 ` Cecil Westerhof
@ 2010-09-07  7:32                   ` Cecil Westerhof
  2010-09-07 13:18                     ` Wolfgang Schuster
  2010-09-07  7:42                   ` luigi scarso
  1 sibling, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-07  7:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op dinsdag 7 sep 2010 09:18 CEST schreef Cecil Westerhof:

>> I wonder why need this command when can get the same result with normal
>> 	context commands:
>>
>> \definesymbol[checkbox][{[~~~]}]
>> \defineitemgroup[checkbox]
>> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>>
>> \starttext
>>
>> \startcheckbox
>> \nop title
>> \item Yes
>> \item No
>> \item A little bit
>> \stopcheckbox
>>
>> \stoptext
>
> I tried this. There is one problem.
> I want:
> title
> [  ] Yes
> [  ] No
> [  ] A little bit
> but I get:
> title
> [  ] Yes
> [  ] No
> [  ] A little bit
>
> I already tried:
> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em][itemize][indentnext=no]
> but that does not work. How can I make the 'title' not indented?

It is a little worse. There is also no space between the 'checkbox'
and the description.
I want:
    title
        [  ] Yes
        [  ] No
        [  ] A little bit
but I get:
            title
        [  ]Yes
        [  ]No
        [  ]A little bit

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  7:18                 ` Cecil Westerhof
  2010-09-07  7:32                   ` Cecil Westerhof
@ 2010-09-07  7:42                   ` luigi scarso
  2010-09-07  8:05                     ` Cecil Westerhof
  1 sibling, 1 reply; 25+ messages in thread
From: luigi scarso @ 2010-09-07  7:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Sep 7, 2010 at 9:18 AM, Cecil Westerhof <cldwesterhof@gmail.com> wrote:
> I already tried:
>    \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em][itemize][indentnext=no]
> but that does not work. How can I make the 'title' not indented?

\definesymbol[checkbox][{[~~~]}]
\defineitemgroup[checkbox]
\setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]

\starttext

\startcheckbox
\nop \hskip -1.5em title
\item Yes
\item No
\item A little bit
\stopcheckbox

\stoptext


-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  7:42                   ` luigi scarso
@ 2010-09-07  8:05                     ` Cecil Westerhof
  2010-09-07  8:13                       ` luigi scarso
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-07  8:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op dinsdag 7 sep 2010 09:42 CEST schreef luigi scarso:

>> I already tried:
>>  
>> 	 \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em][itemize][indentnext=no]
>> but that does not work. How can I make the 'title' not indented?
>
> \definesymbol[checkbox][{[~~~]}]
> \defineitemgroup[checkbox]
> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>
> \starttext
>
> \startcheckbox
> \nop \hskip -1.5em title
> \item Yes
> \item No
> \item A little bit
> \stopcheckbox
>
> \stoptext

The \hskip needs to be -4em, but then it does what it should. There is
not a way to put the hskip in setupitemgroup?

The only problem left is that there is not a space between the
'checkbox' and the description.

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  8:05                     ` Cecil Westerhof
@ 2010-09-07  8:13                       ` luigi scarso
  2010-09-07  9:08                         ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: luigi scarso @ 2010-09-07  8:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Sep 7, 2010 at 10:05 AM, Cecil Westerhof <cldwesterhof@gmail.com> wrote:
> Op dinsdag 7 sep 2010 09:42 CEST schreef luigi scarso:
>
>>> I already tried:
>>>
>>>       \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em][itemize][indentnext=no]
>>> but that does not work. How can I make the 'title' not indented?
>>
>> \definesymbol[checkbox][{[~~~]}]
>> \defineitemgroup[checkbox]
>> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]
>>
>> \starttext
>>
>> \startcheckbox
>> \nop \hskip -1.5em title
>> \item Yes
>> \item No
>> \item A little bit
>> \stopcheckbox
>>
>> \stoptext
>
> The \hskip needs to be -4em, but then it does what it should. There is
> not a way to put the hskip in setupitemgroup?
Maybe -- I don't know.
In my opinion, title should be go out the startcheckbox env.
>
> The only problem left is that there is not a space between the
> 'checkbox' and the description.

\showframe
\definesymbol[checkbox][{[~~~]}]
\defineitemgroup[checkbox]
\setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=2em,distance=.5em]
\starttext

\startcheckbox
\nop \hskip -4.5em title
\item Yes
\item No
\item A little bit
\stopcheckbox

\stoptext


-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  8:13                       ` luigi scarso
@ 2010-09-07  9:08                         ` Cecil Westerhof
  2010-09-07  9:24                           ` luigi scarso
  0 siblings, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-07  9:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op dinsdag 7 sep 2010 10:13 CEST schreef luigi scarso:

>> The \hskip needs to be -4em, but then it does what it should. There is
>> not a way to put the hskip in setupitemgroup?
> Maybe -- I don't know.

I found 'a way'. See later.


> In my opinion, title should be go out the startcheckbox env.

Why?


>> The only problem left is that there is not a space between the
>> 'checkbox' and the description.
>
> \showframe
> \definesymbol[checkbox][{[~~~]}]
> \defineitemgroup[checkbox]
> \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=2em,distance=.5em]
> \starttext
>
> \startcheckbox
> \nop \hskip -4.5em title
> \item Yes
> \item No
> \item A little bit
> \stopcheckbox
>
> \stoptext

I defined:
    \definesymbol[checkbox][{[~~~]}]
    \defineitemgroup[checkbox]
    \setupitemgroup[checkbox][each][packed][margin=2.5em,symbol=checkbox,width=2em,distance=.5em]
    % CheckBoxIndent = -(margin + width) = -4.5em
    \def\CheckBoxTitle[#1]{
      \nop \hskip -4.5em #1
    }

And I call it with:
\startcheckbox
\CheckBoxtitle[title]
\item Yes
\item No
\item A little bit
\stopcheckbox

It can properly be done better. But it works.

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  9:08                         ` Cecil Westerhof
@ 2010-09-07  9:24                           ` luigi scarso
  2010-09-07 10:51                             ` Cecil Westerhof
  0 siblings, 1 reply; 25+ messages in thread
From: luigi scarso @ 2010-09-07  9:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Sep 7, 2010 at 11:08 AM, Cecil Westerhof <cldwesterhof@gmail.com> wrote:
>> In my opinion, title should be go out the startcheckbox env.
>
> Why?
Because your title is not a item at all --  its position is completely different
from a \item and it's a "title". Eventually something like
\startcheckbox[title={My title}]..\stopcheckbox

But  it's an opinion.

>    % CheckBoxIndent = -(margin + width) = -4.5em
>    \def\CheckBoxTitle[#1]{
>      \nop \hskip -4.5em #1
>    }
Yes; a problem arise if you must modify the margin and/or width a little.
You can use dimension eventually
\showframe
\definesymbol[checkbox][{[~~~]}]
\defineitemgroup[checkbox]
\newdimen\MyCheckBoxMargin
\MyCheckBoxMargin=2em
\newdimen\MyCheckBoxWidth
\MyCheckBoxWidth=2.5em
\def\CheckBoxTitle[#1]{
\nop \hskip \dimexpr -\MyCheckBoxWidth-\MyCheckBoxMargin\relax #1
}

\setupitemgroup[checkbox][each][packed][margin=\MyCheckBoxMargin,
          symbol=checkbox,width=\MyCheckBoxWidth,distance=.5em]


\starttext
\startcheckbox
\CheckBoxTitle[title]
\item Yes
\item No
\item A little bit
\stopcheckbox
\stoptext




-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  9:24                           ` luigi scarso
@ 2010-09-07 10:51                             ` Cecil Westerhof
  0 siblings, 0 replies; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-07 10:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Op dinsdag 7 sep 2010 11:24 CEST schreef luigi scarso:

>>> In my opinion, title should be go out the startcheckbox env.
>>
>> Why?
> Because your title is not a item at all -- its position is completely
> 	different
> from a \item and it's a "title". Eventually something like
> \startcheckbox[title={My title}]..\stopcheckbox

Make sense. At a certain point I should look at this. But lets try to
walk before I start running. ;-)


>>    % CheckBoxIndent = -(margin + width) = -4.5em
>>    \def\CheckBoxTitle[#1]{
>>      \nop \hskip -4.5em #1
>>    }
> Yes; a problem arise if you must modify the margin and/or width a little.
> You can use dimension eventually
> \showframe
> \definesymbol[checkbox][{[~~~]}]
> \defineitemgroup[checkbox]
> \newdimen\MyCheckBoxMargin
> \MyCheckBoxMargin=2em
> \newdimen\MyCheckBoxWidth
> \MyCheckBoxWidth=2.5em
> \def\CheckBoxTitle[#1]{
> \nop \hskip \dimexpr -\MyCheckBoxWidth-\MyCheckBoxMargin\relax #1
> }

I wanted to do something like that, but did not know how. I put
distance also in a variable. I have now:
    \newdimen\MyCheckBoxMargin
    \MyCheckBoxMargin=2em
    \newdimen\MyCheckBoxWidth
    \MyCheckBoxWidth=2.5em
    \newdimen\MyCheckBoxDistance
    \MyCheckBoxDistance=.5em
    \definesymbol[checkbox][{[~~~]}]
    \defineitemgroup[checkbox]
    \setupitemgroup[checkbox][each][packed][margin=\MyCheckBoxMargin,
             symbol=checkbox,width=\MyCheckBoxWidth,distance=\MyCheckBoxDistance]
    \def\CheckBoxTitle[#1]{
      \nop \hskip \dimexpr -\MyCheckBoxWidth-\MyCheckBoxMargin\relax #1
    }

It has been some work, but my feedback macros are beginning to become
useful. Thanks everyone.

By the way: what would be a good font to use. At the moment I use:
    \setupbodyfont[roman, 12pt]
but layout and typography are not my strong points. So any tips are
appreciated.

A demo of what I have made can be found at:
    http://decebal.nl/ConTeXt/sources/feedback-form
and the pdf is at:
    http://decebal.nl/ConTeXt/sources/feedback-form.pdf

-- 
Cecil Westerhof
M CLDWesterhof@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07  7:32                   ` Cecil Westerhof
@ 2010-09-07 13:18                     ` Wolfgang Schuster
  2010-09-07 13:21                       ` luigi scarso
  2010-09-09 11:45                       ` Cecil Westerhof
  0 siblings, 2 replies; 25+ messages in thread
From: Wolfgang Schuster @ 2010-09-07 13:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 07.09.2010 um 09:32 schrieb Cecil Westerhof:

> It is a little worse. There is also no space between the 'checkbox'
> and the description.
> I want:
>    title
>        [  ] Yes
>        [  ] No
>        [  ] A little bit
> but I get:
>            title
>        [  ]Yes
>        [  ]No
>        [  ]A little bit

\definesymbol[checkbox][{[~~~]}]

\starttext

\def\startcheckbox
  {\dosingleempty\dostartcheckbox}

\def\dostartcheckbox[#1]%
  {\blank
   \doifsomething{#1}{\leftaligned{#1}}%
   \startitemize[packed,intro,joinedup,columns,three][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]}

\def\stopcheckbox
  {\stopitemize
   \blank}

\startcheckbox
\item A
\item B
\item C
\item D
\item E
\item F
\stopcheckbox

\startcheckbox[title]
\item A
\item B
\item C
\item D
\item E
\item F
\stopcheckbox

\stoptext

Wolfgang

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07 13:18                     ` Wolfgang Schuster
@ 2010-09-07 13:21                       ` luigi scarso
  2010-09-09 11:45                       ` Cecil Westerhof
  1 sibling, 0 replies; 25+ messages in thread
From: luigi scarso @ 2010-09-07 13:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Sep 7, 2010 at 3:18 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 07.09.2010 um 09:32 schrieb Cecil Westerhof:
>
>> It is a little worse. There is also no space between the 'checkbox'
>> and the description.
>> I want:
>>    title
>>        [  ] Yes
>>        [  ] No
>>        [  ] A little bit
>> but I get:
>>            title
>>        [  ]Yes
>>        [  ]No
>>        [  ]A little bit
>
> \definesymbol[checkbox][{[~~~]}]
>
> \starttext
>
> \def\startcheckbox
>  {\dosingleempty\dostartcheckbox}
>
> \def\dostartcheckbox[#1]%
>  {\blank
>   \doifsomething{#1}{\leftaligned{#1}}%
>   \startitemize[packed,intro,joinedup,columns,three][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]}
>
> \def\stopcheckbox
>  {\stopitemize
>   \blank}
Ah, I forget to say about the coffee...

-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-07 13:18                     ` Wolfgang Schuster
  2010-09-07 13:21                       ` luigi scarso
@ 2010-09-09 11:45                       ` Cecil Westerhof
  2010-09-09 12:17                         ` Wolfgang Schuster
  1 sibling, 1 reply; 25+ messages in thread
From: Cecil Westerhof @ 2010-09-09 11:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 312 bytes --]

2010/9/7 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

>
> \startitemize[packed,intro,joinedup,columns,three][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]}
>

To put  in columns only columns,two until columns,five can be used? I am
trying to get more, but do not succeed.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 601 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Making checkboxes
  2010-09-09 11:45                       ` Cecil Westerhof
@ 2010-09-09 12:17                         ` Wolfgang Schuster
  0 siblings, 0 replies; 25+ messages in thread
From: Wolfgang Schuster @ 2010-09-09 12:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 562 bytes --]


Am 09.09.2010 um 13:45 schrieb Cecil Westerhof:

> 2010/9/7 Wolfgang Schuster <schuster.wolfgang@googlemail.com>
>   \startitemize[packed,intro,joinedup,columns,three][margin=2.5em,symbol=checkbox,width=1.5em,distance=.5em]}
> 
> To put  in columns only columns,two until columns,five can be used? I am trying to get more, but do not succeed.


Use the “n” key

\startitemize[columns][n=<number>]

or \startcolumns without the “columns” keyword in itemize

\startcolumns[n=<number>]
\startitemize
...
\stopitemize
\stopcolumns

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1247 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-09-09 12:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-06  9:14 Making checkboxes Cecil Westerhof
2010-09-06 10:55 ` Wolfgang Schuster
2010-09-06 11:50   ` Cecil Westerhof
2010-09-06 12:58     ` Wolfgang Schuster
2010-09-06 13:34       ` Cecil Westerhof
2010-09-06 15:55         ` Cecil Westerhof
2010-09-06 16:37           ` Wolfgang Schuster
2010-09-06 17:57             ` Cecil Westerhof
2010-09-06 18:29               ` Wolfgang Schuster
2010-09-06 21:32                 ` Aditya Mahajan
2010-09-06 23:07                 ` Cecil Westerhof
2010-09-07  0:18                   ` Aditya Mahajan
2010-09-07  7:29                     ` Cecil Westerhof
2010-09-07  7:18                 ` Cecil Westerhof
2010-09-07  7:32                   ` Cecil Westerhof
2010-09-07 13:18                     ` Wolfgang Schuster
2010-09-07 13:21                       ` luigi scarso
2010-09-09 11:45                       ` Cecil Westerhof
2010-09-09 12:17                         ` Wolfgang Schuster
2010-09-07  7:42                   ` luigi scarso
2010-09-07  8:05                     ` Cecil Westerhof
2010-09-07  8:13                       ` luigi scarso
2010-09-07  9:08                         ` Cecil Westerhof
2010-09-07  9:24                           ` luigi scarso
2010-09-07 10:51                             ` Cecil Westerhof

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).