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. \startluacode function document.leadingzeros(str) local lzeros = 3-str:len() return ("0"):rep(lzeros) end \stopluacode \unexpanded\def\lzeros#1% {\cldcontext{document.leadingzeros("#1")}}
* 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! Pablo