Re: [NTG-context] Section numbering starting from zero, not one

2023-02-16 Thread Hans Hagen via ntg-context

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
___


Re: [NTG-context] Section numbering starting from zero, not one

2023-02-16 Thread Alex Leray via ntg-context

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
___


[NTG-context] Section numbering starting from zero, not one

2023-02-16 Thread Alex Leray via ntg-context

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
___