* Skipping item numbers in an itemized list?
@ 2011-04-27 13:53 Alasdair McAndrew
2011-04-27 14:19 ` Wolfgang Schuster
2011-04-27 14:22 ` Otared Kavian
0 siblings, 2 replies; 8+ messages in thread
From: Alasdair McAndrew @ 2011-04-27 13:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 299 bytes --]
Hello,
The effect I want is something like:
1. First item
2. Second item
5. Fifth item
6. Sixth item
8. Eight item
and so on. Every now and then I need to skip a number or two. In LaTeX I
could do this with \addtocounter{enumi}{2} - but how is this done in
ConTeXt?
Thanks very much,
Alasdair
[-- Attachment #1.2: Type: text/html, Size: 345 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 13:53 Skipping item numbers in an itemized list? Alasdair McAndrew
@ 2011-04-27 14:19 ` Wolfgang Schuster
2011-04-27 14:39 ` Ulrike Fischer
2011-04-27 14:22 ` Otared Kavian
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2011-04-27 14:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 27.04.2011 um 15:53 schrieb Alasdair McAndrew:
> Hello,
>
> The effect I want is something like:
>
> 1. First item
> 2. Second item
> 5. Fifth item
> 6. Sixth item
> 8. Eight item
>
> and so on. Every now and then I need to skip a number or two. In LaTeX I could do this with \addtocounter{enumi}{2} - but how is this done in ConTeXt?
\starttext
\startitemize
\sym{1.} First item
\sym{2.} Second item
\sym{5.} Fifth item
\sym{6.} Sixth item
\sym{8.} Eight item
\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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 13:53 Skipping item numbers in an itemized list? Alasdair McAndrew
2011-04-27 14:19 ` Wolfgang Schuster
@ 2011-04-27 14:22 ` Otared Kavian
1 sibling, 0 replies; 8+ messages in thread
From: Otared Kavian @ 2011-04-27 14:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1575 bytes --]
Hi Alasdair,
Is this what you want?
\starttext
\startitemize[n]
\dorecurse{4}{\item text}
\stopitemize
\input knuth.tex
\startitemize[n,continue]
\dorecurse{4}{\item text}
\stopitemize
\startitemize[n][start=17]
\dorecurse{4}{\item text}
\stopitemize
\stoptext
I have this from an answer by Wolfgang S.
Best regards: OK
On 27 avr. 2011, at 15:53, Alasdair McAndrew wrote:
> Hello,
>
> The effect I want is something like:
>
> 1. First item
> 2. Second item
> 5. Fifth item
> 6. Sixth item
> 8. Eight item
>
> and so on. Every now and then I need to skip a number or two. In LaTeX I could do this with \addtocounter{enumi}{2} - but how is this done in ConTeXt?
>
> Thanks very much,
> Alasdair
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 avenue des Etats Unis
78035 Versailles cedex
Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44
Secrétariat: +33 1 39 25 46 46
e-mail: Otared.Kavian@math.uvsq.fr
[-- Attachment #1.2: Type: text/html, Size: 2877 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 14:19 ` Wolfgang Schuster
@ 2011-04-27 14:39 ` Ulrike Fischer
2011-04-27 14:45 ` Andreas Harder
2011-04-27 15:21 ` Aditya Mahajan
0 siblings, 2 replies; 8+ messages in thread
From: Ulrike Fischer @ 2011-04-27 14:39 UTC (permalink / raw)
To: ntg-context
Am Wed, 27 Apr 2011 16:19:45 +0200 schrieb Wolfgang Schuster:
> Am 27.04.2011 um 15:53 schrieb Alasdair McAndrew:
>
>> Hello,
>>
>> The effect I want is something like:
>>
>> 1. First item
>> 2. Second item
>> 5. Fifth item
>> 6. Sixth item
>> 8. Eight item
>> and so on. Every now and then I need to skip a number or two.
>> In LaTeX I could do this with \addtocounter{enumi}{2} - but how
>> is this done in ConTeXt?
> \starttext
>
> \startitemize
> \sym{1.} First item
> \sym{2.} Second item
> \sym{5.} Fifth item
> \sym{6.} Sixth item
> \sym{8.} Eight item
> \stopitemize
>
> \stoptext
You can't be serious ;-). Do you really think one should enter all
numbers manually only because someone wants to skip e.g. the number
"13"? There must be a counter around and a way to advance it.
From the code I think this should be used:
\starttext
\startitemize[n]
\item here we list the points,
\item one after the other.
\doadvanceitem
\item blub
\stopitemize
\stoptext
--
Ulrike Fischer
___________________________________________________________________________________
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] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 14:39 ` Ulrike Fischer
@ 2011-04-27 14:45 ` Andreas Harder
2011-04-27 15:21 ` Aditya Mahajan
1 sibling, 0 replies; 8+ messages in thread
From: Andreas Harder @ 2011-04-27 14:45 UTC (permalink / raw)
To: news3, mailing list for ConTeXt users
Am 27.04.2011 um 16:39 schrieb Ulrike Fischer:
> Am Wed, 27 Apr 2011 16:19:45 +0200 schrieb Wolfgang Schuster:
>
>> Am 27.04.2011 um 15:53 schrieb Alasdair McAndrew:
>>
>>> Hello,
>>>
>>> The effect I want is something like:
>>>
>>> 1. First item
>>> 2. Second item
>>> 5. Fifth item
>>> 6. Sixth item
>>> 8. Eight item
>
>>> and so on. Every now and then I need to skip a number or two.
>>> In LaTeX I could do this with \addtocounter{enumi}{2} - but how
>>> is this done in ConTeXt?
>
>> \starttext
>>
>> \startitemize
>> \sym{1.} First item
>> \sym{2.} Second item
>> \sym{5.} Fifth item
>> \sym{6.} Sixth item
>> \sym{8.} Eight item
>> \stopitemize
>>
>> \stoptext
>
> You can't be serious ;-). Do you really think one should enter all
> numbers manually only because someone wants to skip e.g. the number
> "13"? There must be a counter around and a way to advance it.
>
> From the code I think this should be used:
>
> \starttext
>
> \startitemize[n]
> \item here we list the points,
> \item one after the other.
> \doadvanceitem
> \item blub
> \stopitemize
> \stoptext
What about the following?
\starttext
\startitemize[n]
\item one
\noitem
\item three
\stopitemize
\stoptext
Andreas
___________________________________________________________________________________
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] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 14:39 ` Ulrike Fischer
2011-04-27 14:45 ` Andreas Harder
@ 2011-04-27 15:21 ` Aditya Mahajan
2011-04-27 17:33 ` Ulrike Fischer
1 sibling, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2011-04-27 15:21 UTC (permalink / raw)
To: news3, mailing list for ConTeXt users
On Wed, 27 Apr 2011, Ulrike Fischer wrote:
> Am Wed, 27 Apr 2011 16:19:45 +0200 schrieb Wolfgang Schuster:
>
>> Am 27.04.2011 um 15:53 schrieb Alasdair McAndrew:
>>
>>> Hello,
>>>
>>> The effect I want is something like:
>>>
>>> 1. First item
>>> 2. Second item
>>> 5. Fifth item
>>> 6. Sixth item
>>> 8. Eight item
>
>>> and so on. Every now and then I need to skip a number or two.
>>> In LaTeX I could do this with \addtocounter{enumi}{2} - but how
>>> is this done in ConTeXt?
>
>> \starttext
>>
>> \startitemize
>> \sym{1.} First item
>> \sym{2.} Second item
>> \sym{5.} Fifth item
>> \sym{6.} Sixth item
>> \sym{8.} Eight item
>> \stopitemize
>>
>> \stoptext
>
> You can't be serious ;-). Do you really think one should enter all
> numbers manually only because someone wants to skip e.g. the number
> "13"?
You can't be serious ;) Do you really think that one should manually
increment a counter. What's next: using {\bfa Some title} for section
titles?
More seriously, if there is a logic behind such a counter, then you can
use:
\defineconversion[fancy][1,2,5,6,8]
% or a TeX or Lua command that generates the count
\startitemize[fancy] ....
> There must be a counter around and a way to advance it.
If you insist,
\setstructurecounter[\currentitemgroupcounter]{5}
There is no interface to increment the counter by arbitrary amount, but
you can define your own interface to structures.counters.add:
\unprotected
\def\addtostructurecounter [#1]#2{\ctxlua{structures.counters.add
("\@@thestructurecounter{#1}",1,#2)}}
and then use
\addtostructurecounter[\currentitemgroupcounter]{2}
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 15:21 ` Aditya Mahajan
@ 2011-04-27 17:33 ` Ulrike Fischer
2011-04-28 3:47 ` Alasdair McAndrew
0 siblings, 1 reply; 8+ messages in thread
From: Ulrike Fischer @ 2011-04-27 17:33 UTC (permalink / raw)
To: ntg-context
Am Wed, 27 Apr 2011 11:21:31 -0400 (EDT) schrieb Aditya Mahajan:
>>>> and so on. Every now and then I need to skip a number or two.
>>>> In LaTeX I could do this with \addtocounter{enumi}{2} - but how
>>>> is this done in ConTeXt?
>>> \starttext
>>>
>>> \startitemize
>>> \sym{1.} First item
>>> \sym{2.} Second item
>>> \sym{5.} Fifth item
>>> \sym{6.} Sixth item
>>> \sym{8.} Eight item
>>> \stopitemize
>>>
>>> \stoptext
>> You can't be serious ;-). Do you really think one should enter all
>> numbers manually only because someone wants to skip e.g. the number
>> "13"?
>
> You can't be serious ;) Do you really think that one should manually
> increment a counter. What's next: using {\bfa Some title} for section
> titles?
>
> More seriously, if there is a logic behind such a counter,
Well I have long stopped to wonder why people sometimes needs
"holes" in a numbered list. It sometimes happens. Perhaps the OP
want to make a list of name of occupants of houses where some
numbers haven't yet been assigned.
> then you can use:
> \defineconversion[fancy][1,2,5,6,8]
This is ok if the complete list is not too long and when you know
which numbers the "holes" should have, but I would suspect that
Alasdair want to be able to increment somewhere the actual counter
by 1 or 2 without having to check the actual number first.
> There is no interface to increment the counter by arbitrary amount, but
> you can define your own interface to structures.counters.add:
>
> \unprotected
> \def\addtostructurecounter [#1]#2{\ctxlua{structures.counters.add
> ("\@@thestructurecounter{#1}",1,#2)}}
>
> and then use
>
> \addtostructurecounter[\currentitemgroupcounter]{2}
I would say that's what Alasdair wants.
--
Ulrike Fischer
___________________________________________________________________________________
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] 8+ messages in thread
* Re: Skipping item numbers in an itemized list?
2011-04-27 17:33 ` Ulrike Fischer
@ 2011-04-28 3:47 ` Alasdair McAndrew
0 siblings, 0 replies; 8+ messages in thread
From: Alasdair McAndrew @ 2011-04-28 3:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2750 bytes --]
Thanks all, for your answers and discussion to my query. For the record,
I'm writing up answers to a long list of questions, some of which don't need
a written answer (just asking the reader to observe something). A quick
check has verified than \noitem does exactly what I want.
Thanks again,
Alasdair
On Thu, Apr 28, 2011 at 3:33 AM, Ulrike Fischer <news3@nililand.de> wrote:
> Am Wed, 27 Apr 2011 11:21:31 -0400 (EDT) schrieb Aditya Mahajan:
>
>
> >>>> and so on. Every now and then I need to skip a number or two.
> >>>> In LaTeX I could do this with \addtocounter{enumi}{2} - but how
> >>>> is this done in ConTeXt?
>
> >>> \starttext
> >>>
> >>> \startitemize
> >>> \sym{1.} First item
> >>> \sym{2.} Second item
> >>> \sym{5.} Fifth item
> >>> \sym{6.} Sixth item
> >>> \sym{8.} Eight item
> >>> \stopitemize
> >>>
> >>> \stoptext
>
> >> You can't be serious ;-). Do you really think one should enter all
> >> numbers manually only because someone wants to skip e.g. the number
> >> "13"?
> >
> > You can't be serious ;) Do you really think that one should manually
> > increment a counter. What's next: using {\bfa Some title} for section
> > titles?'
> >
> > More seriously, if there is a logic behind such a counter,
>
> Well I have long stopped to wonder why people sometimes needs
> "holes" in a numbered list. It sometimes happens. Perhaps the OP
> want to make a list of name of occupants of houses where some
> numbers haven't yet been assigned.
>
> > then you can use:
>
> > \defineconversion[fancy][1,2,5,6,8]
>
> This is ok if the complete list is not too long and when you know
> which numbers the "holes" should have, but I would suspect that
> Alasdair want to be able to increment somewhere the actual counter
> by 1 or 2 without having to check the actual number first.
>
>
>
> > There is no interface to increment the counter by arbitrary amount, but
> > you can define your own interface to structures.counters.add:
> >
> > \unprotected
> > \def\addtostructurecounter [#1]#2{\ctxlua{structures.counters.add
> > ("\@@thestructurecounter{#1}",1,#2)}}
> >
> > and then use
> >
> > \addtostructurecounter[\currentitemgroupcounter]{2}
>
>
> I would say that's what Alasdair wants.
>
>
> --
> Ulrike Fischer
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 4061 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-04-28 3:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-27 13:53 Skipping item numbers in an itemized list? Alasdair McAndrew
2011-04-27 14:19 ` Wolfgang Schuster
2011-04-27 14:39 ` Ulrike Fischer
2011-04-27 14:45 ` Andreas Harder
2011-04-27 15:21 ` Aditya Mahajan
2011-04-27 17:33 ` Ulrike Fischer
2011-04-28 3:47 ` Alasdair McAndrew
2011-04-27 14:22 ` Otared Kavian
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).