[NTG-context] numbering questions

Pablo Rodriguez oinos at gmx.es
Sat Dec 31 20:41:53 CET 2022

On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:
> I’m playing with some examples of section numbering.
> * Is there a setup to influence the order of number segments? I.e. can I 
> have “section.chapter.part“ instead of “part.chapter.section”?

I thought sectionsegments=section:chapter would work, but it doesn’t.

> * How can I format the segments, e.g. to get two or three digits each 
> (leading zeros)?

The easy part is to have the leading zeros, but I cannot get it working
with numbercommand or deepnumbercommand.

  function document.leadingzeros(str)
    local lzeros = 3-str:len()
    return ("0"):rep(lzeros)

> * I can force a section number with “ownnumber”, but the next one is 
> back in the previous scheme. Itemize has “start”. How can I start 
> section chapter numbering at 3 (or -1 or whatever; I know I can start at 
> 0 with “zero”) and let ConTeXt continue from there?

\setupheadnumber[chapter][3] % will start with 4

I hope it helps. »Einen guten Rutsch ins Neujahr!«

Happy New Year to all!


More information about the ntg-context mailing list