Section Numbers in TOC, Index, and XRef

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Section Numbers in TOC, Index, and XRef

Post by egag21 »

I need the section number included with my page number in my TOC, Index, and XRefs. I've looked and looked and couldn't find anything in the online help or on this site. This seems so basic that I must be missing something simple.

Below is rough sample TOC of what I need. The index would be similar. And XRefs would look like this: (See Qualifications for all Class Leaders, p. 2-3). Right now all of these things only have the simple page number rendering the Index and XRefs unusable.

Code: Select all

Section 1: CBS Overview                              1-1
  A. Class Structure                                 1-2
     1. Study Format                                 1-3
Section 2: Class Leadership Overview                 2-1
  A. Class Leadership Organizational Chart           2-1
  B. Recommended Numbers in Leadership               2-2
  C. Class Leadership Placement                      2-3
     1. Qualifications for all Class Leaders         2-3

egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

I posted this a while ago and haven't heard from anyone. I'm assuming that what I'm asking is impossible. At least tell me I'm right so I can stop spinning my wheels on this. BTW I'm using 4.0.
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: Section Numbers in TOC, Index, and XRef

Post by Richard Ferrell »

Are you using any special Variables for your page numbering?
Richard Ferrell

Certified Madcap Trainer
Image
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

In my Page Layout Footers I'm using the ChapterNumber variable and the PageNumber variable. How do I get the ChapterNumber variable into my TOC, et. al?
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

Another week has past and still no one has told me clearly whether or not it is posible to add chapter numbers to my TOC, Index, and Xrefs. I'm still betting I'm up a creak, but it seems like such a common need that it surprises me that it is missing from the software.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Section Numbers in TOC, Index, and XRef

Post by LTinker68 »

I don't know if this will work, I'm just throwing out a suggestion... But I wonder if it will work if you set values for the auto-numbering fields in p.TOC1, p.TOC2, etc.?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

I set my TOC1 mc-auto-number-format to {chapternum}.{page} and rebuilt my PDF. It seems that this setting was completely ignored. Any other ideas? Did I do what you suggest correctly?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Section Numbers in TOC, Index, and XRef

Post by LTinker68 »

Yeah, that's what I was suggesting, but now that I think about it, that probably would have thrown an auto-number at the beginning of the line and not the page number.

I suggest you contact tech support and ask them how to adjust the property for the page numbering in the TOC proxy, the mini-TOC proxy, the list-of proxy, and any other proxies that auto-generate page numbers. I'd be interested in knowing the answer, too, because I'm having trouble getting the font size of that number to match the font size of the rest of the text on that line.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
tana
Propeller Head
Posts: 27
Joined: Thu May 01, 2008 8:51 am

Re: Section Numbers in TOC, Index, and XRef

Post by tana »

I THINK I figured out how to add the Chapter Number to the Table of Contents. I followed your advice for editing the TOC1 mc-auto-number-format , but i set it to {n+}. I also edited the TOCProxy.htm topic to identify the stylesheet class; I right-clicked on the output toc proxy, selected Edit TOC Proxy, and in the dialog I typed in p.TOC1 in the Stylesheet class field, then clicked OK.

My TOC now has chap numbers in front to of it, yeah! Unfortunately, the H1 text "Table of Contents" also has a number (1) in front of it, hehe, but I will hopefully figure out how to make it start at the real first chapter.

What I cannot figure out is how to get the chapnum variable to display on the first page of every chapter... I added the variable to my header frame in the layout page, but when I build, what shows up top is the actual syntax of the variable, ChapNum!! Ugh... ;-)

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

Re: Section Numbers in TOC, Index, and XRef

Post by LTinker68 »

See this KB article for how to put variables in TOC entries --> http://kb.madcapsoftware.com/default_CSH.htm#TOC1007F
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Section Numbers in TOC, Index, and XRef

Post by KevinDAmery »

