A happy new year to everyone!

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”?

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

* 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?


My example tries to (ab)use the section numbering for a date (e.g. for a diary):

-----
\definestructureconversionset[default][n,n,month,n][n]
\definestructureseparatorset [default][-,-,-,-]

\definehead[Year][chapter]
\definehead[Month][section]
\definehead[Day][subsection]

\define[2]\TitleCmd{#1} % number only

\setuphead[Year,Month,Day][number=yes,page=no,command=\TitleCmd]
\setuphead[Year][page=yes]
%\setuphead[Month][]
\setuphead[Day][style={\ss\bf}]

\def\Dummycontent{
    \dorecurse{12}{
    \startMonth
    New Month.

    \dorecurse{5}{
    \startDay
    Another day.

    \stopDay
    }

    \stopMonth
}}

\starttext

\startYear[ownnumber=2023,title=This]
A new year begins.

\Dummycontent

\stopYear

\startYear
Next year.

\Dummycontent

\stopYear

\stoptext
-----

Hraban

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to