* [NTG-context] how can I reset section counter when recursing buffers?
@ 2024-10-01 15:02 Damien Thiriet via ntg-context
2024-10-01 16:09 ` [NTG-context] " Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Damien Thiriet via ntg-context @ 2024-10-01 15:02 UTC (permalink / raw)
To: ntg-context; +Cc: damien
Hello,
When I call a buffer with sections several times, I would like to get
the same headers numbers
for each buffer call. (So, in my MWE twice 1 and 2, not 1, 2, 3, 4)
How can I reset the section counter within a dorecurse run?
I tried \resetcounter [section] but that is not the good way.
I read about \headnumber and \namedheadnumber but could'nt go further.
My MWE:
\startbuffer
\startsection[title={foo}]
\input ward
\stopsection
\startsection[title={bar}]
\input knuth
\stopsection
\stopbuffer
\starttext
\dorecurse{2}{
% how can I reset chapter number?
\getbuffer
}
\stoptext
Thanks,
Damien
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: how can I reset section counter when recursing buffers?
2024-10-01 15:02 [NTG-context] how can I reset section counter when recursing buffers? Damien Thiriet via ntg-context
@ 2024-10-01 16:09 ` Wolfgang Schuster
2024-10-03 10:28 ` Damien Thiriet via ntg-context
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2024-10-01 16:09 UTC (permalink / raw)
To: mailing list for ConTeXt users, Damien Thiriet via ntg-context; +Cc: damien
Damien Thiriet via ntg-context schrieb am 01.10.2024 um 17:02:
> Hello,
>
>
> When I call a buffer with sections several times, I would like to get
> the same headers numbers
> for each buffer call. (So, in my MWE twice 1 and 2, not 1, 2, 3, 4)
> How can I reset the section counter within a dorecurse run?
> I tried \resetcounter [section] but that is not the good way.
> I read about \headnumber and \namedheadnumber but could'nt go further.
>
> My MWE:
>
> \startbuffer
> \startsection[title={foo}]
> \input ward
> \stopsection
> \startsection[title={bar}]
> \input knuth
> \stopsection
> \stopbuffer
>
> \starttext
> \dorecurse{2}{
> % how can I reset chapter number?
\setupheadnumber[section][0]
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-03 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-01 15:02 [NTG-context] how can I reset section counter when recursing buffers? Damien Thiriet via ntg-context
2024-10-01 16:09 ` [NTG-context] " Wolfgang Schuster
2024-10-03 10:28 ` Damien Thiriet via ntg-context
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).