How do I get the {toc} macro to exclude certain headings, such as the table of contents header itself

When I use {toc} it lists its own header "Table of Contents" in the table of contents. How do I get it to ignore certain parts of the space, like tip boxes?

3 answers

1 accepted

Your only real configuration option is to limit the depth that is shown so you have a couple options.

1. Don't include a heading above your toc

2. Use a h1 above the toc and h2 or less in the document - configure the marco to show a depth of 2 to 7

#1 is the best way to not show the toc heading and limiting your toc depth is usually a good thing anyway.

Put "Table of Contents" in the Exclude Headings field. Then it doesn't really matter where you place it or even what Heading type you put on it.  But you first have to add and Save the Table of Contents heading (it shows in Preview) BEFORE you will be able to exclude it.

What I am trying to figure out is how to exclude 2 or more headings. Haven't quite figured that one out yet.

image2015-3-13 11:20:12.png

By the way, someone else has provided the answer to my "exclude multiple headings" question. In Exlude headings you simply put: (Table of Contents|Assumption). Very nice and easy.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

76 views 0 11
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