ePub TOC: Cannot exclude headings

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
joy
Propeller Head
Posts: 68
Joined: Thu Feb 02, 2006 4:29 pm
Location: Surrey, BC, Canada

ePub TOC: Cannot exclude headings

Post by joy »

I can see a lot of uses for ePub output in our company.

However, I cannot set the generated TOC to exclude the h2 and h3 headings. I created a TOC that contains h1 level headings only but the ePub TOC displays all headings from every topic. It doesn't seem to matter how I set options.

Any ideas?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: ePub TOC: Cannot exclude headings

Post by LTinker68 »

I haven't played with the ePub format at all. Does it not honor the mc-heading-level=0 option that you can use for all other outputs?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
joy
Propeller Head
Posts: 68
Joined: Thu Feb 02, 2006 4:29 pm
Location: Surrey, BC, Canada

Re: ePub TOC: Cannot exclude headings

Post by joy »

I somehow missed your response to this. YES that worked. I guess what I didn't notice was that the TOC doesn't have a concept of 2nd-level (indented) entries, so all headings display at the top level.

Setting mc-heading-level=0 for all headings except h1 produced the desired result. So now I have to decide whether to have a stylesheet that is just used for ePub targets, since changing this back and forth might be a pain.

Thank you!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: ePub TOC: Cannot exclude headings

Post by LTinker68 »

joy wrote:I somehow missed your response to this. YES that worked. I guess what I didn't notice was that the TOC doesn't have a concept of 2nd-level (indented) entries, so all headings display at the top level.
In print output you modify the p.TOC1, p.TOC2, etc., to adjust the position of the TOC entries in the output. I don't know as though I've ever tried modifying those for online output since I usually use "books", which automatically indents children topics. You could possibly try to modify the p.TOC2 style to see if you can get it to indent in ePub output. Or generate the ePub output but look at it in the browser instead so you can view the generated source code -- that will show you what styles are used for positioning the TOC entries for ePub so you might be able to set styles to control positioning if it doesn't use p.TOC2.
joy wrote:So now I have to decide whether to have a stylesheet that is just used for ePub targets, since changing this back and forth might be a pain.
Or you could use a different medium in the same stylesheet. You could create a medium called ePub and just set the mc-heading-level values for the heading tags in that medium. Then in the ePub target, set its medium to the one you created. It will use styles in that medium first and if it doesn't find a style there then it will use the style definitions in the default medium. However, if the ePub output is for something like an iPad that might connect to a printer, then you might want to test printing from the ePub output; if the styles in the print medium don't work for printing from ePub then you might want to go the second stylesheet route so you can define separate default and print medium styles specific to ePub outputs.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
joy
Propeller Head
Posts: 68
Joined: Thu Feb 02, 2006 4:29 pm
Location: Surrey, BC, Canada

Re: ePub TOC: Cannot exclude headings

Post by joy »

I don't want the second-level headings in this particular file, so I won't need to worry about indenting.

Good idea to add a different medium. I'll play with that a bit too.

Thanks so much for the pointers!
Post Reply