\start \stop problem with itemize
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
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
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
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
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 ___________________________________________________________________________________
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 ___________________________________________________________________________________
participants (3)
-
Aditya Mahajan
-
Jelle Huisman
-
Patrick Gundlach