7

In the following MWE, titles have no displayed number, but sections (the second level) are still numbered 1.1, 1.2, etc, because the titles have an internal number.

I would like the sections to ignore the title above them, and to simply be numbered 1, 2, etc.

(Titles have an internal number so that they can be included in the Table of Contents. This code comes from my answer to this question. I don't trust that answer completely, by the way.)

\setuphead[title][
    incrementnumber=yes, % keep an internal title counter+list
    number=no]  % don't display the counter

\title First title        % no number displayed
\section A section        % 1.1, should be 1
\subsection A subsection  % 1.1.1, should be 1.1

Some setups take the option prefixsegments=chapter:section\setupcaptions, for example, and \setupenumerations. \setupheads, however, does not accept it, and I don't know whether sections numbers are managed as enumerations or as numberings or something else.

0

1 Answer 1

9

Structurals come with the key sectionsegments that determines the elements of which their visible counter will be composed. The are referenced by the (original, inherited) id of the structural at the given depth, e. g. the value section works for both \section and \subject, as they share a structure counter. Lists are delimited by colons: chapter:section.

Based on the code provided in the question, an example would look as follows:

\setuphead[title]      %% structure depth 1 (==chapter)
 [incrementnumber=yes,
           number=no,]
\setuphead[section]    %% structure depth 2
 [sectionsegments=section]
\setuphead[subsection] %% structure depth 3
 [sectionsegments=section:subsection]

\starttext % ········································ %

\title      {First title}  %% -> ∅
\section    {A section}    %% -) 1
\subsection {A subsection} %% -) 1.1

\stoptext % ········································· %

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .