formatting miniTOC entries as a list?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

formatting miniTOC entries as a list?

Post by bobmoon »

Our current Word template includes a "miniTOC" at the beginning of every chapter that looks something like this:
  • > Topic Name.....1
    > Topic Name.....2
    > Topic Name.....3
Moving to Flare, a miniTOC will generate the topic name and page number, but I can't figure out a way to put a "bullet" character at the beginning of each entry. I've tried playing with the CSS for p.miniTOC1 and Madcap|miniTOCproxy, but can't seem to apply any kind of list or autonumber styling.

Of course, I can make this change in Word after generating my output, but I'd love to do this in Flare if possible. Any pointers?

Thanks,
Bob
scott
Propeller Head
Posts: 81
Joined: Tue Jan 03, 2006 6:35 pm
Location: miami
Contact:

Re: formatting miniTOC entries as a list?

Post by scott »

Hi Bob,
You can use the p.MiniTOC1 (and ...2, ...3, etc) styles to format the miniTOC as a bulleted list.

To format the miniTOC items as a bulleted list:
* Set the p.MiniTOC1 style's display property to list-item.
* Set the list-style-image to your image. Your image must be in the Reousrces\Images folder to appear in the list.

hope this helps,
.scott
Scott DeLoach
Certified Flare trainer/consultant - http://www.clickstart.net
* MadCap Flare: The Definitive Guide
* CSS to the Point
* HTML5 to the Point
https://bit.ly/2LQN11O

scott@clickstart.net
Certified MAD for Flare
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Re: formatting miniTOC entries as a list?

Post by bobmoon »

Hey Scott -
To format the miniTOC items as a bulleted list:
* Set the p.MiniTOC1 style's display property to list-item.
* Set the list-style-image to your image. Your image must be in the Reousrces\Images folder to appear in the list.
This doesn't work for me. I changed the display to list-item and specified a bullet character, and I still do not get bullets.

I can change the font color for p.MiniTOC1 to blue, and that change carries over, so I know that Flare is at least recongnizing the style. It just seems to ignore the list properties. I tried duplicating the style rules for my first-level bulleted list, since that style is working in the document, but it does not work. I also tried just using "list-style-type: disc", but I don't get any list formats.

If you have it working, can you post your p.miniTOC1 style rule? Maybe there is some other setting that I'm missing.

Thanks!
Bob
scott
Propeller Head
Posts: 81
Joined: Tue Jan 03, 2006 6:35 pm
Location: miami
Contact:

Re: formatting miniTOC entries as a list?

Post by scott »

