Guide to the Table of Contents

A table of contents (TOC for short) is an organized list that displays the structure of some articles and categories or the headers within a single article to make organization easier. World Anvil has BBCode tags that let you generate three different automatic tables of contents:  

World Table of Contents

Paste the code [toc] anywhere to display the full table of contents for your world. The result of this tag is what you already have in the world main page under the World Codex section. For the World Anvil Codex world, it looks like this:

Tip: this is an interactive list! Click on the categories to expand.

Category Table of Contents


Category TOC is a Guild Member Feature!
If you want to use it, please consider supporting World Anvil!

To get the category index tag, you have to access the advanced edit page for the category you want to display. Simply go to the Articles & Categories Manager from your sidebar, click on a category, and then click Advanced Edit at the bottom of the right panel.

In the category edit page, you will see a panel in the right side of the screen: Category presentation snippets. Uncollapse it and copy the category table of contents widget tag, which should look something like [toc:ID] (where ID is a set of numbers and characters).

Additionally, you can make the table of contents display in horizontal format by adding a "horizontal" parameter: [toc:ID|horizontal]

category toc tag.png

Article Table of Contents

To add a table of contents to your article, just add the [articletoc] tag somewhere within the article. The tag will scan the article and create a list of the artice's headers, with a structure based on header importance (first-level headers, second-level headers, etc.).

Please note that this tag may not work if the article already contains the world table of contents, a category table of contents, an organization tree, or character or organization relationship blocks.


Comments

Please Login in order to comment!
16 Feb, 2021 09:52

I used

but there is a certain minor problem that I don't really like - I used the prompts bellow the main space to fill out the article and when I made the toc it worked fine, but when it sends you to the particular header you clicked, it shows what's beneath the header but not the header itself and it kinda ruins the presentation. It's nothing big but a "how to fix it" if it's fixable would be really appreciated, thanks!

"Done with wonders and reality fabric." - Blue Scales
18 Feb, 2021 11:52

This seems to be a bug, good catch! Can you report it using the "report a bug" button you'll find in the help page? You'll need a separate account for that because the bug tracker is a third-party service. Make sure to specify that the issue is with pre-defined field headers.   Thank you!

Creator of Black Light, a science-fantasy universe.
20 Feb, 2021 10:39

Oh, cool, thank you. I've already reported bugs so I have an account.

"Done with wonders and reality fabric." - Blue Scales