Mediums vs. separate stylesheets for single sourcing

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Mediums vs. separate stylesheets for single sourcing

Post by Nita Beck »

I am interested in knowing whether single-source folks are using mediums or separate stylesheets for each deliverable.

I'm creating a document that will be output as both PDF and WebHelp, and I've chosen to use a separate stylesheet for each target, which I apply at the target level. This approach does require duplication, in that I need to have the same styles defined in each stylesheet. But I've chosen to do this so that the stylesheets are portable; for example, if I create another document for which I need to output only to PDF, I don't want to bother with even seeing any of the WebHelp-flavor styles. Or if I create a WebHelp-only project, I can start with my WebHelp stylesheet and not have to both with any of the print styles. (And since I work for multiple clients to produces all different kinds of documentation, the portability of the stylesheets is appealing.)

I usually think my approach makes perfect sense for single-sourcing, but then I start second-guessing myself and wonder if I should be using mediums instead.

What are other single-sourcing authors doing? What would be the advantage/disadvantage of using mediums instead? In short, what's the best practice?

Nita

(Hey, Mike, I assume that when you use the term "single sourcing," you mean outputting to different targets. I've heard you [as recently as yesterday's webinar on CSS] use the terms "single sourcing" and "multichannel publishing." Sometimes, these terms seem to be used interchangeably and sometimes they seem to be used to mean distinct concepts.)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mediums vs. separate stylesheets for single sourcing

Post by doc_guy »

I just switched companies, and I haven't yet decided how I'm going to do this. However at my last company, I tried both. I ended up with separate style sheets, but I used code at the beginning of my style sheet to import the styles from the other style sheet, to remove some duplication.

So I had two style sheets: print.css and styles.css. At the beginning of my print.css file, I had the following:

Code: Select all

/*<meta conditions="Default.PrintOnly" />*/

@import url('Styles.css');

@media print {
This imported all of my WebStyles into the Print Style sheet, so they could inherit the Web Styles, except for where there were changes in the print section.

That solution mostly worked well for me. :)
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mediums vs. separate stylesheets for single sourcing

Post by doc_guy »

I can't speak for Mike, but it seems to me that multi-channel publishing is a specific type of single sourcing. Single sourcing is the broad term, while multi-channel publishing is one application of single sourcing.
Paul Pehrson
My Blog

Image
forfear
Propellus Maximus
Posts: 766
Joined: Sat Feb 16, 2008 3:37 am
Location: Jungle Jingles

Re: Mediums vs. separate stylesheets for single sourcing

Post by forfear »

I use 2 mediums exclusively. (default) and printOnly.

(default) - is for screen viewing/
printOnly - if for all print deliverables

Note: this method breaks the Flare Print Format for single-sourcing images since its reliant reliant on the assumption that my Flare Print Format is specified in the medium print.

print medium
I make sure the medium 'print' doesn't have any page breaks overspecified. so that it prints nicely from a web browser.


This week I just started overhauling (brand new style sheet from scratch) my old 2 year old stylesheet(we imported projects from RoboHelp, then tacked on all the Flare stuff over the years - not the best thing). We have 12 projects using different flavours of this. I hope to set up a master project for Global linking - so a good start with a clean style sheet, that you can rely on will be good.

I started this yesterday. I am examining/deconstructing the Vista help system and the MadCap Flare system as my reference guide (not reusing their style sheet, but examining the topics and the types of class references made by actual topics).

I have also started reviewing some of Frame/Blaze expert, Sharon Burton's older recorded Blaze demos, to see how an expert breaks up her style sheet classes for actual Cash Register projects.
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
Bonnie Kern
Propeller Head
Posts: 29
Joined: Mon Mar 16, 2009 3:54 pm

Re: Mediums vs. separate stylesheets for single sourcing

Post by Bonnie Kern »

The method we are using to single-source our content to multiple outputs is:

- A single style sheet containing all of the styles
- Multiple mediums for the output types
- Multiple targets with the various mediums applied

This approach is working well for us.
Regards,
Bonnie
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Mediums vs. separate stylesheets for single sourcing

Post by GregStenhouse »

Another advantage of Mediums (in addition to only having to maintain one file, as you have mentioned), is that they should also apply when the user prints from your help. For example, if you use the medium "print", Flare will add
@media print { ... } to your stylesheet. Those styles will also apply when the user hits File>Print in your browser, or hits the print button in CHM help.
forfear
Propellus Maximus
Posts: 766
Joined: Sat Feb 16, 2008 3:37 am
Location: Jungle Jingles

Re: Mediums vs. separate stylesheets for single sourcing

Post by forfear »

I've finally created a fairly complete brand new stylesheet. Next I will put it through the Global master project import process.

To answer the question, I use both. i use both, mediums and separate stylesheets.
The differentiating factor is when and how separate stylesheets are justified.

The risk of putting everything into one stylesheet with multiple mediums is that, IMHO, it could become harder to maintain as years go by, as you define more and more attributes. Eventually you won't be quite sure which medium might overwrite each other.

