To create the same heading number in the section documents as shown in the transcluding document, you need to set the number start ( heading-number-start Heading Number Start ) to 1. 0 and the heading starting level (heading-starting-level ) to 2.2, and 3 respectively and switch on the numbering of the document title (set Use Document Heading Number to true ). Image Removed Now the section headings align with the numbers shown in the transcluding document. Image RemovedImage Added The other section documents have the heading number started by 2 and 3. Note Box |
---|
title | Only works for strict structures |
---|
| Now the topic is closely bound to the document it is transcluding. In the case of sections this is typically okay. But you would need to update the document properties in case you alter the position of a section in the transcluding document. There is no control in case you have a Module or a Topic since in that is used by more than one document. In this case the numbering would need to be different for each transcluding document.The configuration for the second transcluded section requires the number start (heading-number-start ) to be set to 2.0. Image Removed The rendered document would render like this: Image Removed | Section |
---|
title | Page Title Numbering |
---|
| As you may already have notices, the numbering of the section does still not align. Headings have no numbers per default. To change this you need to apply a CSS style to your Confluence site configuration or to your space configuration. This CSS may be different according to your layout tool you employ. Here is one way to achieve the heading numbering for the transcluding document and all its sections for a standard Confluence environment. Using a layout tool may make the issue much simpler. Section |
---|
title | Activate the HTML Macro |
---|
| To add additional CSS styles you need to activate the HTML Macro provided by Confluence as a system plugin. Caution Box |
---|
HTML macros are disabled by default The HTML macro will only be available if it has been enabled by an administrator. Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks. |
Image Removed |
Section |
---|
title | Option 1: Set Heading Number per Default |
---|
| If you set the heading number per default, then each page will have a heading number. Section |
---|
| Using the Space Tools you are able to configure the CSS for a single space in Confluence. Image Removed Code Block |
---|
| h1#title-text:before {
counter-increment: h1;
content: counter(h1) " ";
} |
If you use level one headings on the page, these will continue with the second number. So you would need to use only level two headings on your pages. Besides that you also have numbers where you probably do not want them as in the screenshot shown above. "Space Tools" also uses the "title-text " identifier and therefore has a heading number. |
Section |
---|
title | Suppress Heading Numbers on Transcluding Page |
---|
| To remedy some of the issues above, use the following CSS Code Block |
---|
| h1#title-text:before {
counter-reset: h1 !important;
counter-increment: none !important;
content: "" !important;
} |
with the HTML Macro. Image Removed |
|
Section |
---|
title | Option 2: Use Custom CSS on every transcluded Page |
---|
| Add the following CSS to every page you need a heading number in the title. Image Removed Since you already use level 2 headings (heading-starting-level ) these won't interfere with the h1 used for the title. You do not need a configuration for the space's Look and Feel (Stylesheet). Image Removed And you won't need a special treatment for you transcluding pages. Image Removed |
Section |
---|
| | If you have a dedicated space for your specification or software architecture document, option 1 may be easier to use. Mind unwanted numbering on standard pages, but otherwise you would not need to configure the section pages with an additional HTML Macro. In every other case the second option might be easier to handle, since there are less side effects and there is only one additional HTML Macro on each document that is using a dedicated heading number, which is not possible for the same document.
|