tana wrote:My TOC now has chap numbers in front to of it, yeah! Unfortunately, the H1 text "Table of Contents" also has a number (1) in front of it, hehe, but I will hopefully figure out how to make it start at the real first chapter.
I use a class for this. Add a class to the H1 style (something like H1.nonumber or whatever you prefer) then remove the autonumber format from that class. You can then apply that class to the TOC and any other topics you don't want to assign chapter numbers to.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

I never had a problem with including my autonumbers in my TOC, but thanks anyway. The autonumbers appeared without much hassle that I remember. If this is a problem for someone, I'll see if I can delve into it and figure out how I did it without problem.

The reason for this post in the first place was my need to put the chaptnum variable next to the pagenum variable in the TOC. No one has been able to help me with this and I just sent my project to the printer without it. :-( I'll be revising this document every six months, so I still need an answer, but for the first printing we're too late.
tana
Propeller Head
Posts: 27
Joined: Thu May 01, 2008 8:51 am

Re: Section Numbers in TOC, Index, and XRef

Post by tana »

Ah! Egag21, i just saw your post, after writing the post below...
Sorry I didn't address your issue, and yes, I would accept any help with mine! ;-) I am starting to feel quite silly, because I am realizing that what I really need is to learn how to NOT have the Table of Contents topic appear as an entry in the generated TOC! I simply want my fisrt "real" chapter, the Overview, to be labeled with the autonumber 1 in the TOC.

******************
Kevin, thanks for the tip, but I confess i dont quite understand how to implement it. I did create a new class called H1.H1_nonumber, and made the mc-auto-number-format property to {not set}.

But what I dont understand is how to selectively apply this class to certain TOC entries. Do you mean that I should apply the new style class H1.H1_nonumber to the header in the TOCProxy.htm file? I have done this.. I opened the TOCProxy.htm file, selected the header (Table of Contents), applied the H1.H1_nonumber to it, and saved it. I also right-clicked on the little gray proxy area, and entered p.TOC1 for the style class. (Is this confusing the topic?)

Is there something I need to set in the outline TOC?

Obviously, I am missing something,and now my head is so tangled I am not sure what to try next. Any help would be much appreciated.

Thanks in advance!
tana
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Section Numbers in TOC, Index, and XRef

Post by KevinDAmery »

Tana,

Sorry, I thought you meant you didn't want the TOC to be Chapter 1, not that you wanted to change the numbering in the TOC directly.

What you would do with the class is apply it to the topic heading for any topic that you don't want to apply a number to. This way you get the same heading level and formatting as other topics, but without the autonumber being applied. And since there is no autonumber, the TOC doesn't include numbering for those headings.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
tana
Propeller Head
Posts: 27
Joined: Thu May 01, 2008 8:51 am

Re: Section Numbers in TOC, Index, and XRef

Post by tana »

Thanks, Kevin. Thanks for your help... you did understand me correctly... I didnt want to know how to change the numbering in the TOC directly; what I want to have the generated TOC display the first "real" chaper as Chapter 1, and not display the Table of Contents itself as Chapter 1. (Now I realize that better yet of course is to simply not have the Table of Contents as an entry in the gernerated TOC at all).

So I THINK that I correctly followed your instructions for appplying that new style to the heading in the topic... "the topic" in this case is my TOCProxy.htm file, right? I opened that, and changed the H1 (Table of Contents) to be the new class of H1.H1_nonumber.

Is it ok that when the generated TOC is made, and I hover over that entry, the style that displays in Frame is H1.H1_nonumberTOC?

So even though I now realize that of course I dont even WANT the TOC itself to appear int he Toc, I still want to figure out why I cant make your instructions work, becuase I might have a use for that later. I appreciate your patience! ;-)

Oh, and should I have the Table of contents entry in the outline TOC set as "Start new chapter?" If I dont how do I apply a Page Type to it?

tana
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Section Numbers in TOC, Index, and XRef

Post by KevinDAmery »

