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

How can I customise the CONTENT of the automatically generated TOC: Don't want page names but my own headings

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 19, 2012

Hello everyone,

in very short this is my question:
Is there a way to generate a table of contents (toc) and not use page names for this but something else (like my own headings)?

-----

In more detail:

I use Confluence to write technical documents and to export them to PDF. So controlling what the PDF output looks like is very important to me. As regards the automatically generated toc I fully understand how I can control its layout (with CSS) but I still haven't figured out how I can control its content, that is which content/information/headings become part of it.

When I use the PDF Export function I get a PDF with an automatically generated toc. The toc consists of the names of all the pages that I included in my PDF. Unfortunately these page names are not ideal for a toc. Because of their limitations (must be unique, must not include German umlaute, etc.) they typically read like this:

"name of the product - name of subcatogary A - name of function B - description"
"name of the product - name of subcatogary B - name of function C - installation"

So far what I do is opening the PDF in Acrobat PRO, going through the whole toc and change each single line from something like "name of the product - name of subcatogary A - name of function B - description" to something like "description". Afterwards I repeat the whole thing for other languages. Obviously this is a lot of unnecessary work. Finding a way to have my own headings included in the toc instead would solve all of this. So is there a way to do this?

What I am sort of looking for is some kind of script that controls all of this. Alternatively I would also be interested in workarounds or other solutions. Or perhpas I have gotten on the wrong track or am missing out something rather simple.

I am using Confluence 3.2.1.

I know the {toc} makro but can't see how it could help me since it is based on the headings of a single page. Also, I know plugins that allow alternative page names but would prefer a solution that also works for different languages.

3 answers

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Good idea. It is still a topic for me as well.

0 votes
Greg Williams February 3, 2013

I see that this was posted some time ago, but I'm also trying to customize the auto-generated TOC upon PDF export (Confluence 3.5). Maybe commenting will add some life to this question?

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2012

Okay, it seems my question is a little tricky. Perhaps I should to try to break it down a bit:

Can anyone explain to me how that table of contents is created that you get when you make an export via

Browse > Advanced > Export: PDF Export

Is it a plugin? Or some other kind of extension? Or some core functionality of confluence that cannot be touched?

As I explained before I appreciate having an automatic toc but I would like to adjust its appearance. Is there a way to do this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events