ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* numbered subitems
@ 2007-09-30 14:59 Alan Bowen
  2007-09-30 16:11 ` Wolfgang Schuster
  2007-09-30 16:28 ` Aditya Mahajan
  0 siblings, 2 replies; 13+ messages in thread
From: Alan Bowen @ 2007-09-30 14:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 252 bytes --]

I need to produce an lengthy itemization of the form:
1.AAAA
	1.1 aaaa
	1.2 bbbb
2.BBBB
	2.1 cccc

I can get:
1.AAAA
	1 aaaa
	2 bbbb
2.BBBB
	1 cccc
easily enough, but how can I get the main division number to repeat  
in the subitem numeration?

Alan


[-- Attachment #1.2: Type: text/html, Size: 1558 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

* Re: numbered subitems
  2007-09-30 14:59 numbered subitems Alan Bowen
@ 2007-09-30 16:11 ` Wolfgang Schuster
  2007-09-30 20:19   ` Alan Bowen
  2007-09-30 16:28 ` Aditya Mahajan
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Schuster @ 2007-09-30 16:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/9/30, Alan Bowen <acbowen@princeton.edu>:
> I need to produce an lengthy itemization of the form:
> 1.AAAA
>  1.1 aaaa
>  1.2 bbbb
> 2.BBBB
>  2.1 cccc
>
> I can get:
> 1.AAAA
>  1 aaaa
>  2 bbbb
> 2.BBBB
>  1 cccc
> easily enough, but how can I get the main division number to repeat in the
> subitem numeration?
>
> Alan

\def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1}
\defineconversion[firstlevelnumber][\firstlevelnumber]

\def\secondlevelnumber#1{\thefirstlevelnumber.#1}
\defineconversion[secondlevelnumber][\secondlevelnumber]

\starttext
\startitemize[firstlevelnumber]
\item AAAA
  \startitemize[secondlevelnumber]
  \item aaaa
  \item bbbb
  \stopitemize
\item BBBB
  \startitemize[secondlevelnumber]
  \item cccc
  \item dddd
  \stopitemize
\stopitemize
\stoptext

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


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

* Re: numbered subitems
  2007-09-30 14:59 numbered subitems Alan Bowen
  2007-09-30 16:11 ` Wolfgang Schuster
@ 2007-09-30 16:28 ` Aditya Mahajan
  2007-09-30 20:19   ` Alan Bowen
  1 sibling, 1 reply; 13+ messages in thread
From: Aditya Mahajan @ 2007-09-30 16:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 30 Sep 2007, Alan Bowen wrote:

> I need to produce an lengthy itemization of the form:
> 1.AAAA
> 	1.1 aaaa
> 	1.2 bbbb
> 2.BBBB
> 	2.1 cccc
>
> I can get:
> 1.AAAA
> 	1 aaaa
> 	2 bbbb
> 2.BBBB
> 	1 cccc
> easily enough, but how can I get the main division number to repeat in the 
> subitem numeration?


>From core-itm.tex

% \startbuffer
% \item
%   \startitemize[n]
%   \item item 1.1
%   \item item 1.2
%   \startitemize[n] \item item 1.2.1 \item item 1.2.2 \stopitemize
%   \item item 1.3
%   \stopitemize
% \item
%   \startitemize[n] \item item 2.1 \item item 2.2 \stopitemize
% \item item 3
%   \startitemize[n] \item item 3.1 \item item 3.2 \stopitemize
% \item
%   \startitemize[n] \item item 4.1 \item item 4.2 \stopitemize
% \stopbuffer
%
% \startitemize[n,repeat,6*broad,packed] \getbuffer \stopitemize 
\blank[3*big]
% \startitemize[n,repeat,packed]         \getbuffer \stopitemize 
\blank[3*big]
% \setupitemize[each][atmargin][width=3em]
% \startitemize[n,repeat,packed]         \getbuffer \stopitemize

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

* Re: numbered subitems
  2007-09-30 16:11 ` Wolfgang Schuster
@ 2007-09-30 20:19   ` Alan Bowen
  0 siblings, 0 replies; 13+ messages in thread
From: Alan Bowen @ 2007-09-30 20:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks, Wolfgang. This is good start. The problem now is that
with
\def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1}
\defineconversion[firstlevelnumber][\firstlevelnumber]

\def\secondlevelnumber#1{\thefirstlevelnumber.#1}
\defineconversion[secondlevelnumber][\secondlevelnumber]

