ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* how to (re)set section numbers
@ 2014-12-30 19:01 j. van den hoff
  2015-01-01 19:00 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: j. van den hoff @ 2014-12-30 19:01 UTC (permalink / raw)
  To: ntg-context

I have followed the recommendations how to include unnumbered sections in  
the table-of-content along
the lines

\setuphead[subject]
      [incrementnumber=yes,number=no]


etc.
this works OK if the unnumbered sections are at the end of the document.  
otherwise the enumeration of the actually
(visibly) numbered sections is messed up (i.e. if a `subject' section  
goes, e.g. _before_ all actually enumerated
sections, there counters are off by one).

question: what is the best way of (re)setting the section counters? i.e.  
if the doucment structure is, e.g.,

\subject
\section
\subsection
\section
\subject

I'd like to end up with the ToC containing entries for all subjects and  
sections but the numbered sections should occur (in ToC and document) as  
1, 1.1, 2 rather than 2 2.1, 3 (in this example). I was not able to find a  
solution in the documenation/wiki.

thx,
joerg

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
___________________________________________________________________________________
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] 6+ messages in thread

* Re: how to (re)set section numbers
  2014-12-30 19:01 how to (re)set section numbers j. van den hoff
@ 2015-01-01 19:00 ` Wolfgang Schuster
  2015-01-01 19:16   ` j. van den hoff
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2015-01-01 19:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 30.12.2014 um 20:01 schrieb j. van den hoff <veedeehjay@googlemail.com>:
> 
> I have followed the recommendations how to include unnumbered sections in the table-of-content along
> the lines
> 
> \setuphead[subject]
>     [incrementnumber=yes,number=no]
> 
> 
> etc.
> this works OK if the unnumbered sections are at the end of the document. otherwise the enumeration of the actually
> (visibly) numbered sections is messed up (i.e. if a `subject' section goes, e.g. _before_ all actually enumerated
> sections, there counters are off by one).
> 
> question: what is the best way of (re)setting the section counters? i.e. if the doucment structure is, e.g.,
> 
> \subject
> \section
> \subsection
> \section
> \subject
> 
> I'd like to end up with the ToC containing entries for all subjects and sections but the numbered sections should occur (in ToC and document) as 1, 1.1, 2 rather than 2 2.1, 3 (in this example). I was not able to find a solution in the documenation/wiki.

Can you send a *working* minimal example.

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

* Re: how to (re)set section numbers
  2015-01-01 19:00 ` Wolfgang Schuster
@ 2015-01-01 19:16   ` j. van den hoff
  2015-01-01 19:48     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: j. van den hoff @ 2015-01-01 19:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Wolfgang Schuster

On Thu, 01 Jan 2015 20:00:00 +0100, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

