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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do you exclude specific headings from a TOC?

I want to exclude all Heading 5 text from the TOC.

These settings do not work:
min=3, max=6, exclude=5 (preview: includes all H5 text)
min=3, max=4, include=6 (preview: blank TOC)

2 answers

1 accepted

0 votes
Answer accepted
Andy Gladstone Community Leader Nov 29, 2022

@Efleda Brophy in the include and exclude you need to put the text that is in the heading, not the heading number.

In your example you are trying to exclude Heading 5. In order to do that you will need to insert the text contained in that heading in the macro parameters.

Also, if you set the min to 3 and max to 4, no matter what appears in header 6 you cannot include it since the first parameter (min/max) would override the second one (include 6). 

The documentation for the ToC Macro can be found here:

I hope this helps!

@Andy Gladstone Thank you. I was hoping it would be simpler than having to type all H5 text.

I tried this solution using the default delimiter (brackets). This is what Exclude Headings text box contains: [AUTHOR(S)][DATE CREATED OR UPDATED:][STATUS][TECHNICAL OWNER][APPROVER(S)][DATE APPROVED:][AUDIENCE][PURPOSE][OVERVIEW][DETAILS]


Preview or Publication still displays all text with (listed under Exclude Headings) in the TOC. 

What am I missing?

0 votes

The include/exclude work off regular expressions, so what I would do with your settings is

  • Minimum: 3
  • Maximum: 7
  • Exclude:  <regex for header 5>

Problem is I'm rubbish at Regex, I'm not sure what to actually write there.

Thanks for trying to help...

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events