MiniTOC & Autonumbers

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Shredder
Propeller Head
Posts: 43
Joined: Fri Sep 18, 2020 4:42 am

MiniTOC & Autonumbers

Post by Shredder »

minitocknocks.png
I would like to add a MiniToC to longer chapters for a printed manual. However, the MiniToC so far seems to resist most attempts at formatting it.

A) The spacing between the heading and the autonumber won't change. I am using the same CSS rules as for the ToC, which is working.
Q: Does the spacing work differently?

B) Thus I would like to suppress the autonumbers, by setting mc-autonumber-position p.MiniToC1 thru 4 to "none". However, the little tricksters are still showing themselves.
Q: Is it possible to suppress the autonumbers for the MiniToC?
You do not have the required permissions to view the files attached to this post.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: MiniTOC & Autonumbers

Post by robdocsmith »

Hi,

No, MiniTOC spacing shouldn't be any different to the TOC spacing. The CSS should work in the same way. Just remember that you need a set of p.MiniTOCn styles to match the p.TOCn styles.

For example, if my heading styles are:

Code: Select all

h1
{
   mc-heading-level: 1;
   mc-auto-number-format: 'CH:{chapnum}';
   mc-auto-number-position: outside-head;
   mc-auto-number-offset: 12mm;
   padding-left: 12mm;
}
h2
{
   mc-heading-level: 2;
   mc-auto-number-format: 'CH:{chapnum}.{n+}';
   mc-auto-number-position: outside-head;
   mc-auto-number-offset: 12mm;
   padding-left: 12mm;
}
h3
{
   mc-heading-level: 3;
   mc-auto-number-format: 'CH:{chapnum}.{n}.{n+}';
   mc-auto-number-position: outside-head;
   mc-auto-number-offset: 12mm;
   padding-left: 12mm;
}
etc.
Note this aligns heading text at 12mm from left margin. You may need to adjust this for different heading levels to compensate for the max width of the number (alternatively, if you don't want to align text by indent you can just add spacing to the mc-auto-number-format statement and forget about using the offset/padding/position statements).

My TOC styles could be:

Code: Select all

MadCap|tocProxy
{
   border: 0;
   margin: 0;
   padding: 0;
}
p.TOC1
{
   margin-left: 0mm;
   mc-auto-number-offset: 8mm;
   padding-left: 0mm;
   mc-auto-number-position: outside-head;
}
p.TOC2
{
   margin-left: 0mm;
   mc-auto-number-offset: 10mm;
   padding-left: 5mm;
   mc-auto-number-position: outside-head;
}
p.TOC3
{
   margin-left: 0mm;
   mc-auto-number-offset: 12mm;
   padding-left: 10mm;
   mc-auto-number-position: outside-head;
}
etc
See the indent of each increases with each level (padding-left) and the offset increases with each level because the width of the auto-number increases.
My MiniTOC styles can be the same:

Code: Select all

MadCap|miniTocProxy
{
   border: 0;
   margin: 0;
   padding: 0;
}
p.miniTOC1
{
   margin-left: 0mm;
   mc-auto-number-offset: 8mm;
   padding-left: 0mm;
   mc-auto-number-position: outside-head;
}
p.miniTOC2
{
   margin-left: 0mm;
   mc-auto-number-offset: 10mm;
   padding-left: 5mm;
   mc-auto-number-position: outside-head;
}
p.miniTOC3
{
   margin-left: 0mm;
   mc-auto-number-offset: 12mm;
   padding-left: 10mm;
   mc-auto-number-position: outside-head;
}
etc
Note that you will need to adjust padding/offset for minitoc as the heading levels selected for the minitoc are relative to the position of the minitoc proxy but the style isn't. For example, if I put a minitoc proxy under a H1, it will select headings below that level (h2/h3/h4/etc) to go in the mintoc but the minitoc styles applied will be miniTOC1/miniTOC2/miniTOC3/etc. This can mean that the number is wider than anticipated. It would make sense if always putting a minitoc under a H1, that miniTOC1 style is the same as TOC2 style.

To answer your second question... no, the auto-number is a part of the heading style and the whole heading text (number plus text) is collected to be formatted by the TOC.

Hope that helps,

Rob
Post Reply