Want to add chapter numbers in the TOC
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Want to add chapter numbers in the TOC
Afternoon all.
I want to add the chapter numbers to my printed TOC but I can't figure out which style in my stylesheet I need to edit.
I tried editing p.TOC1, p.TOC2 and p.TOC3 by adding this to my print medium:
mc-auto-number-format: 'CH:TOC1{chapnum} - ';
but to no effect.
Any suggestions? Point me in the right direction?
I want to add the chapter numbers to my printed TOC but I can't figure out which style in my stylesheet I need to edit.
I tried editing p.TOC1, p.TOC2 and p.TOC3 by adding this to my print medium:
mc-auto-number-format: 'CH:TOC1{chapnum} - ';
but to no effect.
Any suggestions? Point me in the right direction?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Sr. Propeller Head
- Posts: 210
- Joined: Mon Sep 19, 2011 2:06 am
- Location: Netherlands - Zoetermeer
- Contact:
Re: Want to add chapter numbers in the TOC
Hi,
Use MadCap|tocProxy instead ?
I do not define any format on p.TOCx but used a global counter on the h1:
h1
{ ...
mc-auto-number-format: 'GH:{n+} ';
...
}
and for a h2
{ ...
mc-auto-number-format: 'GH:{n}.{n+} ';
...
}
for p.TOCx I set mc-auto-number-position: outside-head (default I think)
and for each heading that must not to show up in the Printed toc I set the mc-heading-level to 0
This allows to define a h1.appendix with a new global counter (GM:...)to start numbering appendices from 1 again.
Greetings,
René Severens
Use MadCap|tocProxy instead ?
I do not define any format on p.TOCx but used a global counter on the h1:
h1
{ ...
mc-auto-number-format: 'GH:{n+} ';
...
}
and for a h2
{ ...
mc-auto-number-format: 'GH:{n}.{n+} ';
...
}
for p.TOCx I set mc-auto-number-position: outside-head (default I think)
and for each heading that must not to show up in the Printed toc I set the mc-heading-level to 0
This allows to define a h1.appendix with a new global counter (GM:...)to start numbering appendices from 1 again.
Greetings,
René Severens
"The numbers are strange today; they somehow do not seem to add up."
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Want to add chapter numbers in the TOC
Thanks for your reply.
Unfortunately a proxy wouldn't be appropriate, as I need to have a starting page before the TOC in my PDF
Also, the h1, h2, h3 styles don't have an auto number in them (I display the chapter number in a different way in the body of the document) but I DO want to display the chapter number in the TOC.
Unfortunately a proxy wouldn't be appropriate, as I need to have a starting page before the TOC in my PDF
Also, the h1, h2, h3 styles don't have an auto number in them (I display the chapter number in a different way in the body of the document) but I DO want to display the chapter number in the TOC.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Want to add chapter numbers in the TOC
Choccie, I suspect the lack of autonumbering in your heading styles is the crux of your problem. I don't think you can accomplish what you're after viz a viz the generated table of contents if you aren't using autonumbering in headings.ChoccieMuffin wrote:Also, the h1, h2, h3 styles don't have an auto number in them (I display the chapter number in a different way in the body of the document) but I DO want to display the chapter number in the TOC.
Nita
![Image](http://forums.madcapsoftware.com/download/file.php?id=2449)
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Want to add chapter numbers in the TOC
I have a setup like this. On my h1s that I want to show with Chapter # in the TOC, I have applied an auto-number format to the h1 but the class of that format is set to display:none. So the h1s that start the chapter don't actually show the chapter number, because it's hidden there. But the TOC still picks it up.
I realize this is vague, but perhaps it will get you started.
I realize this is vague, but perhaps it will get you started.
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Want to add chapter numbers in the TOC
O.M.Gosh, that is brilliant! I so love the collective Flare brain we have here on the forums.whunter wrote:I have a setup like this. On my h1s that I want to show with Chapter # in the TOC, I have applied an auto-number format to the h1 but the class of that format is set to display:none. So the h1s that start the chapter don't actually show the chapter number, because it's hidden there. But the TOC still picks it up.
I realize this is vague, but perhaps it will get you started.
![Wink ;)](./images/smilies/icon_wink.gif)
Nita
![Image](http://forums.madcapsoftware.com/download/file.php?id=2449)
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Want to add chapter numbers in the TOC
I second what Nita says! Thanks, whunter, that's just what I need to do.Nita Beck wrote:O.M.Gosh, that is brilliant! I so love the collective Flare brain we have here on the forums.whunter wrote:I have a setup like this. On my h1s that I want to show with Chapter # in the TOC, I have applied an auto-number format to the h1 but the class of that format is set to display:none. So the h1s that start the chapter don't actually show the chapter number, because it's hidden there. But the TOC still picks it up.
I realize this is vague, but perhaps it will get you started.
![Smile :)](./images/smilies/icon_smile.gif)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Want to add chapter numbers in the TOC
I'm banging my head on this wall right now too. The thing is, you shouldn't HAVE to put the autonumber on the H1 that starts the chapter, because you define a new chapter in the TOC entry. So the counting works, and if you insert the chapter number variable on the page layout it works. Thus, Flare KNOWS the chapter number that applies to that topic, and so it should be able to pull it into the print TOC without setting an autonumber format on the H1s. (Grumble, grumble.)
This shouldn't be this hard, is all I'm saying.
This shouldn't be this hard, is all I'm saying.
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Want to add chapter numbers in the TOC
I'm clearly being a bit "fick" here, I don't understand what you mean by "the class of that format".whunter wrote:I have a setup like this. On my h1s that I want to show with Chapter # in the TOC, I have applied an auto-number format to the h1 but the class of that format is set to display:none. So the h1s that start the chapter don't actually show the chapter number, because it's hidden there. But the TOC still picks it up.
I realize this is vague, but perhaps it will get you started.
Here's my H1 code from my Print medium, where I've already added the mc-auto-number-format, but I don't understand where, or how, to set display:none.
Code: Select all
h1
{
background-image: none;
font-family: Arial;
border: none;
font-weight: normal;
font-style: normal;
margin-bottom: 60pt;
mc-hyphenate: never;
font-size: 22pt;
margin-right: 0;
margin-left: 0;
padding: none;
color: #8dc63f;
mc-auto-number-format: 'CH:{chapnum} - ';
mc-heading-level: 2;
page-break-inside: avoid;
page-break-before: avoid;
line-height: normal;
mc-next-tag: p;
}
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: Want to add chapter numbers in the TOC
Sorry for the delay, I was out of town. For example, my H1 looks like:
The mc-auto-number-class: white formats the auto-number. It corresponds to span.white, which looks like this:
I think the white color corresponds to an earlier version of this solution, where I "hid" the numbers by making them white. It's made irrelevant by the display:none though.
Code: Select all
h1.StandardHeading
{
mc-auto-number-position: outside-head;
mc-auto-number-offset: 50px;
mc-auto-number-class: white;
mc-auto-number-format: 'CH:Chapter {chapnum}: ';
page-break-before: always;
}
Code: Select all
span.white
{
display: none;
color: #000000;
}
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Want to add chapter numbers in the TOC
Thanks for filling in the holes in my knowledge. ![Smile :)](./images/smilies/icon_smile.gif)
![Smile :)](./images/smilies/icon_smile.gif)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx