How do I remove chapter autonumbering on TOC title?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

How do I remove chapter autonumbering on TOC title?

Postby clbrompton on Fri Apr 05, 2019 1:28 am

Image

Believe I started with the Tripane basic template for my project, not sure if that helps diagnose the problem but all is well with putting together the online and print ouputs apart from this one issue
I just can't figure out how to remove the auto-numbering from the TOC title. It should not be the first chapter.

Tried multiple bits of css code such as:

Code: Select all
h1.TOCheading {
mc-heading-level: 0;
mc-auto-number-format: '';
}


What i did realise is that none of the online help states where I allocate this bit of code. So now I'm out of ideas and need to turn to the forum for help :)
clbrompton
Jr. Propeller Head
 
Posts: 3
Joined: Thu Apr 04, 2019 8:58 am

Re: How do I remove chapter autonumbering on TOC title?

Postby awinnefeld on Mon Apr 08, 2019 6:39 am

Hi, your CSS looks good to me. Some very basic ideas what might have gone wrong:

  • Are you sure you have applied your CSS to the right medium? Maybe you applied the style for the standard medium and there is another style for h1.TOCheading in the print medium that overwrites what you're doing here?
  • Did you apply the right class to the TOC heading? I sometimes apply classes manually in the the text editor instead of the xml editor, which of course means that I'll produce typos.
  • Does the TOC heading have any more specific styles (an ID, or even inline styles) that might overwrite the CSS for the class?
awinnefeld
Propeller Head
 
Posts: 25
Joined: Thu May 17, 2018 1:55 am
Location: Germany

Re: How do I remove chapter autonumbering on TOC title?

Postby Nita Beck on Mon Apr 08, 2019 8:10 am

I would not include mc-heading-level: 0;. That will cause the TOC heading itself not to be included in the generated table of contents in your print output. I don't think that's what you're trying to achieve.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3277
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: How do I remove chapter autonumbering on TOC title?

Postby clbrompton on Tue Apr 09, 2019 1:09 am

awinnefeld wrote:Hi, your CSS looks good to me. Some very basic ideas what might have gone wrong:

  • Are you sure you have applied your CSS to the right medium? Maybe you applied the style for the standard medium and there is another style for h1.TOCheading in the print medium that overwrites what you're doing here?
  • Did you apply the right class to the TOC heading? I sometimes apply classes manually in the the text editor instead of the xml editor, which of course means that I'll produce typos.
  • Does the TOC heading have any more specific styles (an ID, or even inline styles) that might overwrite the CSS for the class?


Pretty sure the CSS is applied to the right medium, there are 2 sections in my stylesheet, one for the online output, the other for the print.

What do you mean by apply the right class to the TOC heading? I couldn't find anywhere to assign it if thats what you mean so I was hoping that Flare had somewhere pre-defined for it.

Nothing should be assigned to the TOC heading apart from bits of code I've tried to either get rid of the chapter heading or remove the whole TOC title. My h1 however has bits of code assigned to it, so thats where the problem is stemming from. However I can't find where to actually edit the TOC style so it uses something else like h2 or h3..
clbrompton
Jr. Propeller Head
 
Posts: 3
Joined: Thu Apr 04, 2019 8:58 am

Re: How do I remove chapter autonumbering on TOC title?

Postby clbrompton on Tue Apr 09, 2019 1:11 am

Nita Beck wrote:I would not include mc-heading-level: 0;. That will cause the TOC heading itself not to be included in the generated table of contents in your print output. I don't think that's what you're trying to achieve.


I only added mc-heading-level: 0 as a test to get rid of it. I'd rather have no title than one that claims to be chapter 1.
clbrompton
Jr. Propeller Head
 
Posts: 3
Joined: Thu Apr 04, 2019 8:58 am

Re: How do I remove chapter autonumbering on TOC title?

Postby Nita Beck on Tue Apr 09, 2019 4:35 pm

Here's some CSS you might find useful.

Code: Select all
h1
{
   font-size: 1.6em;
   color: #0078c1;
}

h1.Appx
{
   mc-auto-number-format: 'CH:Appendix {chapnum}. ';
   mc-auto-number-class: ChapterLabel;
}

h1.Chpt
{
   mc-auto-number-format: 'CH:Chapter {chapnum}. ';
   mc-auto-number-class: ChapterLabel;
}

span.ChapterLabel
{
   font-family: 'Arial Narrow';
   text-transform: uppercase;
}

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


Notice that I don't have an auto-number specified in the base h1 class. I do have auto-numbers specified in other h1 classes for chapters and appendixes. So if I have the first heading on the contents.htm topic set to h1, it won't have an auto-number.

Notice also that I have a generic class that I can apply to any heading that I also don't want to appear in the generated table of contents. And if I further apply the generic .NotInGenedTOC class to that first heading in the contents.htm topic, then "Contents" won't appear in the generated table of contents. (You haven't described this issue, but I add it for benefit of others. This is a frequently asked questions.)

HTH
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3277
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: How do I remove chapter autonumbering on TOC title?

Postby awinnefeld on Wed Apr 10, 2019 1:29 am

clbrompton wrote:What do you mean by apply the right class to the TOC heading? I couldn't find anywhere to assign it if thats what you mean so I was hoping that Flare had somewhere pre-defined for it.

Nothing should be assigned to the TOC heading apart from bits of code I've tried to either get rid of the chapter heading or remove the whole TOC title. My h1 however has bits of code assigned to it, so thats where the problem is stemming from. However I can't find where to actually edit the TOC style so it uses something else like h2 or h3..


As I said, those were just some VERY basic ideas, but there have been a lot of times were I attempted some complicated troubleshooting just to find out later that I had a simple typo somewhere :)

All I meant was: have you properly applied the class "TOCheading" (the class you added the CSS for) to the h1 in the topic with your TOC proxy? If you have done it the usual way in the XML Editor - open the topic, right-click, hover over "Style class" and select the style - you're save. I often do stuff in the text editor though, if I think it will be quicker that way. In this case this would mean: open the topic, change to the Text Editor tab and add class="TOCheading" to the h1. If you did it that way, my first instinct would be to check if there's a typo somewhere.

In your screenshot, your TOC heading does not show up in the TOC though, so the mc-heading-level: 0 from your style was applied, which means this probably isn't the problem here. I'm just searching for simple errors like that because my TOC heading style looks basically like yours - mc-auto-number-format: ''; should be all you need to get rid of the autonumbering.
awinnefeld
Propeller Head
 
Posts: 25
Joined: Thu May 17, 2018 1:55 am
Location: Germany

Re: How do I remove chapter autonumbering on TOC title?

Postby Dave Lee on Wed Apr 10, 2019 2:22 am

Is the TOC generated automatically by the target? i.e. the target setting Advanced > Generate TOC proxy.

If so, then I think that'll probably just use h1 for the contents heading, and I'm not sure if you can change that.

If that is what you're doing, then I'd suggest you switch off that setting. Instead, create your own topic with the h1.TOCheading style for the heading, and below that insert a TOC Proxy.
Dave Lee
Master Propellus Maximus
 
Posts: 5616
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Printed Documentation Targets

Who is online

Users browsing this forum: Bing [Bot] and 2 guests