ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem Nesting defineitemgroups
@ 2012-03-24  4:25 Malte Stien
  2012-03-24  4:39 ` Malte Stien
  2012-03-24 11:52 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Malte Stien @ 2012-03-24  4:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I have the following two definitions for bullet point lists...

  % Setup bullet point lists
  \defineitemgroup[blist][before={\blank[1ex]}]
  \setupitemgroup[blist][1][packed][symbol=1]
  \setupitemgroup[blist][2][packed][symbol=2]

... and numbered lists

  % Setup numbered lists
  \defineitemgroup[nlist][before={\blank[1ex]}]
  \setupitemgroup[nlist][1][packed][symbol=n, headstyle=bold]
  \setupitemgroup[nlist][2][packed][symbol=a, headstyle=bold]

They generally seem to work well, but when I try to nest one within the other, like so

  \startnlist
  \item Foo
  \startblist
  \item Some bullet item 1,
  \item Some bullet item 2,
  \item Some bullet item 3.
  \item Assign an appropriate criticality.
  \stopblist
  \item Baz
  \startnlist

...I get unexpected behaviour as follows:

  1. Foo
     a. Some bullet item 1,
     b. Some bullet item 2,
     c. Some bullet item 3.
  2. Baz

I was expecting this instead

  1. Foo
     + Some bullet item 1,
     + Some bullet item 2,
     + Some bullet item 3.
  2. Baz

...(where "+" denotes the round bullet point). Is this a defect or am I doing something wrong?

Regards,
Malte.

___________________________________________________________________________________
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] 5+ messages in thread

* Re: Problem Nesting defineitemgroups
  2012-03-24  4:25 Problem Nesting defineitemgroups Malte Stien
@ 2012-03-24  4:39 ` Malte Stien
  2012-03-24 11:52 ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Malte Stien @ 2012-03-24  4:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi again,

I just noticed that the last line of my code was

  \startnlist

when it should have been

  \stopnlist

It was correct in my code, but too much fiddling and trying things made it wrong when I copied it across to the email. Even with the correct line in there, my problem still exists.

Regards,
Malte.


On 24/03/2012, at 15:25, Malte Stien wrote:

> I have the following two definitions for bullet point lists...
> 
>  % Setup bullet point lists
>  \defineitemgroup[blist][before={\blank[1ex]}]
>  \setupitemgroup[blist][1][packed][symbol=1]
>  \setupitemgroup[blist][2][packed][symbol=2]
> 
> ... and numbered lists
> 
>  % Setup numbered lists
>  \defineitemgroup[nlist][before={\blank[1ex]}]
>  \setupitemgroup[nlist][1][packed][symbol=n, headstyle=bold]
>  \setupitemgroup[nlist][2][packed][symbol=a, headstyle=bold]
> 
> They generally seem to work well, but when I try to nest one within the other, like so
> 
>  \startnlist
>  \item Foo
>  \startblist
>  \item Some bullet item 1,
>  \item Some bullet item 2,
>  \item Some bullet item 3.
>  \item Assign an appropriate criticality.
>  \stopblist
>  \item Baz
>  \startnlist
> 
> ...I get unexpected behaviour as follows:
> 
>  1. Foo
>     a. Some bullet item 1,
>     b. Some bullet item 2,
>     c. Some bullet item 3.
>  2. Baz
> 
> I was expecting this instead
> 
>  1. Foo
>     + Some bullet item 1,
>     + Some bullet item 2,
>     + Some bullet item 3.
>  2. Baz
> 
> ...(where "+" denotes the round bullet point). Is this a defect or am I doing something wrong?
> 
> Regards,
> Malte.
> 

___________________________________________________________________________________
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] 5+ messages in thread

