* Section numbering starting from zero, not one @ 2023-02-16 16:32 Alex Leray via ntg-context 2023-02-16 19:07 ` Alex Leray via ntg-context 0 siblings, 1 reply; 3+ messages in thread From: Alex Leray via ntg-context @ 2023-02-16 16:32 UTC (permalink / raw) To: Denis Maier via ntg-context; +Cc: Alex Leray Hello, I'd like to have roman numerals prefixed sections, but starting from Zero and not One (even if I know that roman numerals don't have a sign for 0). Is there a way to achieve this? My code looks like that at the moment: ### \setuphead[section][conversion=Romannumerals] \starttext \setupheadnumber[section] [-1] \startsection[title={Section zero}]\stopsection \startsection[title={Section one}]\stopsection \stoptext ### Thank you, Alex ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Section numbering starting from zero, not one 2023-02-16 16:32 Section numbering starting from zero, not one Alex Leray via ntg-context @ 2023-02-16 19:07 ` Alex Leray via ntg-context 2023-02-16 22:41 ` Hans Hagen via ntg-context 0 siblings, 1 reply; 3+ messages in thread From: Alex Leray via ntg-context @ 2023-02-16 19:07 UTC (permalink / raw) To: ntg-context; +Cc: Alex Leray Answering my own question… this fits my needs: ### \defineconversion[romannumeralszero][0, I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIII, XIX, XX, XXI] \setuphead[section][conversion=romannumeralszero] \starttext \startsection[title={Section zero}]foo\stopsection \startsection[title={Section 1}]bar\stopsection \stoptext ### Sorry for the noise Le 16/02/23 à 17:32, Alex Leray via ntg-context a écrit : > Hello, > > I'd like to have roman numerals prefixed sections, but starting from > Zero and not One (even if I know that roman numerals don't have a sign > for 0). > > Is there a way to achieve this? My code looks like that at the moment: > > ### > > \setuphead[section][conversion=Romannumerals] > > \starttext > \setupheadnumber[section] [-1] > \startsection[title={Section zero}]\stopsection > \startsection[title={Section one}]\stopsection > \stoptext > > ### > > Thank you, > > Alex > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry > to the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___________________________________________________________________________________ -- Alexandre Leray +32 487 947 030 Avez-vous pensé à (vous) offrir Médor ? https://medor.coop/ideescadeau ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Section numbering starting from zero, not one 2023-02-16 19:07 ` Alex Leray via ntg-context @ 2023-02-16 22:41 ` Hans Hagen via ntg-context 0 siblings, 0 replies; 3+ messages in thread From: Hans Hagen via ntg-context @ 2023-02-16 22:41 UTC (permalink / raw) To: Alex Leray via ntg-context; +Cc: Hans Hagen On 2/16/2023 8:07 PM, Alex Leray via ntg-context wrote: > Answering my own question… this fits my needs: > > ### > > \defineconversion[romannumeralszero][0, I, II, III, IV, V, VI, VII, > VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIII, XIX, XX, XXI] > > \setuphead[section][conversion=romannumeralszero] > > \starttext > \startsection[title={Section zero}]foo\stopsection > > \startsection[title={Section 1}]bar\stopsection > \stoptext > > ### > > Sorry for the noise you can often find hints in the test suite (many small files) > Le 16/02/23 à 17:32, Alex Leray via ntg-context a écrit : >> Hello, >> >> I'd like to have roman numerals prefixed sections, but starting from >> Zero and not One (even if I know that roman numerals don't have a sign >> for 0). >> >> Is there a way to achieve this? My code looks like that at the moment: >> >> ### >> >> \setuphead[section][conversion=Romannumerals] >> >> \starttext >> \setupheadnumber[section] [-1] >> \startsection[title={Section zero}]\stopsection >> \startsection[title={Section one}]\stopsection >> \stoptext >> >> ### >> >> Thank you, >> >> Alex >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an entry >> to the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> ___________________________________________________________________________________ > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-16 22:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-02-16 16:32 Section numbering starting from zero, not one Alex Leray via ntg-context 2023-02-16 19:07 ` Alex Leray via ntg-context 2023-02-16 22:41 ` Hans Hagen 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).