Re: [NTG-context] \start \stop problem with itemize

2008-09-12 Thread Patrick Gundlach
Hi Jelle,

I am not sure how you would solve this using \definestartstop, but you
can define your own itemgroup:


\definestartstop
[bulletlistitem]
[before={\item},
after=]

\defineitemgroup[bulletlist]
\setupitemgroup[bulletlist][packed]

\starttext
\startbulletlist
\startbulletlistitem{One}\stopbulletlistitem
\startbulletlistitem{Two}\stopbulletlistitem
\startbulletlistitem{three}\stopbulletlistitem
\stopbulletlist
\stoptext


Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \start \stop problem with itemize

2008-09-12 Thread Aditya Mahajan
On Fri, 12 Sep 2008, Jelle Huisman wrote:

 Hi all,

 I try to understand why this doesn't work as I expected?

 \definestartstop
[bulletlist]
[before={\startitemize[packed]},
after={\stopitemize}]
 \definestartstop
[bulletlistitem]
[before={\item},
after={ }]

(Untested)

Why not

\defineitemgroup[bulletlist]

\setupitemgroup[bulletlist][packed]

\definestartstop[bulletlistitem][before=\startitem,after=\stopitem]

Aditya

 \starttext
 \startbulletlist{
 \startbulletlistitem{One}\stopbulletlistitem
 \startbulletlistitem{Two}\stopbulletlistitem
 \startbulletlistitem{three}\stopbulletlistitem
 }\stopbulletlist
 \stoptext

 I expect:

 * One
 * Two
 * Three

 but I get:

 ! Extra }, or forgotten \endgroup.
 l.17 }
  \stopbulletlist
 ?
 ! Emergency stop.
 l.17 }
  \stopbulletlist
 !  == Fatal error occurred, no output PDF file produced!


 Thanks,

 Jelle
 ___
 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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \start \stop problem with itemize

2008-09-12 Thread Jelle Huisman
Thank you Patrick and Aditya,

I think I'll use \defineitemgroup etc., but I'm still curios what the 
difference is between these two:

\startbulletlist   \startbulletlistitem{One}\stopbulletlistitem   
\stopbulletlist % this works
\startbulletlist{ \startbulletlistitem{One}\stopbulletlistitem 
}\stopbulletlist % this breaks

(I would prefer to use the second version with { }...)

Jelle
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \start \stop problem with itemize

2008-09-12 Thread Aditya Mahajan
On Fri, 12 Sep 2008, Jelle Huisman wrote:

 Thank you Patrick and Aditya,

 I think I'll use \defineitemgroup etc., but I'm still curios what the
 difference is between these two:

 \startbulletlist   \startbulletlistitem{One}\stopbulletlistitem
 \stopbulletlist % this works
 \startbulletlist{ \startbulletlistitem{One}\stopbulletlistitem
 }\stopbulletlist % this breaks

I do not know why the extra grouping messes up itemize

 (I would prefer to use the second version with { }...)

Sure you can

\def\startbulletlist#1%
 {\startitemize[packed]
   #1
  \stopitemize}

\def\stopbulletlist{\donoting}

\definestartstop
 [bulletlistitem]
 [before={\item},
 after={ }]

\starttext
\startbulletlist{
\startbulletlistitem{One}\stopbulletlistitem
\startbulletlistitem{Two}\stopbulletlistitem
\startbulletlistitem{three}\stopbulletlistitem
}
\stoptext


Don't take this seriously :-)

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \start \stop problem with itemize

2008-09-12 Thread Aditya Mahajan
On Fri, 12 Sep 2008, Aditya Mahajan wrote:

 On Fri, 12 Sep 2008, Jelle Huisman wrote:

 Thank you Patrick and Aditya,

 I think I'll use \defineitemgroup etc., but I'm still curios what the
 difference is between these two:

 \startbulletlist   \startbulletlistitem{One}\stopbulletlistitem
 \stopbulletlist % this works
 \startbulletlist{ \startbulletlistitem{One}\stopbulletlistitem
 }\stopbulletlist % this breaks

 I do not know why the extra grouping messes up itemize

 (I would prefer to use the second version with { }...)

 Sure you can

 \def\startbulletlist#1%
 {\startitemize[packed]
   #1
  \stopitemize}

 \def\stopbulletlist{\donoting}
 ^^ \donothing
 \definestartstop
 [bulletlistitem]
 [before={\item},
 after={ }]

 \starttext
 \startbulletlist{
 \startbulletlistitem{One}\stopbulletlistitem
 \startbulletlistitem{Two}\stopbulletlistitem
 \startbulletlistitem{three}\stopbulletlistitem
 }

\stopbulletlist

 \stoptext


 Don't take this seriously :-)

 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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___