\starttext
\setupitemize[n,packed,joinedup,serried]
\startitemize[ firstlevelnumber]
\item item 1
   \startitemize[secondlevelnumber]
     \item item 1.1
    \item item 1.2
    \item item 1.3
   \stopitemize
\item item 2
   \startitemize[secondlevelnumber]
\item  item 2.1
    \item  item 2.2
    \item{ item 2.3
\stopitemize
\item item 3
\startitemize[secondlevelnumber]
      \item item 3.1
    \item item 3.2
   \stopitemize
\stopitemize

• the subitem numeration ends with a full stop which I am unable to  
remove using stopper=0. (Inserting it in the second level  
\setupitemize ruins the numeration
• the subitem text is smashed against the numeration

All best, Alan

On Sep 30, 2007, at 12:11 PM, Wolfgang Schuster wrote:

> 2007/9/30, Alan Bowen <acbowen@princeton.edu>:
>> I need to produce an lengthy itemization of the form:
>> 1.AAAA
>>  1.1 aaaa
>>  1.2 bbbb
>> 2.BBBB
>>  2.1 cccc
>>
>> I can get:
>> 1.AAAA
>>  1 aaaa
>>  2 bbbb
>> 2.BBBB
>>  1 cccc
>> easily enough, but how can I get the main division number to  
>> repeat in the
>> subitem numeration?
>>
>> Alan
>
> \def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1}
> \defineconversion[firstlevelnumber][\firstlevelnumber]
>
> \def\secondlevelnumber#1{\thefirstlevelnumber.#1}
> \defineconversion[secondlevelnumber][\secondlevelnumber]
>
> \starttext
> \startitemize[firstlevelnumber]
> \item AAAA
>   \startitemize[secondlevelnumber]
>   \item aaaa
>   \item bbbb
>   \stopitemize
> \item BBBB
>   \startitemize[secondlevelnumber]
>   \item cccc
>   \item dddd
>   \stopitemize
> \stopitemize
> \stoptext
>
> 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  : 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] 13+ messages in thread

* Re: numbered subitems
  2007-09-30 16:28 ` Aditya Mahajan
@ 2007-09-30 20:19   ` Alan Bowen
  2007-09-30 21:29     ` Aditya Mahajan
  0 siblings, 1 reply; 13+ messages in thread
From: Alan Bowen @ 2007-09-30 20:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2459 bytes --]

Thanks, Aditya, I have adapted this as follows—
\startbuffer
\item item 1
     \startitemize[n,stopper={},width=1em]
     \item item 1.1
    \item item 1.2
    \item item 1.3
     \stopitemize
\item item 2
      \startitemize[n,stopper={},width=1em]
   \item item 2.1
    \item  item 2.2
    \item item 2.3
   \stopitemize
\item item 3
     \startitemize[n,stopper={},width=1em]
    \item  item 3.1
    \item  item 3.2
   \stopitemize
\stopbuffer
%
\setupitemize[n,serried,packed,joinedup]
\startitemize[repeat]\getbuffer\stopitemize

and everything works, except that I cannot seems get the subitems  
indented. Right now they fall directly beneath the main items.

All best, Alan




On Sep 30, 2007, at 12:28 PM, Aditya Mahajan wrote:

> On Sun, 30 Sep 2007, Alan Bowen wrote:
>
>> I need to produce an lengthy itemization of the form:
>> 1.AAAA
>> 	1.1 aaaa
>> 	1.2 bbbb
>> 2.BBBB
>> 	2.1 cccc
>>
>> I can get:
>> 1.AAAA
>> 	1 aaaa
>> 	2 bbbb
>> 2.BBBB
>> 	1 cccc
>> easily enough, but how can I get the main division number to  
>> repeat in the
>> subitem numeration?
>
>
>> From core-itm.tex
>
> % \startbuffer
> % \item
> %   \startitemize[n]
> %   \item item 1.1
> %   \item item 1.2
> %   \startitemize[n] \item item 1.2.1 \item item 1.2.2 \stopitemize
> %   \item item 1.3
> %   \stopitemize
> % \item
> %   \startitemize[n] \item item 2.1 \item item 2.2 \stopitemize
> % \item item 3
> %   \startitemize[n] \item item 3.1 \item item 3.2 \stopitemize
> % \item
> %   \startitemize[n] \item item 4.1 \item item 4.2 \stopitemize
> % \stopbuffer
> %
> % \startitemize[n,repeat,6*broad,packed] \getbuffer \stopitemize
> \blank[3*big]
> % \startitemize[n,repeat,packed]         \getbuffer \stopitemize
> \blank[3*big]
> % \setupitemize[each][atmargin][width=3em]
> % \startitemize[n,repeat,packed]         \getbuffer \stopitemize
>
> 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
> ______________________________________________________________________ 
> _____________


[-- Attachment #1.2: Type: text/html, Size: 10642 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

* Re: numbered subitems
  2007-09-30 20:19   ` Alan Bowen