Ok, you're doing something similar to what I'm doing, then. What I've done is the same as we've discussed so far, but with one addition: for the class, I have also set the Heading Level in the Flare stylesheet editor to 0 (i.e. it isn't considered a Heading by automated systems such as the TOC generator). You can do this in the PrintSupport section of the stylesheet editor using the mc-heading-level attribute.
Is it ok that when the generated TOC is made, and I hover over that entry, the style that displays in Frame is H1.H1_nonumberTOC?
Yes, that's normal, although if you do what I described above the TOC won't appear as an entry anymore so it won't matter.
Oh, and should I have the Table of contents entry in the outline TOC set as "Start new chapter?"
I would - I think a TOC that isn't in a chapter of its own looks odd.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
tana
Propeller Head
Posts: 27
Joined: Thu May 01, 2008 8:51 am

Re: Section Numbers in TOC, Index, and XRef

Post by tana »

Yeah, that worked!! Thank you so much, Kevin. If you have any patience/energy left over, could you send me some tips about getting the Chapter Number variable to show up in my First page of the layout?? ;-) I have tried both the system variable and on I created.

thanks again!
tana
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Section Numbers in TOC, Index, and XRef

Post by KevinDAmery »

Could you post the code for how you're adding the variable? It may be a syntax thing.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
tana
Propeller Head
Posts: 27
Joined: Thu May 01, 2008 8:51 am

Re: Section Numbers in TOC, Index, and XRef

Post by tana »

I have tried using the system variable, which as you know is System.ChapterNumber. I have also created a variable in RunningHF variable set called ChapNum,and I defined it as: <$chapnum>. (Is this the problem, should I have put it in MyVariables?)

In my Header frame on the First page, I have inserted both of these variables (in a table). Neither show up. I don't remember editing anything in the .css, since I had no clue what style drives that variable.

The variable that I defined does show up on the First page, but not as a number, only as the syntax itself! So I have <$chapnum> at the top of every First page. Nice.

A Madcap support fellow tried to help me yesterday, but was unable to make them work. I haven't seen on the forum any other people having this problem, though, which makes me think it can work... sigh.

Thank you, Kevin. If I knew how to attach a screenshot image I would send you a pic of the header Frame.

tana
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Section Numbers in TOC, Index, and XRef

Post by KevinDAmery »

Ok, I can show you what I have - just to be clear, this is from a master page (I haven't been working on docs of late so I haven't had a chance to dive into version 4 and page layouts yet - in theory this should work but you know what they say about theory....) Also, I'm not using chapter numbers but I am using a style based heading variable so that it picks up whatever the most recent heading was, so that should work similarly to the chapnum variable.

This is from my odd pages header, but it's the same on the other pages.

Code: Select all

        <MadCap:pageHeader class="OddPage">
            <table style="width: 100%;border-bottom-style: solid;border-bottom-width: 2px;border-bottom-color: #c48903;margin-left: 0;margin-right: auto;">
                <col style="width: 33%;" />
                <col style="width: 33%;" />
                <col style="width: 33%;" />
                <tbody>
                    <tr>
                        <th>
                            <p class="compact"> </p>
                            <p class="compact"> </p>
                        </th>
                        <td>
                            <p class="print_hf">
                                <MadCap:variable name="DataManager.Product Name" />
                            </p>
                        </td>
                        <td style="text-align: right;">
                            <p class="print_hf">
                                <MadCap:variable name="Word_HF.Running H/F 1" />
                            </p>
                        </td>
                    </tr>
                </tbody>
            </table>
A couple of other notes:
- "print_hf" is a class I defined to control what paragraphs look like in the header / footer tables
- Word_HF is a variable set I defined after consulting the Flare 3.x help. I'm not sure if that naming is required or not. If you're using a system variable, you would want <MadCap:variable name="System.ChapNum" /> instead.

HTH. If this doesn't work, I'm not sure what else to suggest other than getting back in touch with Madcap support.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
tana
Propeller Head
Posts: 27
Joined: Thu May 01, 2008 8:51 am

