![](https://secure.gravatar.com/avatar/b23e98325f2700d335e6cf87fe97288c.jpg?s=120&d=mm&r=g)
Dear ConTeXt Experts I am still sometimes confused about how to set up simple things... I want to have a subsection level head type ("topic") with a numbering that runs undependently from the section numbering, like so: 1. First Topic ... I. Section One ... 2. Second Topic ... 3. Third Topic ... 4. Fourth Topic ... II. Section Two 5. Fifth Topic ... 6. Sixth Topic ... III. Section Three ... And so on. ConTeXtgarden, the manual, etc. show in great detail how to set up the /appearence/ of head parts (incl. numbercommand), but I cannot find an explanation of the handling of the LaTeX equivalent to counters (their definition, incrementing, resetting, etc.). The explanation of \setupheadnumber in the manual (p. 172) is quite obscure to me -- how do I specify that I do not want higher levels of head to reset my numbering? Thank you! Ulf Martin
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Ulf Martin wrote:
Dear ConTeXt Experts
I am still sometimes confused about how to set up simple things...
I want to have a subsection level head type ("topic") with a numbering that runs undependently from the section numbering, like so:
1. First Topic ...
I. Section One ...
2. Second Topic ...
3. Third Topic ...
4. Fourth Topic ...
II. Section Two
5. Fifth Topic ...
6. Sixth Topic ...
III. Section Three ...
And so on.
ConTeXtgarden, the manual, etc. show in great detail how to set up the /appearence/ of head parts (incl. numbercommand), but I cannot find an explanation of the handling of the LaTeX equivalent to counters (their definition, incrementing, resetting, etc.). The explanation of \setupheadnumber in the manual (p. 172) is quite obscure to me -- how do I specify that I do not want higher levels of head to reset my numbering?
i admit that it's a bit fuzzy ... (some day i'll make this more transparent) \setuphead [chapter][resetnumber=no] \setupsection[section][previousnumber=no] \chapter{Section One} \section{Second Topic} \section{Third Topic} \section{Fourth Topic} \chapter{Section Two} \section{Fifth Topic} \section{Sixth Topic} \chapter{Section Three} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/b23e98325f2700d335e6cf87fe97288c.jpg?s=120&d=mm&r=g)
Hi Hans Hagen schrieb:
\setuphead [chapter][resetnumber=no] \setupsection[section][previousnumber=no]
Ok, I undestand. I apologise that my example was too short. I'd like to have things more flexible: If an arbitrary and irregular number of levels is introduced (sections, subsections, etc., numbered hierarchically as usual), the topic numbering should remain continuous and unaffected (that's why I thought, a separate definition, as in \definehead[topic][...], would be appropriate). Conceptually, though, "topic" is a section-like subdivision, so, for example, should appear in the TOC. This is typical e.g. in (German) law texts (here with "§" as a topic marker but this is not the point), Example: I. ... "Chapter" § 1 ... 1 ... "Section" § 2 ... Topic in section 1.1 ... "Subsection" § 3 ... Topic in subsection § 4 ... 1.2 ... § 5 ... 2 ... § 6 ... § 7 ... 2.1 ... § 8 ... II. ... § 9 ... Topic in chapter 1 ... § 10 ... § 11 ... 1.1 ... § 12 ... Of course, referencing, entry in TOC, index etc. should be correct. It would be even more preferable if one could "attach" the topic numbering to a specified level, say, chapters. The above example then would become: I. ... "Chapter" § 1 ... Topic in chapter 1 ... "Section" § 2 ... Topic in section 1.1 ... "Subsection" § 3 ... Topic in subsection § 4 ... 1.2 ... § 5 ... 2 ... § 6 ... § 7 ... 2.1 ... § 8 ... II. ... § 1 ... First topic in second chapter 1 ... § 2 § 3 1.1 ... § 4 ... Thank you & sorry for the incomplete first question! Ulf
![](https://secure.gravatar.com/avatar/b23e98325f2700d335e6cf87fe97288c.jpg?s=120&d=mm&r=g)
Hi Hans Hagen schrieb:
\setuphead [chapter][resetnumber=no] \setupsection[section][previousnumber=no]
I do not quite understand the reseting mechanism. I want a lowest level section-like subdivision that has a running number which is unaffected by any of the above levels irrespective of the existence of higher levels. The higher levels should be numbered hierarchically as usual. When I try \setuphead[section][resetnumber=no] \setuphead[subsection][resetnumber=no] \setupsection[subsubsection][previousnumber=no] The subsubsection number is indeed not reset if *all* higher levels are present; but if I leave one out, it is reset; additionally the subsection is of course not reset, which I don't want: \section{One} \subsection{Oneone} \subsubsection{Topicone} % number = 1, OK \subsection{Onetwo} \subsubsection{Topictwo} % number = 2, OK \section{Two} \subsubsection{Topicthree} % number = 1, wrong \subsection{Twoone} % number = 2.3, wrong \subsubsection{Topicfour} % number = 2, wrong \subsection{Twotwo} % number = 2.4, wrong \subsubsection{Topicfive} % number = 3, wrong With this: \setuphead[section][resetnumber=yes] \setuphead[subsection][resetnumber=no] \setupsection[subsubsection][previousnumber=no] I get: \section{One} \subsection{Oneone} \subsubsection{Topicone} % number = 1, OK \subsection{Onetwo} \subsubsection{Topictwo} % number = 2, OK \section{Two} \subsubsection{Topicthree} % number = 1, wrong \subsection{Twoone} % number = 2.1, now OK \subsubsection{Topicfour} % number = 2, wrong \subsection{Twotwo} % number = 2.2, now OK \subsubsection{Topicfive} % number = 3, wrong So the numbering of \subsubsection{Topicthree} is reset by \section{Two}, irrespective of the latter's resetnumber option. Here are examples of what I'd really like (here "§" indicates a topic, the actual section-level names (like "chapter" etc.) are not important): I. ... "Chapter" § 1 ... 1 ... "Section" § 2 ... Topic in section 1.1 ... "Subsection" § 3 ... Topic in subsection § 4 ... 1.2 ... § 5 ... 2 ... § 6 ... § 7 ... 2.1 ... § 8 ... II. ... § 9 ... Topic in chapter 1 ... § 10 ... § 11 ... 1.1 ... § 12 ... Of course, referencing, entry in TOC, index etc. should be correct. It would be even more preferable if one could "attach" the topic numbering to a specified level. If the topic were attached to chapters then the above example would become: I. ... "Chapter" § 1 ... Topic in chapter 1 ... "Section" § 2 ... Topic in section 1.1 ... "Subsection" § 3 ... Topic in subsection § 4 ... 1.2 ... § 5 ... 2 ... § 6 ... § 7 ... 2.1 ... § 8 ... II. ... § 1 ... First topic in second chapter 1 ... § 2 § 3 1.1 ... § 4 ... One could summarize it this way: §'s are conceptually the lowest level of subsections, their number is reset by a subsection of some higher level (or never). In LaTeX one can get this kind of behaviour because the numbering is controlled by counters. The increment of one counter may be used to reset another counter independent of the actual section level they are used for. Bye & Thank you all Ulf
participants (2)
-
Hans Hagen
-
Ulf Martin