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

Making {toc} macro links heading size

Jennifer S October 3, 2012

Hello!

I was wondering if anyone knew if it is possible to make the links in a table of contents the size of headers? For example, we have an instance where a user would like to make a table of contents list the size of Heading 3.

If anyone has a trick to doing this I would really appreciate it!


Thank you!

Jennifer

2 answers

1 accepted

2 votes
Answer accepted
Jennifer S February 20, 2013

Thank you for the above answer. I probably should have mentioned we were using Confluence 4.3. Since we have the source editor plugin installed, I was able to make the table of contents a heading by editing the storage format with something like:

<h5><ac:macro ac:name="toc">
<ac:parameter ac:name="maxLevel">5</ac:parameter>
<ac:parameter ac:name="type">flat</ac:parameter>
<ac:parameter ac:name="separator">pipe</ac:parameter>
</ac:macro>
</h5>

1 vote
Jonathan Simonoff
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.
October 3, 2012

This is a touch complicated because the div that contains the TOC doesn't have a class or ID. So, give it one.

Put in a div macro. Give it a class name, such as "toc".

Put the TOC macro inside that div.

Add a CSS stylesheet macro, and put in your styling info, such as this:

.toc div ul li{font-size:18pt;font-weight:bold;line-height:24pt}

You'll need to play around with the settings to get exactly what you want.

FYI -- it is really helpful (maybe necessary for this kind of thing) to have something like Firebug or the equivalent so you can see the CSS settings.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events