Print TOC not formatting headings as expected

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
RiverMonster
Sr. Propeller Head
Posts: 149
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Print TOC not formatting headings as expected

Post by RiverMonster »

Hi,

I am looking at my CSS in Notepad. I see my H1.ChapterTitle style is set exactly the same as my H1.AppendixTitle style except for the mc-heading-level setting which is 1 and 5 respectively. I also see the p.TOC1 and p.TOC5 styles have exactly the same settings. (I have checked I am comparing for the same media.)

So, when I create a PDF I would expect that in my TOC the chapter titles and appendix titles will be formatted exactly the same. However, the chapter titles are bold while the appendix titles are not. I just checked that there are no inline styles applied.

Any ideas what I am doing wrong?

Thanks,

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

Re: Print TOC not formatting headings as expected

Post by LTinker68 »

In the target, I believe, there is an option about using the TOC heading depth. Try enabling or disabling that option.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
RiverMonster
Sr. Propeller Head
Posts: 149
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Print TOC not formatting headings as expected

Post by RiverMonster »

Thanks Lisa,

The option was cleared, as I expected, because we use styles to generate the TOC. When I enable the setting I no longer see these particular headings in the TOC, which is also expected because the corresponding TOC entries are named somewhat differently. I could clearly change tack and use the TOC depth adjusting the TOC accordingly but all our projects are set up to generate the TOC with styles so I would rather stick to that and in any case my issue must be due to something else.

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

Re: Print TOC not formatting headings as expected

Post by LTinker68 »

So maybe the p.TOC5 isn't getting applied correctly (although I don't understand why you have p.TOC1 and p.TOC5 being identical but you're using different mc-heading-levels, unless you meant the color and font is the same but the left margin is different).

Anyway, try first setting p.TOC5 to a different color and see if the appendix titles change to match. (Make sure you're in the print medium, of course.)
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
RiverMonster
Sr. Propeller Head
Posts: 149
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Print TOC not formatting headings as expected

Post by RiverMonster »

Thanks Lisa.

The p.TOC1 and p.TOC5 styles are the same for the purposes of testing only. Ordinarily, they would be different (the p.TOC5 would have "Appendix:" in the autonumber field).

I tried setting the p.TOC5 to red and it gets reflected in the TOC so that appears to be working okay.

It seems to be the p.T0C1 style that is behaving strangely. In the CSS I have this:

Code: Select all

 
p.TOC1
{
	margin-left: 0in;
	line-height: 16pt;
	margin-top: 12pt;
	margin-bottom: 6pt;
	font-family: Tahoma;
	font-size: 12pt;
}
(This is the default media definition. There is no separate print media definition and I checked for duplicate entries elsewhere in the CSS.)

There is no bold setting and yet these TOC entries are appearing bold in my TOC. I wondered if it might be pulling through bold from the heading itself but that is not the case -- TOC1 entries still show as bold if the underlying headings are not. I can't think of anything else that could be controlling this so figure it must be a bug?

[Edit following original post: I see what is going on now. I just created a brand new project using the defaults and looked at the style sheet within Flare and then in Notepad. In Flare, it shows a default of bold for the p.TOC1 entry but regular for the others. In Notepad, you can see that there are no p.TOCx entries whatsoever. So, Flare is basically assuming that the p.TOC1 entry is bold unless you tell it otherwise in the CSS. I guess this normally doesn't give rise to any problems as it is highly unlikely anyone would not want p.TOC1 to be bold. However, if anyone (like me) tries to copy the style definitions to another TOC style they will have to explicitly set the bold on that other TOC style as it is not carried across.]

Adrian
RiverMonster
Sr. Propeller Head
Posts: 149
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Print TOC not formatting headings as expected

Post by RiverMonster »

For the record...when I came to set the autonumbering back to what it was I found that it is ignored for TOC styles anyway. I actually put in a bug report for this ages ago but had forgotten about it. I imagine this issue affects a fair number of people who have converted projects from FrameMaker because Frame does allow you to set autonumbers for TOC styles. This is needed for situations such as where you don't want appendix numbering to be part of the appendix heading style itself as you already have it showing up in a box on the first page of the appendix...you just want it in the TOC. I'm sure there are other uses too.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Print TOC not formatting headings as expected

Post by LTinker68 »

Tags have default values. The idea being that if you leave out modifying a style attribute of the tag then it has something to fall back on, style-wise. The browsers may have different defaults for different style attributes for different tags, at least for the standard HTML tags. MadCap has supplied their own set of styles of their custom tags.

I'm not sure if p.TOC1 is a standard CSS tag and class or if it's a MadCap-created one. Either way, if you see something about the style you don't like -- and there's nothing defined in the stylesheet for it -- then you have to add it to the stylesheet, even if it seems odd to be setting the font-weight to normal. "Normal" is not necessarily the same as the default (aka "not set") value for an attribute in a particular tag or tag/class set. So in this case, if you don't want the TOC1 entries in the table of contents to be bold, then you need to set the font-weight attribute of the p.TOC1 tag/class to "normal" instead of leaving it at "not set".
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
RiverMonster
Sr. Propeller Head
Posts: 149
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Print TOC not formatting headings as expected

Post by RiverMonster »

Thanks Lisa. I realize there are defaults but just didn't expect this one to be bold. I will be more cautious next time :-)
owenf
Propeller Head
Posts: 48
Joined: Tue Sep 01, 2009 3:41 am

Re: Print TOC not formatting headings as expected

Post by owenf »

when I came to set the autonumbering back to what it was I found that it is ignored for TOC styles anyway. I actually put in a bug report for this ages ago but had forgotten about it. I imagine this issue affects a fair number of people who have converted projects from FrameMaker because Frame does allow you to set autonumbers for TOC styles
Still broken in Flare 11.x by the look of it. i'm also trying to copy FM. why anyone would really _want_ different colors on the numbers is beyond me, but the Flare interface purports to enable it but fails to deliver. bug.
Post Reply