I try to keep as much in one medium (default) and then adjust only the things i really need (after some careful consideration) in the printOnly medium. Then i put it in freeze.

yes. Freeze the stylesheet.

I do this because, from my experience, I noticed as I kept tweaking the stylesheet I was creating and duplicating many attributes indiscriminately. line heights, spacing, paddings, margins, colour management became abit of a hunt and peck episode of finding which attribute change brought about changes to other classes or mediums - the cascading effect of style sheets.

Freezing the master stylehseet.
Use mediums and a single stylesheets carefully. Once its good enough to cover the basics for most projects, i stop there. What if a style you need isn't defined. As you work on new projects and reuse the stylesheet, you might need something more specific. Leaving the main stylesheet untouched, instead, i create a new stylesheet (a fairly empty one, no more than 3 classes) then link it to the old one. That's all. It caters to the new need, and it doesn't add complexity to the main stabilized stylesheet.
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Mediums vs. separate stylesheets for single sourcing

Post by Nita Beck »

Thank you, forfear, for that detailed argument and explanation. I found it very helpful!

Nita
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
evanarsdall
Propeller Head
Posts: 52
Joined: Thu Nov 09, 2006 5:38 am

Re: Mediums vs. separate stylesheets for single sourcing

Post by evanarsdall »

Hi, Nita! I hope all is well with you.

I have always used only style sheet media. I have never used separate style sheets. If a Flare author prefers a separate style sheet, I support that author. Whatever works is what's important.

Like forfear, I use mainly the Default and Print media. I set up my main styles using an online paradigm, and I create variations and custom styles for printed output. This is the approach that I recommend when I teach MadCap's Flare classes. I see no reason to add unnecessary complication to style sheet development, but that's simply my preference and my recommendation.

One blogger claims that if you use the default Print medium with H1 set to have a page-break-before property, your users will get an empty page when they print a topic from WebHelp or HTML Help. I never have that issue. My H1 styles show "not set" in the Default medium and "page-break-before" under print. My topics print exactly as they should in both WebHelp and in .chm files.

That's my two cents.
Eddie
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Mediums vs. separate stylesheets for single sourcing

Post by Nita Beck »

Hi Eddie! Nice to "see" you here.

Thanks very much for adding to this discussion. I've found it educational to learn how others are using mediums vs. separate stylesheets. Although for now, for the work for this one client, having the separate sheets makes perfect sense. But I can easily see that, for another of my clients, using mediums will make perfect sense.

Here's an extension of the my original question:

Say I've got a project for which I'm creating only WebHelp. If that project's stylesheet has a print medium defined for some or all of the styles, will that drive how a WebHelp topic will be rendered when the user prints it?

Nita
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mediums vs. separate stylesheets for single sourcing

Post by LTinker68 »

Nita Beck wrote:Say I've got a project for which I'm creating only WebHelp. If that project's stylesheet has a print medium defined for some or all of the styles, will that drive how a WebHelp topic will be rendered when the user prints it?
Yes. When the user selects the option to print, the page will look in the print medium for how a style should appear, and if it doesn't find it there, will look in the main (default) section of the stylesheet.

That situation is actually the original purpose of the print medium in stylesheets. Flare is just extending its use to single-file print output of the entire project, or at least those topics listed in the TOC.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Mediums vs. separate stylesheets for single sourcing

Post by Nita Beck »

Thanks, Lisa, for confirming what I thought was the case ...

... and this is exactly why I DON'T use mediums when I'm single-sourcing WebHelp and PDF. I want topics printed from the WebHelp to look exactly as they appear on-screen, while my PDF output looks very distinct from the WebHelp: different fonts, colors, table treatments, etc. I don't think of WebHelp rendered on-screen vs. on paper as single-sourcing. They are still one and the same target. But if we're talking about single-sourcing to different targets -- especially those with radically different formatting of the same content -- then a case can be made for not using mediums but instead using separate style sheets.

I can't tell you all how much I've enjoyed this discussion. I find delight in how creative we all are in our use of Flare.

Nita
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: Mediums vs. separate stylesheets for single sourcing

Post by bonnie »

One blogger claims that if you use the default Print medium with H1 set to have a page-break-before property, your users will get an empty page when they print a topic from WebHelp or HTML Help. I never have that issue. My H1 styles show "not set" in the Default medium and "page-break-before" under print.
I've also been using one style sheet with the Default medium for WebHelp and the Print medium for my printed PDF. But now reading through this very helpful thread I understand that the Print medium was originally meant for the printed WebHelp.

I AM having the problem reported by the aforementioned blogger of ending up with an empty page in the printed WebHelp if the heading used on the top of the page has a page-break-before specified for the Print medium, even though the setting is "not set" for the Default medium. The only thing on the first page is the breadcrumbs line.

I really don't want to go to two separate stylesheets, so I think I will try forfear's method of using a printOnly medium for printed documents, and leave the print medium without any page-break-before properties for headings.

