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

This widget could not be displayed.

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.

This widget could not be displayed.

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

137 views 16 7
Join discussion

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