Hi Bob,
All of these work for me in WebHelp (I didn't check other online formats):

p.MiniTOC1
{
display: list-item;
}

p.MiniTOC2
{
display: list-item;
list-style-image: url('../../smiley.png');
}

p.MiniTOC3
{
display: list-item;
list-style-type: circle;
}

Try defining a few levels to make sure you are setting up the right level. They should appear in the preview, so you won't have to build your target to test them.
Scott DeLoach
Certified Flare trainer/consultant - http://www.clickstart.net
* MadCap Flare: The Definitive Guide
* CSS to the Point
* HTML5 to the Point
https://bit.ly/2LQN11O

scott@clickstart.net
Certified MAD for Flare
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: formatting miniTOC entries as a list?

Post by mattbnh »

Scott, your method works for my test project in webhelp but not in PDF.

I have the same settings in the default medium as well as in my print and help mediums.

The mini toc in PDF does seem to be indented as a list but the bullet graphic does not appear.

Also of note is that setting the image to default and the list-style-type to disc produces a bullet in webhelp but a blank in PDF output.

Am I missing a setting, or is this a bug in the PDF target? Anyone else see the same results?
scott
Propeller Head
Posts: 81
Joined: Tue Jan 03, 2006 6:35 pm
Location: miami
Contact:

Re: formatting miniTOC entries as a list?

Post by scott »

Hi Matt,
Yep, that solution was only tested in WebHelp. However, I do like a challenge!

I have written a style rule that you can use for PDF and XPS. It won't work in Word or Frame. It probably works in online targets, but it uses a CSS property that isn't supported in most browsers. I recommend using the previous solution for online targets.

Add the following style rule to the print media section of your stylesheet:

Code: Select all

.MCMiniTocBox a:before {
  display: marker;
  content: "\2022 \0020";
}
That will add a solid bullet (2022) and a space (0020) before all of your miniTOC items. You can use any hex value as long as you add a \ before it. You can also use ASCII characters without the \. For example:

Code: Select all

.MCMiniTocBox a:before {
  display: marker;
  content: ">> ";
}
For a list of other shapes (like squares and diamonds) that could be used as bullets, see http://en.wikipedia.org/wiki/Unicode_Geometric_Shapes.

You can use the content property to specify an image, but it doesn't seem to work with print targets. It should work with online targets.

Here's how it would be written:

.MCMiniTocBox a:before {
display: marker;
content: url(bullet.gif);
}

hope this helps,
.scott
Scott DeLoach
Certified Flare trainer/consultant - http://www.clickstart.net
* MadCap Flare: The Definitive Guide
* CSS to the Point
* HTML5 to the Point
https://bit.ly/2LQN11O

scott@clickstart.net
Certified MAD for Flare
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: formatting miniTOC entries as a list?

Post by mattbnh »

Thanks Scott:

That is a pretty tidy solution.

It worked right away in a quick test.

I added it to the stylesheet for our global project. I will re-import and see how it turns out in a "real" project.

Of note for those who have been keeping their stylesheets somewhat vanilla (I am trying not to hand-edit stuff into the .css), this addition appears in the Flare advanced Stylesheet Editor under Complex Selector.

My point is that it is maintainable from the editor, rather than requiring text hacking to maintain. In fact, it lends itself to experimentation using the wiki reference Scott provided.

Thanks again.
ChristineL
Propeller Head
Posts: 12
Joined: Thu Apr 01, 2010 1:20 pm

Re: formatting miniTOC entries as a list?

Post by ChristineL »

Does anybody know whether this method should still work with Flare V6? I tried out several things and it does not work for me, though I am not sure I did the right things.

Also, I would like to do the following:

* Remove the Autonumber format from the Minitoc inherited from the Heading styles
* Remove the page number from the Minitoc

Any ideas?

Thanks, Christine
scott
Propeller Head
Posts: 81
Joined: Tue Jan 03, 2006 6:35 pm
Location: miami
Contact:

Re: formatting miniTOC entries as a list?

Post by scott »

Hi Christine,
Yes, these style declarations seem to work fine in Flare 6.

If your miniTOC is not appearing at all, make sure your topic includes the miniTOC proxy. Also, you will need to select "Use TOC depth for heading levels" on the Advanced tab.

The autonumbers become part of the headings when Flare creates a print target. I don't think there is an easy way to remove them from the miniTOC, since it is generated based on the text of the headings.

To remove the leader line ("..."), set the p.MiniTOC styles mc-leader-format property to blank or a space.

I haven't found a way to remove just the page number. However, you can move it off the right side of the page:

MadCap|miniTocProxy { margin-right: -10in; }

If that doesn't work, you might be able to set its color to white. The downside is that it will still be there, so users could click on it.

hope this helps,
.scott
Scott DeLoach
Certified Flare trainer/consultant - http://www.clickstart.net
* MadCap Flare: The Definitive Guide
* CSS to the Point
* HTML5 to the Point
https://bit.ly/2LQN11O

scott@clickstart.net
Certified MAD for Flare
ChristineL
Propeller Head
Posts: 12
Joined: Thu Apr 01, 2010 1:20 pm

Re: formatting miniTOC entries as a list?

Post by ChristineL »

Dear Scott,

the MiniTOC proxy shows up, but not the marker.

Does anybody have a sample stylesheet how the code must look like?

Thanks in advance, Christine
ChristineL
Propeller Head
Posts: 12
Joined: Thu Apr 01, 2010 1:20 pm

Re: formatting miniTOC entries as a list?

Post by ChristineL »

Problem found: I was using a class called “Level1” for the miniTocProxy. The code works after removing the class from the Mini-TOC.

I was not able to change the code so that it would support the class. Does anybody has a suggestion?

Thanks in advance, Christine
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: formatting miniTOC entries as a list?

Post by lacastle »

I had an issue like this a few years ago. Here is the forum thread where we figured it all out (with some code examples).

http://forums.madcapsoftware.com/viewto ... f=6&t=7023

this is for webhelp, but i've also used it for pdf. i don't have that code in front of me right now though. i don't remember if it's different.
ruthhoward
Sr. Propeller Head
Posts: 121
Joined: Tue Jul 24, 2012 12:38 am

Re: formatting miniTOC entries as a list?

Post by ruthhoward »

I figured out how to get rid of page numbers in miniTOC in print

viewtopic.php?f=10&t=27534
Post Reply