Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

TOC macro with multi-digit numbering (e.g. 2.1.2)

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2014

Hello,

is it possible to adapt the Table of Content macro so that it displays multi-digit numbering?

What I want, is numbering like this:

1. aaa
_ 1.1 aaa1
_ 1.2 aaa2
2. bbb ...

What I get when I enter "decimal" in the "List Style" field of the macro's menu is this:

1. aaaa
_ 1. aaa1
_ 2. aaa2
2. bbb

-------------------

I also tried something different with CSS and some self defined counters. This actually works but the layout is mixed up with the numbers overlapping etc. Here, I haven't figured out what settings must be changed (probably some margins and/or paddings?):

body {
counter-reset: counterA; 
}

ul li:before {
content: counter(counterA) ". ";
counter-increment: counterA;
}
ul li {
counter-reset:counterB; 
}

ul li ul li:before {
content: counter(counterA) "." counter(counterB) ". ";
counter-increment: counterB; 
}

1 answer

1 accepted

0 votes
Answer accepted
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2014

Okay, found out: Clicking the checkbox "Display Section Numbering" does the job.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events