>
>> Am 30.12.2014 um 20:01 schrieb j. van den hoff  
>> <veedeehjay@googlemail.com>:
>>
>> I have followed the recommendations how to include unnumbered sections  
>> in the table-of-content along
>> the lines
>>
>> \setuphead[subject]
>>     [incrementnumber=yes,number=no]
>>
>>
>> etc.
>> this works OK if the unnumbered sections are at the end of the  
>> document. otherwise the enumeration of the actually
>> (visibly) numbered sections is messed up (i.e. if a `subject' section  
>> goes, e.g. _before_ all actually enumerated
>> sections, there counters are off by one).
>>
>> question: what is the best way of (re)setting the section counters?  
>> i.e. if the doucment structure is, e.g.,
>>
>> \subject
>> \section
>> \subsection
>> \section
>> \subject
>>
>> I'd like to end up with the ToC containing entries for all subjects and  
>> sections but the numbered sections should occur (in ToC and document)  
>> as 1, 1.1, 2 rather than 2 2.1, 3 (in this example). I was not able to  
>> find a solution in the documenation/wiki.
>
> Can you send a *working* minimal example.

yes, of course (I presumed this to be not necessary here):

\setuphead[subject]
    [incrementnumber=yes, number=no]
    \setuplist[section][width=1.5em]
    \setuplist[subsection][width=2.25em, margin=1.5em] %`margin' determines  
alignment
    \setuplist[subject][margin=1.5em]
\setupcombinedlist[content]  
[list={chapter,section,subsection,subject,subsubject}]
\starttext
\completecontent
\subject{this subject messes up the further enumeration of numbered  
sections}
bla
\section{this should be sec. 1}
bla
\subsection{this should be subsec. 1.1}
bla
\section{this should be sec. 2}
bla
\subject{this subject does no harm...}
bla
\stoptext

In my real life example the first `subject', e.g., contains a Glossary of  
abbreviations and I want to start the actual enumeration with the body  
text proper (Introduction and onwards), while still listing the glossary  
in the ToC. and I did not find any other (general) solution in the docs,  
how to include unnumbered sections in the ToC...

thx, joerg

>
> Wolfgang


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
___________________________________________________________________________________
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] 6+ messages in thread

* Re: how to (re)set section numbers
  2015-01-01 19:16   ` j. van den hoff
@ 2015-01-01 19:48     ` Wolfgang Schuster
  2015-01-01 20:22       ` j. van den hoff
  2015-01-01 20:57       ` j. van den hoff
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2015-01-01 19:48 UTC (permalink / raw)
  To: j. van den hoff; +Cc: mailing list for ConTeXt users


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


> Am 01.01.2015 um 20:16 schrieb j. van den hoff <veedeehjay@googlemail.com>:
> 
> On Thu, 01 Jan 2015 20:00:00 +0100, Wolfgang Schuster <schuster.wolfgang@gmail.com <mailto:schuster.wolfgang@gmail.com>> wrote:
> 
>> 
>>> Am 30.12.2014 um 20:01 schrieb j. van den hoff <veedeehjay@googlemail.com>:
>>> 
>>> I have followed the recommendations how to include unnumbered sections in the table-of-content along
>>> the lines
>>> 
>>> \setuphead[subject]
>>>    [incrementnumber=yes,number=no]
>>> 
>>> 
>>> etc.
>>> this works OK if the unnumbered sections are at the end of the document. otherwise the enumeration of the actually
>>> (visibly) numbered sections is messed up (i.e. if a `subject' section goes, e.g. _before_ all actually enumerated
>>> sections, there counters are off by one).
>>> 
>>> question: what is the best way of (re)setting the section counters? i.e. if the doucment structure is, e.g.,
>>> 
>>> \subject
>>> \section
>>> \subsection
>>> \section
>>> \subject
>>> 
>>> I'd like to end up with the ToC containing entries for all subjects and sections but the numbered sections should occur (in ToC and document) as 1, 1.1, 2 rather than 2 2.1, 3 (in this example). I was not able to find a solution in the documenation/wiki.
>> 
>> Can you send a *working* minimal example.
> 
> yes, of course (I presumed this to be not necessary here):
> 
> \setuphead[subject]
>   [incrementnumber=yes, number=no]
>   \setuplist[section][width=1.5em]
>   \setuplist[subsection][width=2.25em, margin=1.5em] %`margin' determines alignment
>   \setuplist[subject][margin=1.5em]
> \setupcombinedlist[content] [list={chapter,section,subsection,subject,subsubject}]
> \starttext
> \completecontent
> \subject{this subject messes up the further enumeration of numbered sections}
> bla
> \section{this should be sec. 1}
> bla
> \subsection{this should be subsec. 1.1}
> bla
> \section{this should be sec. 2}
> bla
> \subject{this subject does no harm...}
> bla
> \stoptext
> 
> In my real life example the first `subject', e.g., contains a Glossary of abbreviations and I want to start the actual enumeration with the body text proper (Introduction and onwards), while still listing the glossary in the ToC. and I did not find any other (general) solution in the docs, how to include unnumbered sections in the ToC…

You need

    \setuphead[subject][incrementnumber=list]

because when you write „incrementnumber=yes” you tell context to increment the counter for \subject
which uses by default the \section counter.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 21154 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] 6+ messages in thread

* Re: how to (re)set section numbers
  2015-01-01 19:48     ` Wolfgang Schuster
@ 2015-01-01 20:22       ` j. van den hoff
  2015-01-01 20:57       ` j. van den hoff
  1 sibling, 0 replies; 6+ messages in thread
From: j. van den hoff @ 2015-01-01 20:22 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On Thu, 01 Jan 2015 20:48:48 +0100, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

> You need
>    \setuphead[subject][incrementnumber=list]
> because when you write „incrementnumber=yes” you tell context to  
> increment the counter for \subject
> which uses by default the \section counter.

I see. thanks a lot. I took my 'wisdom' from  
http://wiki.contextgarden.net/Table_of_Contents#Including_unnumbered_heads_in_the_ToC
which seems somewhat deficient. I'd try to augment that section. anyway,  
there seems no documentation of what `incrementnumber=list' is doing?
is it only there to lead to listing/inclusion of the respective section  
type in the ToC?

although you've solved my present problem perfectly: _is_ there a way to  
reset the (sub)section counters (or to set them to prescribed values)?


joerg


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
___________________________________________________________________________________
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] 6+ messages in thread

* Re: how to (re)set section numbers
  2015-01-01 19:48     ` Wolfgang Schuster
  2015-01-01 20:22       ` j. van den hoff
@ 2015-01-01 20:57       ` j. van den hoff
  1 sibling, 0 replies; 6+ messages in thread
From: j. van den hoff @ 2015-01-01 20:57 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

> You need
>
>     \setuphead[subject][incrementnumber=list]
>
> because when you write „incrementnumber=yes” you tell context to  
> increment the counter for \subject
> which uses by default the \section counter.
>
> Wolfgang


FYI, I've tried to update the wiki accordingly:  
http://wiki.contextgarden.net/Table_of_Contents#Including_unnumbered_heads_in_the_ToC

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
___________________________________________________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2015-01-01 20:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-30 19:01 how to (re)set section numbers j. van den hoff
2015-01-01 19:00 ` Wolfgang Schuster
2015-01-01 19:16   ` j. van den hoff
2015-01-01 19:48     ` Wolfgang Schuster
2015-01-01 20:22       ` j. van den hoff
2015-01-01 20:57       ` j. van den hoff

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