How to make TOC entries not display a page number

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

How to make TOC entries not display a page number

Post by mattbnh »

I looked and could not find a solution in the forums or in Flare help.

For a direct-to-pdf target, we are trying to clone our Frame TOC, which looks like this (roughly):

Chapter 1 Overview
-------------Heading 1 Title ............................................... 1
-----------------Heading 2 Title ........................................... 2
etc (the hyphens are leading spaces that the forum does not seem to want to display for me)

I can figure out a way to do everything except include the Chapter titles in the TOC generated by TOC proxy with no page number. I can get rid of the leader, but the page number remains.

A secondary issue that I can kludge but would rather do via best practices, is to use auto-numbers to generate the "Chapter 1" portion of the Chapter Title in the TOC.

In the topics, we have a separate Chapnum style on line 1 using an auto-number , and a Chaptitle on the next line, with no numbering.

I tried to do this with the mc-auto-number properties of the p.TOC1 style, (CH:Chapter {chapnum} was my initial attempt) but nothing resulted.

I noted that the mc-autonumber properties do not show up as 'relevant properties" for the p.TOC1 - p.TOCx, which I must say greatly surprised me.

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

Re: How to make TOC entries not display a page number

Post by LTinker68 »

mattbnh wrote:In the topics, we have a separate Chapnum style on line 1 using an auto-number , and a Chaptitle on the next line, with no numbering.
If I understand what you're asking, then I did the same thing as a bit of a workaround. I have the following auto-numbering setup on the <h1> tag that calls a span tag for the auto-number format. It automatically adds "Chapter x" (where x is a sequential number) followed by the text of my chapter title, with the chapter number text being a smaller size and being small-caps. However, I have to manually insert a soft line break (<br \>) to get the "Chapter x:" to be on one line and the chapter title to be on the next line. Not the most desired of situations (I'd rather it did the soft line-break itself), but it seems to work with everything. I also added some extra blank spaces after the chapter number so that the chapter title isn't right up against the chapter number in the TOC and my footers.

Code: Select all

h1
{
	font-family: ClassGaramnd, 'Times New Roman', serif;
	mc-hyphenate: never;
	font-size: 40pt;
	margin-bottom: 2in;
	page-break-before: always;
	mc-auto-number-class: chapNum;
	margin-top: 0pt;
	padding-top: 0pt;
	mc-auto-number-format: 'GH:Chapter {n+}   ';
}

span.chapNum
{
	font-size: 24pt;
	font-variant: small-caps;
	margin-top: 0pt;
	padding-top: 0pt;
}
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: How to make TOC entries not display a page number

Post by mattbnh »

Thanks Lisa:

That is a good way to get the "Chapter x" auto-text into the TOC. Very inventive.

But one objective was to add it to the TOC without adding it to the chapter first page that already has a chapnum para without the word "chapter."

I would use this in a second if it did not have a side effect.

I was trying to avoid that because it changes our chapter first page look, thus providing more ammo to the doubters who think that Flare cannot clone our Framemaker templates.

This changes our first page of a chapter from:


(pretend right-align) 1



(pretend right-align) Greatest Topic Ever

to



(pretend right-align) Chapter 1
(soft return)
...
...
...
(pretend right-align) Greatest Topic Ever


Just to get the words "Chapter 1" into the TOC.

Though it seems I can put any number of soft-returns between the Chapter x auto-text and the actual title to get some separation, that is just so...in-line.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: How to make TOC entries not display a page number

Post by LTinker68 »

Still not entirely sure I'm following, but I wonder if you can do this as a workaround (you'll have to put in a feature request, probably, to get the type of setup you're looking for)...

In each topic, you have two <h1> headings. One is the default <h1> and one is a class of <h1>. You set one of those to have an mc-heading (I think that's the property name) of 1 and you set the other one to have an mc-heading of 0. The one with the heading of 1 will appear in the TOC and the one with 0 won't appear in the TOC. The one with the 1 value you set to not be displayed in the topic, and the one with the 0 will be displayed. The one with the 1 value doesn't have the chapter text, the one with the 0 does. And any other differences between the two that you can think of. You might also need to disable the option in the PDF target to build the appearance of the TOC based on the heading levels, because it might include both versions of h1, but I think I'm using some headings with 0 levels that don't appear in the outputted TOC but are included in the output file itself.

Bit more of an effort on your end, but it's something you might try as a workaround until MadCap implements your request.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: How to make TOC entries not display a page number

Post by mattbnh »

Worth trying Monday - thank you for the ideas.

Though it still doesn't give me a TOC where the chapter heads do not display a page number, as in Frame.

I can get by without that. The current result looks presentable, just not exact.

But only another writer in the group would ever notice.
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: How to make TOC entries not display a page number

Post by mattbnh »

With a little css trickery, I was able to solve a couple of problems. This may not work for everyone, and it may have some side effects that I have not uncovered, and it is intended only for the PDF target.

And of note, this is actually an improvement over our frame template, which we could not get to bookmark this way, so we had to manually hack the bookmarks in Acrobat to achieve this effect.

By creating a span called WhiteOut that sets the font to <guess which color>, and applying that span in my h1.chaptertitle and h1.apptitle paragraph styles as mc-auto-number-class, I was able to have the Chapter and Appendix titles 'appear' as I want them in the PDF bookmarks, generated TOC, and on the first page of the chapter/appendix.

The h1.chapertitle and h1.apptitle styles also have an auto-number format defined as "Chapter {chapnum} - " and "Appendix {chapnum} - "

snapshot of TOC
toc.png
snapshot of titlepages
titlepage.png
snapshot of bookmarks
bookmarks.png
You do not have the required permissions to view the files attached to this post.
RiverMonster
Sr. Propeller Head
Posts: 148
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: How to make TOC entries not display a page number

Post by RiverMonster »

mattbnh wrote:By creating a span called WhiteOut that sets the font to <guess which color>, and applying that span in my h1.chaptertitle and h1.apptitle paragraph styles as mc-auto-number-class, I was able to have the Chapter and Appendix titles 'appear' as I want them in the PDF bookmarks, generated TOC, and on the first page of the chapter/appendix.
Hi Matt,

We have had issues like yours too.

I tried your idea and it works well for the TOC. However, the "Chapter X" text also comes through in any headers/footers that are based on the tag concerned. If you already have the headers/footers showing the chapter number via some other means (e.g. on shaded tabs) then the resulting repetition may not be what you want.

By the way, I regard the fact that mc-auto-number does not work for the TOC styles as a bug so unless someone convinces me otherwise will put in a bug report.

Adrian
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: How to make TOC entries not display a page number

Post by mattbnh »

It works OK in mine because the headers show section name not chapter, and the footer just has Chapter and the auto number, so the chapter title is not in the H/F.

I agree it is a bug or a design limitation, and hopefully it will be fixed in an upcoming version. There is definitely more work to be done on setting PDF parameters such as bookmarks for the PDF target.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How to make TOC entries not display a page number

Post by KevinDAmery »

<Standard MVP response>

If this issue is causing you problems, submit a bug report. This is true even if you know that someone else has already reported it, for two reasons. 1) The more people report it the more priority Madcap puts on it. 2) It's possible you have some information that others have not reported which may help Madcap to produce a better fix.

Bugs can be reported here:
http://www.madcapsoftware.com/bugs/submit.aspx

</Standard MVP response>
Until next time....
Image
Kevin Amery
Certified MAD for Flare
RiverMonster
Sr. Propeller Head
Posts: 148
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: How to make TOC entries not display a page number

Post by RiverMonster »

Done!

Thanks,

Adrian
Post Reply