ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* customized itemize
@ 2006-05-09 18:52 Na Li
  2006-05-09 19:11 ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Na Li @ 2006-05-09 18:52 UTC (permalink / raw)



I need use repeatedly a list like this, with the same set of words (five
or six of them), 'icon', 'coni', etc,

  \startitemize[width=3em,symstyle=bold]
    \sym{icon} blah
    \sym{coni} llla
  \stopitemize

How to define a customized list so I can do:

 \startmylist
   \item blah
   \item llla
 \stopmylist

to get the same result?

Thanks,

Michael

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

* Re: customized itemize
  2006-05-09 18:52 customized itemize Na Li
@ 2006-05-09 19:11 ` Aditya Mahajan
  2006-05-09 20:00   ` Na Li
  0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2006-05-09 19:11 UTC (permalink / raw)


On Tue, 9 May 2006, Na Li wrote:

>
> I need use repeatedly a list like this, with the same set of words (five
> or six of them), 'icon', 'coni', etc,
>
>  \startitemize[width=3em,symstyle=bold]
>    \sym{icon} blah
>    \sym{coni} llla
>  \stopitemize
>
> How to define a customized list so I can do:
>
> \startmylist
>   \item blah
>   \item llla
> \stopmylist
>
> to get the same result?
>

Does http://wiki.contextgarden.net/User-Defined_Enumerations help?

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

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

* Re: customized itemize
  2006-05-09 19:11 ` Aditya Mahajan
@ 2006-05-09 20:00   ` Na Li
  2006-05-09 20:54     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Na Li @ 2006-05-09 20:00 UTC (permalink / raw)


On  9 May 2006, Aditya Mahajan wrote:

On Tue, 9 May 2006, Na Li wrote: >
> > I need use repeatedly a list like this, with the same set of words (five
> > or six of them), 'icon', 'coni', etc,
> > 
> > \startitemize[width=3em,symstyle=bold]
> > \sym{icon} blah
> > \sym{coni} llla
> > \stopitemize
> > 
> > How to define a customized list so I can do:
> > 
> > \startmylist
> > \item blah
> > \item llla
> > \stopmylist
> > 
> > to get the same result?
> > 
> 
> Does http://wiki.contextgarden.net/User-Defined_Enumerations help?

Thanks! This works fine:

\defineconversion[s][icon,coni]
\startitemize[s,packed][width=5em,stopper=:,style=bold]
\item blah
\item lla
\stopitemize 

Is there a way of defining an itemize style without having to specify
the same set of options to \startitemize every time?  Something like:

\defineitemize[myitemize][s,packed][width=5em,stopper=:,style=bold]

Michael 

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

* Re: customized itemize
  2006-05-09 20:00   ` Na Li
@ 2006-05-09 20:54     ` Hans Hagen
  2006-05-10 15:37       ` Na Li
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2006-05-09 20:54 UTC (permalink / raw)


Na Li wrote:
>
> Is there a way of defining an itemize style without having to specify
> the same set of options to \startitemize every time?  Something like:
>
> \defineitemize[myitemize][s,packed][width=5em,stopper=:,style=bold]
>   
\defineitemgroup

Hans 
 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: customized itemize
  2006-05-09 20:54     ` Hans Hagen
@ 2006-05-10 15:37       ` Na Li
  2006-05-18  5:57         ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Na Li @ 2006-05-10 15:37 UTC (permalink / raw)


On  9 May 2006, Hans Hagen wrote:

Na Li wrote: >
> > Is there a way of defining an itemize style without having to specify
> > the same set of options to \startitemize every time?  Something like:
> > 
> > \defineitemize[myitemize][s,packed][width=5em,stopper=:,style=bold]
> > 
> \defineitemgroup

That does the trick.  Thanks.

This is not in the manual.  I only found one example through Google.  So
I'll repeat it here

\defineitemgroup[mylist]
\setupitemgroup[mylist][each][s,packed]
\setupitemgroup[mylist][each][width=5em,stopper=:,style=bold]

Another question, if I do

\startitemize[n]
\item
  \startmylist
  \item
  \stopmylist
\stopitemize

The numbers, '1', '2', etc, from the outer list does not line up with 
the first line of the inner list.  How can that be fixed?  Also how to
prevent a page break between the number/bullet from the outer list and
the nested list?

Michael

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

* Re: customized itemize
  2006-05-10 15:37       ` Na Li
@ 2006-05-18  5:57         ` Aditya Mahajan
  0 siblings, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2006-05-18  5:57 UTC (permalink / raw)


On Wed, 10 May 2006, Na Li wrote:

> Another question, if I do
>
> \startitemize[n]
> \item
>  \startmylist
>  \item
>  \stopmylist
> \stopitemize
>
> The numbers, '1', '2', etc, from the outer list does not line up with
> the first line of the inner list.  How can that be fixed?

Try

\startitemize[n,broad,packed]
   \item
   \startitemize[n]
     \item test1
     \item test2
   \stopitemize
\stopitemize


Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

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

end of thread, other threads:[~2006-05-18  5:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 18:52 customized itemize Na Li
2006-05-09 19:11 ` Aditya Mahajan
2006-05-09 20:00   ` Na Li
2006-05-09 20:54     ` Hans Hagen
2006-05-10 15:37       ` Na Li
2006-05-18  5:57         ` 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).