Requirement to display 2 TOC levels and 4 miniTOC levels

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
AndyS
Propeller Head
Posts: 13
Joined: Tue Dec 20, 2011 7:06 pm
Location: Christchurch, New Zealand

Requirement to display 2 TOC levels and 4 miniTOC levels

Post by AndyS »

This is my first Flare project and so apologies if this has been asked before, but is there a way of displaying different levels between the main TOC and the miniTOC. My requirement is to limit the main TOC to show just 2 heading levels, and the miniTOC to display up to four heading levels. For example:

Main TOC:
1 Heading 1
2 Heading 1
2.1 Heading 2
2.2 Heading 2
3 Heading 1
3.1 Heading 2
4 Heading 1

miniTOC (in, for example, chapter 2):
2.1 Heading 2
2.1.1 Heading 3
2.1.2 Heading 3
2.1.3 Heading 3
2.2 Heading 2
2.2.1 Heading 3


The output is for PDF. The stylesheet has been amended for both default and print mediums, using h1-h4, p.MiniTOC1-4, p.TOC1-4, and setting the mc-toc-depth and mc-heading-level attributes. I've even set the "Use TOC depth for heading levels" attribute in the Advanced tab of the target output, but to no avail.

Any suggestions?
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Requirement to display 2 TOC levels and 4 miniTOC levels

Post by lacastle »

To get only 2 levels in your TOC, only include 2 levels there.
I think the miniTOC will include any headings below the current heading (if you put the miniTOCproxy under an H1, H2, H3, etc will be included; if you put the miniTOCproxy under an H2, only H3, H4, etc will be included). If you use various levels of headings, they should show up in a miniTOC.

here is some information from the flare help about miniTOC - http://webhelp.madcapsoftware.com/flare ... _Proxy.htm
AndyS
Propeller Head
Posts: 13
Joined: Tue Dec 20, 2011 7:06 pm
Location: Christchurch, New Zealand

Re: Requirement to display 2 TOC levels and 4 miniTOC levels

Post by AndyS »

Thanks Laura for your input.

Unfortunately, it doesn't seem to work, which is probably down to me misunderstanding some of the basics :o(

You stated "To get only 2 levels in your TOC, only include 2 levels there." This I do by setting the mc-heading-level attributes for h1 - h6. For example, to display just two heading levels, I set mc-heading-level to 1 and 2 for h1 and h2 respectively, and for the rest, I set mc-heading-level to 0:

Code: Select all

h1
{
	...
	mc-heading-level: 1;
	...
}

h2
{
	...
	mc-heading-level: 2;
	...
}

h3
{
	...
	mc-heading-level: 0;
	...
}

h4
{
	...
	mc-heading-level: 0;
	...
}

h5
{
	...
	mc-heading-level: 0;
	...
}

h6
{
	...
	mc-heading-level: 0;
	...
}
This works great for the main TOC, and displays h1 and h2 headings, as per requirements.

Next, I add a miniTOC proxy to the start of all my chapters (below the heading 1), and set the number of heading levels I wish to be displayed in the miniTOC (4 in my case). However, when I build the PDF, the miniTOCs only display the heading 2 levels although I did set them to display 4. After a little playing around, I found out that if I set the mc-heading-level for h1 - h6 back to 1 - 6 respectively, then my miniTOCs display more headings. In other words, the miniTOC seems dependent on the mc-heading-level assigned to h1-h6 which seems counter-intuitive, and furthermore implies that I can't display more headings in the miniTOC than there is in the main TOC!?

Any thoughts? I'm still presuming that this can be attained, although I haven't seen any examples in the Help yet.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Requirement to display 2 TOC levels and 4 miniTOC levels

Post by lacastle »

What kind of output are you making? the mc-heading-level applies to TOCproxies and miniTOCproxies. i was suggesting that you only physically add the appropriate headings to your TOC (for webhelp/online).

here is some information in the help about TOC/miniTOC proxies. (i have to leave work now, but i can look more at this tomorrow.)
http://webhelp.madcapsoftware.com/flare ... _Proxy.htm
http://webhelp.madcapsoftware.com/flare ... _Proxy.htm
AndyS
Propeller Head
Posts: 13
Joined: Tue Dec 20, 2011 7:06 pm
Location: Christchurch, New Zealand

Re: Requirement to display 2 TOC levels and 4 miniTOC levels

Post by AndyS »

The medium is Print (PDF) and I'm using both TOC and miniTOC proxies.

Thanks for the links, and your replies :D
AndyS
Propeller Head
Posts: 13
Joined: Tue Dec 20, 2011 7:06 pm
Location: Christchurch, New Zealand

Re: Requirement to display 2 TOC levels and 4 miniTOC levels

Post by AndyS »

Hey Laura - if it helps, I can send an example project to you? It might explain things a little clearer than I can.
Post Reply