Anchors should not be considert by TOC Macro

We've got a nasty issue. A lot of our documentation consists of large pages. For a better navigation within the page, we use a lot of anchors. If one of those anchors is accidently formated as heading, it is also recognized by the TOC-macro.

Problem is:

If you add a link to a heading-formated anchor somewhere on the page and click it, the link points to the TOC listing.


* Write a page with several headings

* Put an anchor somewhere on that page and format it as heading (h1-h6 work fine ... doesn't matter).

* Create a link pointing to that anchor

* Add the TOC-macro on top of the page

* Click the link.

1 answer

This widget could not be displayed.
Thomas Schlegel Community Champion Aug 27, 2012

Hi Dominic,

I don't think that this is an error. The toc-macro lists all the headings in the page. If your anchors are headings, the macro is doing its job fine.

The other way round: if someone creates a heading as an anchor intentionally. How would you explain him / her that this heading is not shown in the toc ?



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
Published 12 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

60 views 0 8
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