Hi everybody,
I use automic numbering for the headlines in my PDF documents (see CSS code below) and it used to work with no problem in a lot of different documents.
Now, for the first time, I needed to use a different structure (sections with two columns side by side) in a documents and that somehow distorts the numbering completely.
To find a solution I created a test document.
The test document contains the same content twice:
- The first half has all the content within one section
- The second half has the same content split into three sections
Check the result below. It is the outcome of a single PDF file from where I took the text and copied it here.
The result is strange and difficult to describe.
To me, it seems as if each time a new section starts the counters for h2 and h3 were reset in some way (the counter for h1 not, surprisingly!?)
Anyone any idea what is happening?
(Using Atlassian Confluence 4.3.7, Server)
----------------------------
All content within one section (everything correct!):
1. Headline h1
1.1. Headline h2
1.1.1. Headline h3
1.1.2. Headline h3
1.2. Headline h2
1.2.1. Headline h3
1.2.2. Headline h3
1.2.3. Headline h3
1.3. Headline h2
The same content split in three sections:
2. Headline h1
2.1. Headline h2
2.1.1. Headline h3
2.1.2. Headline h3
------ New section starts ----------------------------------
2.1. Headline h2 (instead of 2.2.)
2.0.1. Headline h3 (instead of 2.2.1.)
2.0.2. Headline h3 (instead of 2.2.2.)
------ New section starts ----------------------------------
2.0.1. Headline h3 (instead of 2.2.3.)
2.1. Headline h2 (instead of 2.3.)
CSS used for automatic headline numbering:
body {
counter-reset: levelA;
}
h2:before {
content: counter(levelA) ". ";
counter-increment: levelA;
}
h2 {
counter-reset:levelB;
}
h3:before {
content: counter(levelA) "." counter(levelB) ". ";
counter-increment: levelB;
}
h3 {
counter-reset:levelC;
}
h4:before {
content: counter(levelA) "." counter(levelB) "." counter(levelC) ". ";
counter-increment: levelC;
}