Single Source Two Stylesheets for Electronic Output?

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
Mishou6779
Propeller Head
Posts: 57
Joined: Mon Jun 01, 2009 9:19 am

Single Source Two Stylesheets for Electronic Output?

Post by Mishou6779 »

Hi all,

The Backstory

I use Flare 2017. I always single source my Flare project for three targets: WebHelp, Word, and PDF. Per advice given to me during a MadCap tech support call, I use PrimaryStyleSheet.css for WebHelp output, and SecondaryWordStyleSheet.css for Word and PDF outputs.

In PrimaryStyleSheet for WebHelp output, H1, H2, and H3 all look the same (so help pages look consistent online).

In SecondaryWordStyleSheet for Word and PDF output, H1, H2, and H3 all look different so the reader can navigate the document.

When left to my own devices I usually make each H1, H2, and H3 a separate HTML file.

As far as I know, this is all rather standard for tech writing/Flare and has all worked fine until now.


The Issue

We have a huge release coming in March. The VP of technology at my company has mandated that I create only one HTML file called New Functionality Overview (NFO) and has dictated that I must use that same file in the WebHelp output and in Word and PDF. She has specifically said she does not want me to create multiple files. In her mind, her approach is simpler and more efficient.

Thus in the WebHelp output, with H1, H2, and H3 all looking alike, this NFO will be 39 miles long and a &%!()$* to navigate (both for me as the author and for our readers). :shock:

So to make this work, in the WebHelp output for the NFO file, to the user it should look like H1, H2, and H3 are all different. As in Word and PDF output. (And I'm not worried about Word and PDF since they have their own CSS and they place nice in the sandbox.)

In the WebHelp output for all other files, H1, H2, and H3 should all match.


Where to Go From Here?

Does anyone know how I can make H1, H2, and H3 in that single NFO file look different from all the other help pages in the WebHelp output? And still be navigable? This is a buggar because as far as I know the CSS goes to the target-level not to the individual HTML-file level.

I thought about using bookmarks and cross-references for navigation in WebHelp but then those won't work because they won't get generated into the TOC in any output.

I am at a loss and am considering abandoning my post and taking a job at the counter in the nearest fast-food joint.

Thank you for your help!
Michelle
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Single Source Two Stylesheets for Electronic Output?

Post by Nita Beck »

I think you might be able to achieve this with your primary stylesheet. Create a custom class of <html>, something like html.DiffHs. Then, using complex selectors, create some alternate h2 and h3 style definitions to go along with html.DiffHs that will make them look different than the h1 style. What follows are just off-the-top-of-my-head examples.

Code: Select all

html.DiffHs

html.DiffHs h2
{
   font-size: 0.9em;
   margin-top: 20px;
}

html.DiffHs h3
{
   font-size: 0.8em;
   font-weight: normal;
   font-style: italic;
   margin-top: 10px;
}
Then, in the single NFO topic, right-click the html structure bar and apply the html.DiffHs custom style to it. That way, the h2 and h3 headings in this particular topic will take their definitions from the styles associated with html.DiffHs.

I realize I've not addressed your question about navigability in the NFO topic. Perhaps someone else can jump in...
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
2bemused
Propeller Head
Posts: 10
Joined: Fri Aug 08, 2014 6:12 am
Location: Ireland
Contact:

Re: Single Source Two Stylesheets for Electronic Output?

Post by 2bemused »

Hi Michelle,
Once your project is not set to have a master stylesheet then you can apply different stylesheets to different topics.
Create a new stylesheet with the styling required for the NFO topic and apply it to that topic.

I wouldn't necessarily agree with having multiple H1's in the same topic. Sort of goes against the grain of having topic based authoring. Each H1 should be a new topic, with its H2's and H3's etc contained within it. But if that is how it works for you, carry on!

Philip
To do is to be - Socrates
Doooby doooby doo - Sinatra
Yabba Dabba Doo - Fred Flintstone
Mishou6779
Propeller Head
Posts: 57
Joined: Mon Jun 01, 2009 9:19 am

Re: Single Source Two Stylesheets for Electronic Output?

Post by Mishou6779 »

Thank you both for your assistance.

Philip--I totally hear you on the H1s each being their own topics. That's normally how I do it. But the VP says that for this release, I am to put them all in the same topic. And so I shall. :roll:

However. This past weekend, I remembered learning about Catherine the Great in Russian Studies at university, and her sidekick Grigory Potemkin (stay with me, I do have a point). I decided to use the example of the "Potemkin village" in my online help.

I am going to create two identical topics; one for print output, the other for my webhelp output. I will use snippets to write all of the content and plug them into place in each of the two topics. Then I will manually change (I know, I know... :shock: ) the look of the H2s and H3s in the webhelp topic. When I generate the help and the Word output and my own Catherine the Great VP compares them side-to-side, they will look like they both came from the same source.

If she presses further and asks to see the "lone file" in Flare, well...I'm just going to tell her that she doesn't want to know how this sausage is made (a quote from our CEO, so it has the possibility of going over well).

If I thought that this was going to be an ongoing "thing" I would put more effort into it and make it right. However, with each "base" release in the past 11 years (there have only been 4), we've published the new functionality guide in a different way. So I'm gambling on that and hoping that for the next base release in another 3-5 years, there will be yet another different mandate.

Sorry to ask for help and then just slink back to my work and do everything the wrong way, but sometimes a girl's gotta do what a girl's gotta do.

Thank you a million times for reading and responding!

Michelle

p.s. Philip, your tagline is great! Makes me think "Rooby Rooby Rooo - Scooby Doo" but maybe he's not so famous in Ireland?
Post Reply