@ 2007-09-30 21:29     ` Aditya Mahajan
  2007-10-01  9:54       ` Henning Hraban Ramm
  2007-10-01 13:16       ` Alan Bowen
  0 siblings, 2 replies; 13+ messages in thread
From: Aditya Mahajan @ 2007-09-30 21:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 30 Sep 2007, Alan Bowen wrote:

> Thanks, Aditya, I have adapted this as follows—
> \startbuffer
> \item item 1
>   \startitemize[n,stopper={},width=1em]
>   \item item 1.1
>  \item item 1.2
>  \item item 1.3
>   \stopitemize
> \item item 2
>    \startitemize[n,stopper={},width=1em]
> \item item 2.1
>  \item  item 2.2
>  \item item 2.3
> \stopitemize
> \item item 3
>   \startitemize[n,stopper={},width=1em]
>  \item  item 3.1
>  \item  item 3.2
> \stopitemize
> \stopbuffer
> %
> \setupitemize[n,serried,packed,joinedup]
> \startitemize[repeat,4*borad]\getbuffer\stopitemize
                        ^^^^^^^
                        (add this)

> and everything works, except that I cannot seems get the subitems indented. 
> Right now they fall directly beneath the main items.

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

* Re: numbered subitems
  2007-09-30 21:29     ` Aditya Mahajan
@ 2007-10-01  9:54       ` Henning Hraban Ramm
  2007-10-01 13:16       ` Alan Bowen
  1 sibling, 0 replies; 13+ messages in thread
From: Henning Hraban Ramm @ 2007-10-01  9:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2007-09-30 um 23:29 schrieb Aditya Mahajan:
>> \startitemize[repeat,4*borad]\getbuffer\stopitemize
>                         ^^^^^^^
>                         (add this)

been too much to the movies, eh? ;-)

I guess that should be "broad"...



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

* Re: numbered subitems
  2007-09-30 21:29     ` Aditya Mahajan
  2007-10-01  9:54       ` Henning Hraban Ramm
@ 2007-10-01 13:16       ` Alan Bowen
  2007-10-02  0:11         ` Aditya Mahajan
  1 sibling, 1 reply; 13+ messages in thread
From: Alan Bowen @ 2007-10-01 13:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2080 bytes --]

Hi, Aditya—

Many thanks. That works and looks quite good. I experimented and find  
that
\startitemize[repeat,broad]\getbuffer\stopitemize
looks best.  The only downside is that there is still largish a gap  
between the stopper and the text of the main item as in

1. 	  History
	1.1 Pre-Greek (Babylonian and Egyptian) sundials
	1.2 Greek and Roman sundials
	1.3 Byzantine sundials

when

1. History
	1.1 Pre-Greek (Babylonian and Egyptian) sundials
	1.2 Greek and Roman sundials
	1.3 Byzantine sundials

is the goal. Sadly, adding “serried” destroys the indentation of the  
subitems.

Alan



On Sep 30, 2007, at 5:29 PM, Aditya Mahajan wrote:

> On Sun, 30 Sep 2007, Alan Bowen wrote:
>
>> Thanks, Aditya, I have adapted this as follows—
>> \startbuffer
>> \item item 1
>>   \startitemize[n,stopper={},width=1em]
>>   \item item 1.1
>>  \item item 1.2
>>  \item item 1.3
>>   \stopitemize
>> \item item 2
>>    \startitemize[n,stopper={},width=1em]
>> \item item 2.1
>>  \item  item 2.2
>>  \item item 2.3
>> \stopitemize
>> \item item 3
>>   \startitemize[n,stopper={},width=1em]
>>  \item  item 3.1
>>  \item  item 3.2
>> \stopitemize
>> \stopbuffer
>> %
>> \setupitemize[n,serried,packed,joinedup]
>> \startitemize[repeat,4*borad]\getbuffer\stopitemize
>                         ^^^^^^^
>                         (add this)
>
>> and everything works, except that I cannot seems get the subitems  
>> indented.
>> Right now they fall directly beneath the main items.
>
> 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
> ______________________________________________________________________ 
> _____________