Re: Section Numbers in TOC, Index, and XRef

Post by tana »

Thanks, Kevin, but I am afraid it is back to Support for me. I looked at the code behind my .flpgl, and I had someting similar to yours:

Code: Select all

<MadCap:variable xhtml:name="RunningHF.ChapNum" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" />
The difference is that mine seems to be relying on an .xsd file somewhere else, which seems odd, but even when I took out that stuff and made it exactly like yours, it still didn't work. Here's the other one that I edited to take out the .xsd reference:

Code: Select all

<MadCap:variable name="System.ChapterNumber" />
All of my other variables work: the page number, the chapter title, and the book title.

This is really bumming me out... I "sold" Flare to my managers as a single-sourcing solution, and so far I still have major problems with long pages being truncated, Mini-tocs not appearing, no Chapter Number variable, nested tables dropped, and a disabled Page Break feature when I open the docs in Frame. Sigh. But thanks for your Help. I might have to drop the single sourcing dream, and go back to authoring hardcopies in good old Frame.

Thanks again,
tana
Hobbes
Propeller Head
Posts: 39
Joined: Thu Aug 14, 2008 9:39 am

Re: Section Numbers in TOC, Index, and XRef

Post by Hobbes »

From reading this thread, it doesn't appear that anyone has solved the original issue of displaying the chapter and page number in the printed ToC (. . . 5-2). Has anyone figured out a workaround for this? Or has a bug been opened up for it?

Some users have already noticed it in my output and I have no way to fix it other than outputting to Word, which defeats the purpose of going straight to PDF.

Thanks
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

Thanks, it is good to know that I'm not alone. I believe I've entered this as a bug, but it wouldn't hurt if you did as well. It might increase the likelihood that MadCap fixes it in the next version.
jlkirkman
Jr. Propeller Head
Posts: 1
Joined: Fri Sep 14, 2007 8:35 am

Re: Section Numbers in TOC, Index, and XRef

Post by jlkirkman »

I am glad to see that this topic has come up again. I entered a topic on this subject about a year ago and also was not able to get any resolution. What I was trying to do (and what I still am trying to do) is display page numbers in the format: <ChapterNumber>-<PageNumber>. I can get them to appear this way on the pages, but I can't get them to appear this way in the TOC or index.

I did submit a request for help to technical support and they asked me to send in my files, which I did. I did not receive a response for a very long time, and when I did, I was told that the problem would be corrected in V4.0. However, this does not appear to be the case. At least I haven't been able to make it work, but I haven't spent that much time on it so far, as I've been having problems with getting page layouts to work in general. I'm actually thinking of going back to may masterpages for print output. I did get them to work -- as long as I didn't try to include <ChapterNumber>-<PageNumber> entries in my TOC and Index. I'm using traditional sequential page numbering for all of my text.

My thought was that the problem was not in anything that we tried to do, but in the idea that when Flare builds a TOC and an Index it uses only the system variable <PageNumber>, which I dont think is customizable. As far as I can see it would require that the definition of <PageNumber> be modifiable or that Madcap should provide us with new system variables like <Chapter-Page-Number> or <Section-Page-Number> and that there be a way that we can specify the system variables that would be used to generate page numbers in the TOC and Index. Right now, I don't see a way to do this.

As I am not a Flare guru by any means, I could be way off on this, but I had spent so much time on trying to find work-arounds, that I just could not figure out any other permutations. If anyone has been able to actually build print output with <ChapterNumber>-<PageNumber> formats that do appear perfectly on the page, in the TOC, and in the Index, I'd love to hear from you.

I love Flare and I am very excited about its potential for single-sourcing, but getting to the point where I can make everything work seamlessly has been very painful and time-consuming.

Jane
egag21
Propeller Head
Posts: 38
Joined: Tue May 20, 2008 9:05 am

Re: Section Numbers in TOC, Index, and XRef

Post by egag21 »

Thanks for posting, Jane. It does seem like there is an obvious need for this feature.
Post Reply