projectdoc Toolbox

Controls whether or not section headings should be numbered. The numbers are added via CSS, therefore they won't work for export formats that do not take CSS into account.

Tags
Identifier
enable-heading-numbers
Data Type
boolean
Default Value
false
Since
1.5.0

The numbering of headings can be overridden by a document property with the same name (enable-heading-numbers). If this property value is specified, the numbering configuration via space properties is overridden.

The numbering behavior can also be overridden based on the doctype of the document. The space property suppress-heading-numbers-on-doctypes lists the document types that should not render heading numbers despite the value of the space property enable-heading-numbers.

Style Sheet

Dependent on the numberings parameter of the Section Macro one of the following CSS selectors is rendered:

  • number - renders the number with CSS.
  • nonumber - renders no number.

The style sheet to control the formatting of the headings looks like this:

Heading Formatting since Version 3.0
/* ... Counter Configuration ............................................... */
body {
        counter-reset: h1 h2 h3 h4 h5 h6 table;
}

.number.projectdoc-heading-level-h1 {
        counter-increment: h1;
        counter-reset: h2 h3 h4 h5 h6;
}

.number.projectdoc-heading-level-h1:before {
        content: counter(h1) " ";
}

.number.projectdoc-heading-level-h2 {
        counter-increment: h2;
        counter-reset: h3 h4 h5 h6;
}

.number.projectdoc-heading-level-h2:before {
        content: counter(h1) "." counter(h2) " ";
}

.number.projectdoc-heading-level-h3 {
        counter-increment: h3;
        counter-reset: h4 h5 h6;
}

.number.projectdoc-heading-level-h3:before {
        content: counter(h1) "." counter(h2) "." counter(h3) " ";
}

.number.projectdoc-heading-level-h4 {
        counter-increment: h4;
        counter-reset: h5 h6;
}

.number.projectdoc-heading-level-h4:before {
        content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) " " ;
}

.number.projectdoc-heading-level-h5 {
        counter-increment: h5;
        counter-reset: h6;
}

.number.projectdoc-heading-level-h5:before {
        content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " " ;
}

.number.projectdoc-heading-level-h6 {
        counter-increment: h6;
}

.number.projectdoc-heading-level-h6:before {
        counter-increment: h6;
        content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " " ;
}

/* ... No-Counter Configuration ............................................ */
.nonumber {
	counter-increment: none;
}

.nonumber:before {
	content: "";
}

Resources

Heading Max Numbered
controls the max depth to which headings are numbered.
Heading Number Start
controls the start number of the first heading on a page.
Heading Starting Level
controls the top heading level for a document.
Suppress Heading Numbers on Doctypes
controls the suppression of heading numbers dependent on the doctype.
Use Document Heading Number
controls whether or not the title of the document should have a heading number.