[-- Attachment #1.2: Type: text/html, Size: 9673 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

* Re: numbered subitems
  2007-10-01 13:16       ` Alan Bowen
@ 2007-10-02  0:11         ` Aditya Mahajan
       [not found]           ` <4DDF8044-6E42-40AB-94EF-3FCF49ED1F08@princeton.edu>
  0 siblings, 1 reply; 13+ messages in thread
From: Aditya Mahajan @ 2007-10-02  0:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Alan,

On Mon, 1 Oct 2007, Alan Bowen wrote:

> 1. History
> 	1.1 Pre-Greek (Babylonian and Egyptian) sundials
> 	1.2 Greek and Roman sundials
> 	1.3 Byzantine sundials
>
> is the goal. Sadly, adding “serried” destroys the indentation of the 
> subitems.

I could not find a clean way to do this. So, I redefined 
\checkforrepeatedlistitem. Hans, isn't there a clean way to do this?


\setupitemize[1][fit,broad]
\setupitemize[2][width=2em]
\setupitemize[each][n]

\def\checkforrepeatedlistitem
   {\ifnum\itemlevel=\plusone
      \initializeboxstack{item}%
    \fi
    \ifconditional\repeatlistitem
       \savebox{item}{\itemlevel}{\hbox{\copy8}}%
       \setbox8\hbox %to \wd8
        {\setbox\scratchbox\hbox
           {\scratchcounter\itemlevel
            \advance\scratchcounter\minusone
            \dorecurse\scratchcounter{\foundbox{item}{\recurselevel}}}%
         \ifnum\itemlevel>\plusone
           \ifdim\wd\scratchbox>\zeropoint
            %\hskip-\dimen2
             \box\scratchbox
           \fi
         \fi
         \box8 }%
    \fi}

\starttext
\startitemize[repeat]
   \item item 1
     \startitemize
       \item item 1.1
       \item item 1.2
       \item item 1.3
     \stopitemize
   \item item 2
     \startitemize
       \item item 2.1
       \item  item 2.2
       \item item 2.3
     \stopitemize
   \item item 3
     \startitemize
       \item  item 3.1
       \item  item 3.2
     \stopitemize
\stopitemize
\stoptext


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

* Re: numbered subitems
       [not found]             ` <alpine.WNT.0.9999.0710030926370.1620@nqvgln>
@ 2007-10-04 12:55               ` Alan Bowen
  0 siblings, 0 replies; 13+ messages in thread
From: Alan Bowen @ 2007-10-04 12:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, Aditya—

This works perfectly (after changing the Yen-signs for backslashes).  
It behaves as expected when adapted and will be a great help in  
producing a number of the TOCs that are on my horizon. Many thanks  
for your time and help!

All best, Alan

> On Oct 1, 2007, at 8:11 PM, Aditya Mahajan wrote:
>
>> Hi Alan,
>> On Mon, 1 Oct 2007, Alan Bowen wrote:
>>> 1. History
>>> 	1.1 Pre-Greek (Babylonian and Egyptian) sundials
>>> 	1.2 Greek and Roman sundials
>>> 	1.3 Byzantine sundials
>>> is the goal. Sadly, adding “serried” destroys the indentation of the
>>> subitems.
>> I could not find a clean way to do this. So, I redefined
>> ¥checkforrepeatedlistitem. Hans, isn't there a clean way to do this?
>> ¥setupitemize[1][fit,broad]
>> ¥setupitemize[2][width=2em]
>> ¥setupitemize[each][n]
>> ¥def¥checkforrepeatedlistitem
>>   {¥ifnum¥itemlevel=¥plusone
>>      ¥initializeboxstack{item}%
>>    ¥fi
>>    ¥ifconditional¥repeatlistitem
>>       ¥savebox{item}{¥itemlevel}{¥hbox{¥copy8}}%
>>       ¥setbox8¥hbox %to ¥wd8
>>        {¥setbox¥scratchbox¥hbox
>>           {¥scratchcounter¥itemlevel
>>            ¥advance¥scratchcounter¥minusone
>>            ¥dorecurse¥scratchcounter{¥foundbox{item} 
>> {¥recurselevel}}}%
>>         ¥ifnum¥itemlevel>¥plusone
>>           ¥ifdim¥wd¥scratchbox>¥zeropoint
>>            %¥hskip-¥dimen2
>>             ¥box¥scratchbox
>>           ¥fi
>>         ¥fi
>>         ¥box8 }%
>>    ¥fi}
>> ¥starttext
>> ¥startitemize[repeat]
>>   ¥item item 1
>>     ¥startitemize
>>       ¥item item 1.1
>>       ¥item item 1.2
>>       ¥item item 1.3
>>     ¥stopitemize
>>   ¥item item 2
>>     ¥startitemize
>>       ¥item item 2.1
>>       ¥item  item 2.2
>>       ¥item item 2.3
>>     ¥stopitemize
>>   ¥item item 3
>>     ¥startitemize
>>       ¥item  item 3.1
>>       ¥item  item 3.2
>>     ¥stopitemize
>> ¥stopitemize
>> ¥stoptext
>> 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] 13+ messages in thread

* Re: Numbered subitems
  2007-10-24 13:25 ` Wolfgang Schuster
@ 2007-10-24 15:58   ` WN
  0 siblings, 0 replies; 13+ messages in thread
From: WN @ 2007-10-24 15:58 UTC (permalink / raw)
  To: schuster.wolfgang; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3075 bytes --]

Hi Wolfgang

In the meantime I found another way of getting the desired result. I am 
now using
enumerations out of the box, without needing extra counters.
After a bit of experimenting, this is what I did

% test code
\defineenumeration[artikel][location=left,text=Artikel,headstyle=bold,stopper=.,distance=5pt,width=broad,number=yes]
\setupenumerations[subartikel][text=,location=left,stopper=.,width=broad,distance=5pt]
\starttext
\startartikel First artikel \stopartikel
\startsubartikel Text for item 1.1. \stopsubartikel
\startsubartikel Text for item 1.2 \stopsubartikel

\startartikel Second artikel \stopartikel
\startsubartikel Text for item 2.1 \stopsubartikel
\startsubartikel Text for item 2.2 \stopsubartikel
\stoptext

Anyways, thanks for your help
Kind regards
Wim Neimeijer
>
> 2007/10/23, WN <wneimeijer@tiscali.nl <mailto:wneimeijer@tiscali.nl>>:
>
>     Hi,
>
>     I want to make a numbered list as follows
>
>     *Artikel 1. First artikel
>
>     *1.1. Text for item 1.1.
>     1.2. Text for item 1.2
>
>     *Artikel 2. Second artikel*
>
>     2.1.  Text for item 2.1
>     2.2.  Text for item 2.2
>
>     etc.
>
>     I am trying to accomplish this with \setupitemgroup and
>     \defineitemgroup as
>     follows, but the second level start also with Artikel and is indented.
>     I looked at the some of the emails relating to numbered subitems
>     but could not find a working example.
>
>     Thanks for any help
>     Wim
>
>
>     % test code
>
>
> \def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1}
> \defineconversion[firstlevelnumber][\firstlevelnumber]
>
> \def\secondlevelnumber#1{\thefirstlevelnumber.#1}
> \defineconversion[secondlevelnumber][\secondlevelnumber]
>
>     \defineitemgroup[mylist][levels=2]
>     \setupitemgroup[mylist][1][atmargin][n,repeat]
>
>
> \setupitemgroup[mylist][1][atmargin][n,firstlevelnumber]
>
>     \setupitemgroup[mylist][1][width=5em,stopper=.,headstyle=bold,left=Artikel
>     ]
>     \setupitemgroup[mylist][2][atmargin][n,repeat]
>
>
> \setupitemgroup[mylist][2][atmargin][n,secondlevelnumber]
>
>     \setupitemgroup[mylist][2][width=2em,stopper=.,left=]
>
>     \startext
>     \startmylist
>     \head First artikel
>
>     \startmylist
>     \item Text for item 1.1.
>     \item Text for item 1.1.
>     \stopmylist
>
>     \head Second artikel
>
>     \startmylist
>     \item Text for item 2.1
>     \item Text for item 2.2
>     \stopmylist
>
>     \stopmylist
>     \stoptext
>
>
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>   


[-- Attachment #1.2: Type: text/html, Size: 4965 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

* Re: Numbered subitems
  2007-10-23 16:02 Numbered subitems WN
@ 2007-10-24 13:25 ` Wolfgang Schuster
  2007-10-24 15:58   ` WN
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Schuster @ 2007-10-24 13:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1479 bytes --]

2007/10/23, WN <wneimeijer@tiscali.nl>:
>
>  Hi,
>
> I want to make a numbered list as follows
>
> *Artikel 1. First artikel
>
> *1.1. Text for item 1.1.
> 1.2. Text for item 1.2
>
> *Artikel 2. Second artikel*
>
> 2.1.  Text for item 2.1
> 2.2.  Text for item 2.2
>
> etc.
>
> I am trying to accomplish this with \setupitemgroup and \defineitemgroup
> as
> follows, but the second level start also with Artikel and is indented.
> I looked at the some of the emails relating to numbered subitems
> but could not find a working example.
>
> Thanks for any help
> Wim
>
>
> % test code
>

\def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1}
\defineconversion[firstlevelnumber][\firstlevelnumber]

\def\secondlevelnumber#1{\thefirstlevelnumber.#1}
\defineconversion[secondlevelnumber][\secondlevelnumber]

\defineitemgroup[mylist][levels=2]
> \setupitemgroup[mylist][1][atmargin][n,repeat]
>

\setupitemgroup[mylist][1][atmargin][n,firstlevelnumber]

\setupitemgroup[mylist][1][width=5em,stopper=.,headstyle=bold,left=Artikel ]
> \setupitemgroup[mylist][2][atmargin][n,repeat]
>

\setupitemgroup[mylist][2][atmargin][n,secondlevelnumber]

\setupitemgroup[mylist][2][width=2em,stopper=.,left=]
>
> \startext
> \startmylist
> \head First artikel
>
> \startmylist
> \item Text for item 1.1.
> \item Text for item 1.1.
> \stopmylist
>
> \head Second artikel
>
> \startmylist
> \item Text for item 2.1
> \item Text for item 2.2
> \stopmylist
>
> \stopmylist
> \stoptext
>

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

* Numbered subitems
@ 2007-10-23 16:02 WN
  2007-10-24 13:25 ` Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: WN @ 2007-10-23 16:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 996 bytes --]

Hi,

I want to make a numbered list as follows

*Artikel 1. First artikel

*1.1. Text for item 1.1.
1.2. Text for item 1.2

*Artikel 2. Second artikel*

2.1.  Text for item 2.1
2.2.  Text for item 2.2

etc.

I am trying to accomplish this with \setupitemgroup and \defineitemgroup as
follows, but the second level start also with Artikel and is indented.
I looked at the some of the emails relating to numbered subitems
but could not find a working example.

Thanks for any help
Wim


% test code
\defineitemgroup[mylist][levels=2]
\setupitemgroup[mylist][1][atmargin][n,repeat]
\setupitemgroup[mylist][1][width=5em,stopper=.,headstyle=bold,left=Artikel ]
\setupitemgroup[mylist][2][atmargin][n,repeat]
\setupitemgroup[mylist][2][width=2em,stopper=.,left=]

\startext
\startmylist
\head First artikel

\startmylist
\item Text for item 1.1.
\item Text for item 1.1.
\stopmylist

\head Second artikel

\startmylist
\item Text for item 2.1
\item Text for item 2.2
\stopmylist

\stopmylist
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1359 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

end of thread, other threads:[~2007-10-24 15:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-30 14:59 numbered subitems Alan Bowen
2007-09-30 16:11 ` Wolfgang Schuster
2007-09-30 20:19   ` Alan Bowen
2007-09-30 16:28 ` Aditya Mahajan
2007-09-30 20:19   ` Alan Bowen
2007-09-30 21:29     ` Aditya Mahajan
2007-10-01  9:54       ` Henning Hraban Ramm
2007-10-01 13:16       ` Alan Bowen
2007-10-02  0:11         ` Aditya Mahajan
     [not found]           ` <4DDF8044-6E42-40AB-94EF-3FCF49ED1F08@princeton.edu>
     [not found]             ` <alpine.WNT.0.9999.0710030926370.1620@nqvgln>
2007-10-04 12:55               ` Alan Bowen
2007-10-23 16:02 Numbered subitems WN
2007-10-24 13:25 ` Wolfgang Schuster
2007-10-24 15:58   ` WN

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