ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \start \stop problem with itemize
@ 2008-09-12 15:42 Jelle Huisman
  2008-09-12 15:51 ` Patrick Gundlach
  2008-09-12 15:56 ` Aditya Mahajan
  0 siblings, 2 replies; 6+ messages in thread
From: Jelle Huisman @ 2008-09-12 15:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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={ }]

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


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

* Re: \start \stop problem with itemize
  2008-09-12 15:42 \start \stop problem with itemize Jelle Huisman
@ 2008-09-12 15:51 ` Patrick Gundlach
  2008-09-12 16:17   ` Jelle Huisman
  2008-09-12 15:56 ` Aditya Mahajan
  1 sibling, 1 reply; 6+ messages in thread
From: Patrick Gundlach @ 2008-09-12 15:51 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


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

* Re: \start \stop problem with itemize
  2008-09-12 15:42 \start \stop problem with itemize Jelle Huisman
  2008-09-12 15:51 ` Patrick Gundlach
@ 2008-09-12 15:56 ` Aditya Mahajan
  1 sibling, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2008-09-12 15:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: \start \stop problem with itemize
  2008-09-12 15:51 ` Patrick Gundlach
@ 2008-09-12 16:17   ` Jelle Huisman
  2008-09-12 16:30     ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Jelle Huisman @ 2008-09-12 16:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: \start \stop problem with itemize
  2008-09-12 16:17   ` Jelle Huisman
@ 2008-09-12 16:30     ` Aditya Mahajan
  2008-09-12 16:34       ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2008-09-12 16:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: \start \stop problem with itemize
  2008-09-12 16:30     ` Aditya Mahajan
@ 2008-09-12 16:34       ` Aditya Mahajan
  0 siblings, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2008-09-12 16:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

end of thread, other threads:[~2008-09-12 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-12 15:42 \start \stop problem with itemize Jelle Huisman
2008-09-12 15:51 ` Patrick Gundlach
2008-09-12 16:17   ` Jelle Huisman
2008-09-12 16:30     ` Aditya Mahajan
2008-09-12 16:34       ` Aditya Mahajan
2008-09-12 15:56 ` Aditya Mahajan

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).