Numbered headings - want "1.1" as my numbered heading, not "1.1."

Using the numbered headings macro I want to display the numbered headings like this:

1

1.1

1.1.1

instead of like this:

1.

1.1.

1.1.1.

Basically, I don't want the final period in the formatting.

2 answers

1 accepted

Hi,

This can be done through the custom numbering option.

To do this, choose custom as the Number format.

Then, fill in the format for each heading, like below:

h1 format: [h1.decimal]

h2 format: [h1.decimal].[h2.decimal]

h3 format: [h1.decimal].[h2.decimal].[h3.decimal]

and so on.

Thank you so much, Sander!

I was able to get the exact format I wanted using the number-format parameter in the numberedheadings macro.

Here's my input:

{numberedheadings:number-format=custom|h1=[h1.decimal]|h2=[h1.decimal].[h2.decimal]|h3=[h1.decimal].[h2.decimal].[h3.decimal]}
h1. Fruit and veg
h2. Fruit
h3. Apples
h3. Oranges
h2. Vegetables
h3. Potatoes
h3. Green Beans
{numberedheadings}

Here's what I got:

1 Fruit and veg
1.1 Fruit
1.1.1 Apples
1.1.2 Oranges
1.2 Vegetables
1.2.1 Potatoes
1.2.2 Green Beans

This is actually the ISO-2145 format. The latest version of Numbered headings (v 2.3.0) has build in support for this type of format with the new 'iso-2145' formatter. So when using this new formatter there is no need for you to set a specific custom format each time you want to number without the last dot!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

354 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you