Multiple TOC proxy formats?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Multiple TOC proxy formats?

Post by EileenP »

Hi, I have about 50 PDFs generated from one Flare project.

I'd like to be able to select from a few different TOC styles. However, I can't find any evidence that I can create selectors for tocProxy or for p.TOC1, p.TOC2 etc. Is there any way of doing this? Or do I have to create manual TOCs every time I want (for example) less line spacing?

Thank you!
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Multiple TOC proxy formats?

Post by Nita Beck »

Not in the same stylesheet. I suggest that in your main stylesheet, you define these styles as needed for the majority of your PDFs. Create a second stylesheet that imports from the main stylesheet and has just the variations for these styles as needed to achieve tighter spacing. Then, in the targets for the PDFs that need the tighter spacing, associate them with this second stylesheet. If you need more variations, create more stylesheets and associate them with the applicable PDF targets.

HTH
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Re: Multiple TOC proxy formats?

Post by EileenP »

Thank you for the reply.

But uugghhh. No. Three huge projects in three different languages, with multiple stylesheets in each project..... I feel like I have a tenuous grip on all the elements as it is. Too bad there's not an easier way to do this.

Regards, Eileen
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Multiple TOC proxy formats?

Post by Nita Beck »

Second guessing myself, you probably *could* manage this in one stylesheet. I *think* you can create a custom style for the proxy itself. But you can't for the p.TOC1, p.TOC2, etc. However, you could craft complex selectors that define the spacing for those p styles when they appear within the proxy set to the custom proxy style.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Re: Multiple TOC proxy formats?

Post by EileenP »

Thank you, @Nita. But at present I have neither the skill nor the time to implement that.

If someone ever reads this and has a simpler idea OR code that I could copy and customize, please post and I'll thank you for that.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Multiple TOC proxy formats?

Post by Nita Beck »

EileenP wrote:Thank you, @Nita. But at present I have neither the skill nor the time to implement that.

If someone ever reads this and has a simpler idea OR code that I could copy and customize, please post and I'll thank you for that.
Sorry you feel this way. I believe in helping Flare users learn to fish, rather than just handing them a fish.

Complex selectors (aka advanced selectors), despite the word "complex" are not hard.

When you have the time, here are some resources where you can learn more:
-- https://help.madcapsoftware.com/flare20 ... ncepts.htm, particularly the section titled "Advanced Selectors".
https://developer.mozilla.org/en-US/doc ... /Selectors
https://www.w3schools.com/csSref/css_selectors.php
https://www.w3schools.com/css/css_combinators.asp
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Re: Multiple TOC proxy formats?

Post by EileenP »

You don't know my situation. I'm trying to import 50-60 Word documents x 3 different languages into three different Flare projects in three different languages. BY MYSELF. And that's not my only task. I have to prioritize.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Multiple TOC proxy formats?

Post by Nita Beck »

EileenP wrote:You don't know my situation.
This is true of all of us about any of us. I'm not a MadCap employee, but am a working author like most of us here. As a consultant, I work on multiple projects simultaneously, many of them as the solo author, so I really do understand and appreciate your situation. Perhaps someone else has had this exact design need that you've encountered who can share code.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Multiple TOC proxy formats?

Post by NorthEast »

I think if you've got limited time to spend on this, then maybe question why you need to have different TOC spacing on different documents.
I would've thought it was better to use consistent styles/formatting anyway?

I'm a big fan of CSS, but in this case using complex selectors may not be the answer. I'd like to be proven wrong, but I doubt you'll get a solution this way.

The long answer is that using complex selectors with MadCap| prefixed styles doesn't usually work, since these are MadCap-specific HTML tags in the source that are generated/converted into something entirely different in the output. But Flare will often not process the CSS for MadCap| styles when they're used as part of a complex selector. So to use complex CSS selectors with MadCap| tags, you often have to create them based on the output tags/styles, not the source. Now, this technique works really well in HTML5 where you can actually see the output, but is very tricky with PDF outputs where you can't see the output structure, so it's pot luck whether anything will work.

Saying that, I would recommend spending just an hour or two learning what CSS selectors are available, and what you can do.
It's probably the most valuable bit of training you can do if you want to get the best out of Flare.
Post Reply