* Re: Problem Nesting defineitemgroups
  2012-03-24  4:25 Problem Nesting defineitemgroups Malte Stien
  2012-03-24  4:39 ` Malte Stien
@ 2012-03-24 11:52 ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2012-03-24 11:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 24.03.2012 um 05:25 schrieb Malte Stien:

> I have the following two definitions for bullet point lists...
> 
>  % Setup bullet point lists
>  \defineitemgroup[blist][before={\blank[1ex]}]
>  \setupitemgroup[blist][1][packed][symbol=1]
>  \setupitemgroup[blist][2][packed][symbol=2]
> 
> ... and numbered lists
> 
>  % Setup numbered lists
>  \defineitemgroup[nlist][before={\blank[1ex]}]
>  \setupitemgroup[nlist][1][packed][symbol=n, headstyle=bold]
>  \setupitemgroup[nlist][2][packed][symbol=a, headstyle=bold]
> 
> They generally seem to work well, but when I try to nest one within the other, like so
> 
>  \startnlist
>  \item Foo
>  \startblist
>  \item Some bullet item 1,
>  \item Some bullet item 2,
>  \item Some bullet item 3.
>  \item Assign an appropriate criticality.
>  \stopblist
>  \item Baz
>  \startnlist
> 
> ...I get unexpected behaviour as follows:
> 
>  1. Foo
>     a. Some bullet item 1,
>     b. Some bullet item 2,
>     c. Some bullet item 3.
>  2. Baz
> 
> I was expecting this instead
> 
>  1. Foo
>     + Some bullet item 1,
>     + Some bullet item 2,
>     + Some bullet item 3.
>  2. Baz
> 
> ...(where "+" denotes the round bullet point). Is this a defect or am I doing something wrong?

ConTeXt uses the type of the item group in the first level also for the inner levels
and handles the inner \startblist as if it was \startnlist.

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] 5+ messages in thread

* Re: Problem Nesting defineitemgroups
  2012-03-25 11:25 ` Malte Stien
@ 2012-03-25 13:14   ` Rogers, Michael K
  0 siblings, 0 replies; 5+ messages in thread
From: Rogers, Michael K @ 2012-03-25 13:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

You can use \startitemize[1] directly.  (You can put it in a macro, so if you ever want to change the style of bullets, you just have to adjust the macro.)

\startnlist
\item Foo
\startitemize[1]
\item Some bullet item 1,
\item Some bullet item 2.
\stopitemize
\item Baz
\startnlist % start level=2 nlist
\item sub Baz 1
\startitemize[1]
\item Another bullet item 1,
\item Another bullet item 2.
\stopitemize
\item sub Baz 2
\stopnlist % stop level=2 nlist
\stopnlist

If you want complicated nesting of the two types with automatically chosen symbols, you'll have to do some programming of ConTeXt, I think.  Here's hack, which I can offer as a hint.  I'm just beginning to learn ConTeXt, so I fear to wade in deeper than this:

% bulleted nlist
\def\startBnlist{\doifelse{\currentitemlevel}{1}{\startitemize[1]}{\startitemize[2]}}
%\def\startBnlist{\expanded{\startitemize[\currentitemlevel]}} % this works too
\def\stopBnlist{\stopitemize}

The bullet used in the above depends on the overall item level, which is a solution I doubt anyone would ever want.  To really get it to work right you would probably need to define your own blist item level variable and do your own bookkeeping.



On Mar 25, 2012, at 7:25 AM, Malte Stien wrote:

> Wolfgang,
>
> Thank you for that info. That is unfortunate. Is there any way I can achieve what I need? That is
>
>> 1. Foo
>>   + Some bullet item 1,
>>   + Some bullet item 2,
>>   + Some bullet item 3.
>> 2. Baz
>
> Thank you.
> Malte.
>
>
> On 25/03/2012, at 3:54, ntg-context-request@ntg.nl wrote:
>
>> ConTeXt uses the type of the item group in the first level also for the inner levels
>> and handles the inner \startblist as if it was \startnlist.
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Problem Nesting defineitemgroups
       [not found] <mailman.221.1332608059.3819.ntg-context@ntg.nl>
@ 2012-03-25 11:25 ` Malte Stien
  2012-03-25 13:14   ` Rogers, Michael K
  0 siblings, 1 reply; 5+ messages in thread
From: Malte Stien @ 2012-03-25 11:25 UTC (permalink / raw)
  To: ntg-context

Wolfgang,

Thank you for that info. That is unfortunate. Is there any way I can achieve what I need? That is

> 1. Foo
>    + Some bullet item 1,
>    + Some bullet item 2,
>    + Some bullet item 3.
> 2. Baz

Thank you.
Malte.


On 25/03/2012, at 3:54, ntg-context-request@ntg.nl wrote:

> ConTeXt uses the type of the item group in the first level also for the inner levels
> and handles the inner \startblist as if it was \startnlist.

___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2012-03-25 13:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-24  4:25 Problem Nesting defineitemgroups Malte Stien
2012-03-24  4:39 ` Malte Stien
2012-03-24 11:52 ` Wolfgang Schuster
     [not found] <mailman.221.1332608059.3819.ntg-context@ntg.nl>
2012-03-25 11:25 ` Malte Stien
2012-03-25 13:14   ` Rogers, Michael K

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