Before I do, however, I have the following question for forfear:
Could you please elaborate a bit further on what you mean by the following:
Note: this method breaks the Flare Print Format for single-sourcing images since it's reliant reliant on the assumption that my Flare Print Format is specified in the medium print.
I'd greatly appreciate it.
Bonnie G.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: Mediums vs. separate stylesheets for single sourcing

Post by bonnie »

One blogger claims that if you use the default Print medium with H1 set to have a page-break-before property, your users will get an empty page when they print a topic from WebHelp or HTML Help. I never have that issue. My H1 styles show "not set" in the Default medium and "page-break-before" under print.
Here's something I just realized:
When I print out Flare's help topics, I get an empty page with only the breadcrumbs line at the top for the first printed page. So it's not just the WebHelp target that I'm creating that manifests this behavior, but also the help pages created by MadCap as well.

(About Glossaries is the Flare help page that I just printed.)

Is this happening for anyone else? I'm just trying to figure out why I get the empty page problem, and others don't (except maybe the blogger who is mentioned above.)

Thanks,
Bonnie
evanarsdall
Propeller Head
Posts: 52
Joined: Thu Nov 09, 2006 5:38 am

Re: Mediums vs. separate stylesheets for single sourcing

Post by evanarsdall »

Bonnie, I'm getting the same result from Flare's help topics, too, but not from my own projects. It's bizarre.

I thought that maybe this was browser-specific, so I tested topics from three of my own projects in four different browsers. They all print perfectly, without splitting the page. They also show the correct fonts for my Print medium. And I swear that I have never used a custom print medium.

Have you asked MC Support about this?
Eddie
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: Mediums vs. separate stylesheets for single sourcing

Post by bonnie »

When I print out Flare's help topics, I get an empty page with only the breadcrumbs line at the top for the first printed page. So it's not just the WebHelp target that I'm creating that manifests this behavior, but also the help pages created by MadCap as well.
Eddie,
I have not yet reported this to MC Support, but now that you've confirmed what I've noticed, I will. Like you say, this is bizarre, and I'd like to get it figured out.
Thanks for responding!
Bonnie
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Mediums vs. separate stylesheets for single sourcing

Post by NorthEast »

bonnie, evanarsdall -

You're getting this problem because when you print out a topic from WebHelp or HTML Help, it will apply any styles set for the print medium.

(There are a number of standard media names - e.g. print, screen, speech - and the browser is applying anything in the print media when you print the topic.)

What I'd suggest is opening the stylesheet in a text editor and change the name of the print medium (the line @media print) to a different name, e.g. printOnly (as forfear suggested). Then set your 'real' print target to use the printOnly medium. That means these styles will be used by your print target, but not when you print the topic from your Web/HTML help.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: Mediums vs. separate stylesheets for single sourcing

Post by bonnie »

Dave,

Thank you for making the solution to this problem totally clear and explaining the easy way to create and apply a different medium name to my printed output.

I greatly appreciate your response.

Bonnie
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Re: Mediums vs. separate stylesheets for single sourcing

Post by bobmoon »

Dave Lee wrote:What I'd suggest is opening the stylesheet in a text editor and change the name of the print medium (the line @media print) to a different name, e.g. printOnly (as forfear suggested). Then set your 'real' print target to use the printOnly medium. That means these styles will be used by your print target, but not when you print the topic from your Web/HTML help.
For the record, I tried this fix and got confused. I opened my stylesheet and changed:

@media print
to
@media printOnly

But when I went to change the settings for my PDF Target, the printOnly option wasn't listed. In the Target properties on the Advanced tab, the Stylesheet medium field still only listed (default), print, and non-print.

I tried a bunch of things to make that medium show up in the target field to no avail. Finally, I went back into the stylesheet and added this to the end....

@media print {}

... and that fixed it. Apparently, Flare got confused when the print medium disappeared all together. So if you change print to printOnly, you must put a print medium back in there.

Bob
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Mediums vs. separate stylesheets for single sourcing

Post by Nita Beck »

This thread continues to fascinate me, which is why I posted the topic in the first place. I am left concluding that I'll stick with my approach of using separate stylesheets rather than mediums for my print and online outputs. That way, I won't get all balled up in the tangle of the different mediums. :wink:

Nita
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Re: Mediums vs. separate stylesheets for single sourcing

Post by bobmoon »

Nita Beck wrote:That way, I won't get all balled up in the tangle of the different mediums. :wink:
So, you're just going to sit on the sidelines with your tidy little separate stylesheets and watch the rest of us wallow around in it? :-D

I'm so stuck in the muck I started a new thread to see if I can entice any of the smart people here to summarize the "best" way to do it (or at least a few solid options). :wink:

Bob
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Mediums vs. separate stylesheets for single sourcing

Post by Nita Beck »

So, you're just going to sit on the sidelines with your tidy little separate stylesheets and watch the rest of us wallow around in it?
Yep! :lol:

Of course, that's not my main reason for not using mediums; as I wrote in my initial post, I like the idea of keeping my stylesheets "portable," not just tidy.

...and thanks for the link to your other post. I'll go see what's happenin' there.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply