Generating a list of headings in a single topic
Generating a list of headings in a single topic
I have a large project with many long topics. These long topics each contain up to a dozen or more h3 headings. I would like a list of links (cross references) to the h3 headings within a single topic at the top of the topic that contains those headings. Is there a way to do that automatically?
Mini-TOC doesn't work because that looks at the actual TOC, List-of Proxy would find all the h3's in the entire output, after that I'm out of ideas other than manual entry.
Thanks.
Mini-TOC doesn't work because that looks at the actual TOC, List-of Proxy would find all the h3's in the entire output, after that I'm out of ideas other than manual entry.
Thanks.
Re: Generating a list of headings in a single topic
OP here.
I see now this question was asked ten years ago and a javascript answer was provided by a forum member. viewtopic.php?t=11199&p=63842. Our friend Nita suggested at the time to submit a feature request as many people are looking for that capability. I guess MadCap determined this request was not worth addressing. Either that or they've hidden the solution quite well.
I see now this question was asked ten years ago and a javascript answer was provided by a forum member. viewtopic.php?t=11199&p=63842. Our friend Nita suggested at the time to submit a feature request as many people are looking for that capability. I guess MadCap determined this request was not worth addressing. Either that or they've hidden the solution quite well.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Generating a list of headings in a single topic
The forum post you linked to is 10 years old, and MadCap has since added the functionality you seek to Flare.
Use a menu proxy and associate the proxy with "Headings" rather than a TOC file.
For more info, https://help.madcapsoftware.com/flare20 ... c-Menu.htm.
Use a menu proxy and associate the proxy with "Headings" rather than a TOC file.
For more info, https://help.madcapsoftware.com/flare20 ... c-Menu.htm.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Generating a list of headings in a single topic
Thanks, Nita! I was not familiar with the Menu Proxy before you pointed it out.
I did note in my follow-up post that the post I saw was ten years old. After more searching I didn't find a solution other than the javascript implementation provided by a user, so I assumed it had it not been addressed by MadCap. I'm certainly glad to see that it has been.
I did note in my follow-up post that the post I saw was ten years old. After more searching I didn't find a solution other than the javascript implementation provided by a user, so I assumed it had it not been addressed by MadCap. I'm certainly glad to see that it has been.
Re: Generating a list of headings in a single topic
The menu proxy is only listing the h1 and h2 headings, even though the Levels to Show is set to (all). I need the h3 headings to be listed. Any hints? Is there a way to show only the h3 heading text?
Thanks again.
Thanks again.
Re: Generating a list of headings in a single topic
Maybe check that the H3 doesn't have mc-heading-level set to 0 (zero) in your stylesheet?
Re: Generating a list of headings in a single topic
That was it! Nice catch Psider.Psider wrote:Maybe check that the H3 doesn't have mc-heading-level set to 0 (zero) in your stylesheet?
Thanks.
-
- Sr. Propeller Head
- Posts: 212
- Joined: Wed Apr 04, 2007 11:50 am
Re: Generating a list of headings in a single topic
Call me crazy, but when I use the menu proxy with the Headings option, I want the list to start at the h2 level. I certainly don't need a clickable link to the h1 heading that functions as the title of the page. This feature is so easy to use in Confluence and works just as you would expect; why can't we have it the same way in Flare? And yes, I'm going to submit a feature improvement request.
Re: Generating a list of headings in a single topic
I think I figured out how to do that. I think I set the H1 to mc-heading-level: 0 in my stylesheet. This may cause problems if you need print output though; it's not something I've tested thoroughly.
-
- Sr. Propeller Head
- Posts: 248
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Generating a list of headings in a single topic
I wonder if like other Proxies there are associated styles like p.MenuProxy1 thru 6? If so you could set p.MenuProxy1 to display:none;
Just a thought and I've not tested it, then it wouldn't affect the other TOCs in your project. But that would also assume that your menu proxy was always at the same level, just under a H1...
Rob
Just a thought and I've not tested it, then it wouldn't affect the other TOCs in your project. But that would also assume that your menu proxy was always at the same level, just under a H1...
Rob
-
- Sr. Propeller Head
- Posts: 212
- Joined: Wed Apr 04, 2007 11:50 am
Re: Generating a list of headings in a single topic
Thanks, psider. I just tried it, but then you need to set another style to turn off the bolding of the "selected" class assigned to the first entry in the list.
And this would impact print settings, though I imagine you can fix it by setting this in the @media print section:
Rob, I had tried playing with the display property for the same selector as the unbolded one above and that did work:
But then you end up with weird list spacing/indentation because the remaining list is still "nested", and heaven help you if you want to add any bullets to the list - it was a bit of a mess.
Bottom line, this should be an easy feature to use without having to jump through arcane hoops to force it to do what it should do in the first place.
Code: Select all
h1 {
mc-heading-level: 0;
}
ul.menu._Skins_Menu.mc-component li > a.selected,
ul.menu._Skins_Menu.mc-component li > a.selected:hover {
font-weight: inherit;
}
Code: Select all
@media print {
h1 {
mc-heading-level: 1;
}
}
Code: Select all
ul.menu._Skins_Menu.mc-component li > a.selected {
display: none;
}
Bottom line, this should be an easy feature to use without having to jump through arcane hoops to force it to do what it should do in the first place.