Style Updates: Import Style or Update Stylesheet Editor?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
garlindj59
Jr. Propeller Head
Posts: 6
Joined: Thu Oct 12, 2017 8:19 am

Style Updates: Import Style or Update Stylesheet Editor?

Post by garlindj59 »

Some background: I have been using Flare almost daily for a year now, and have 3+ years experience with Word, RoboHelp, and Framemaker. I have recently been tasked to update our styles in Flare to match our current branding (specific page set up, font sizing and color, bullet styles and indentation, etc.). Our desire is to incorporate the same styles for both online Help and the PDF. Our current Flare embedded PDF has a fully functioning TOC, cover page, and 10 chapters filled with good content, but the heading styles and auto-numbering are a HOT mess. :roll: For now, we decided to strip the wonky auto-numbering from the headings until after we straighten out the heading styles.

The challenge: Our style sheets and project has been through several iterations by various MadCap users, making it difficult to go back to our style origins and trace how it got to its current state in the first place. It looks like a separate Print style sheet was previously imported from Robohelp (span.xx), which I cannot seem to find anywhere. If possible, we would like to apply one default style in the Master primary CSS for both the online Help and embedded PDF, and remove any current Conditions that separate the two (Online Only, Print Only).

My question: Would you advise that:

a) I update the current styles with our company's new style requirements in the primary css (Stylesheet Editor)? The one thing that puzzles me is how to set and edit indentations/tabs for various levels of bullet and numbered lists using the Stylesheet Editor and tag bar?
b) We purchase Framemaker. I would re-create the project in FM from scratch, and then import into a clean Flare project? As we know, Framemaker has a list of rules for that (such as no overrides), and I would still have to map the styles after import, etc. Correct? If we go this route, would the newly embedded PDF look exactly the same as the Framemaker PDF? Or should we attach the Framemaker PDF to our software build separate from Help outputs?
c) Any other advice or workarounds, or Flare Help resources (if possible, please specify guide and page numbers)

Thank you so much!!

Linda
garlindj59
Jr. Propeller Head
Posts: 6
Joined: Thu Oct 12, 2017 8:19 am

Re: Style Updates: Import Style or Update Stylesheet Editor?

Post by garlindj59 »

Follow Up:

I have identified two Master Style sheets in the Target Editor:

Primary.css for PDF (User Guide) target (print Medium)
CompanyX.css for Help target (default Medium)

this is probably not a bad thing, and looks like I can just change the styles from the stylesheet editor. So to start over with Framemaker might produce a nice PDF but be more hassle to import back into Flare for Help. Thoughts?

I should add that we also have role-based help (My Help--Sys Admin, Contractor, Reviewer, Officer, etc.), which in our case appears to be more work to maintain than is really worth to the user.
We are also talking about possibly getting rid of context sensitive help (map IDs, again, high maintenance for our developers), but then that would defeat the purpose of using online help, right?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Style Updates: Import Style or Update Stylesheet Editor?

Post by ChoccieMuffin »

Random brain-dump follows, as you've asked about several approaches.

A good resource for learning about CSS is http://www.w3schools.com. There are others, I'm sure other members will be able to suggest their favourites. That site does quite a few tutorials which are worth looking through if you find you have the time.

Firstly, I wouldn't bother going all around the houses by buying Frame and re-doing the entire project from scratch. Sounds like a very long-winded way of going about things and you wouldn't learn anything from the exercise.

You might NOT want to remove PrintOnly and OnlineOnly conditions from your project as they can be very useful in other instances that have nothing to do with styles (for example if you have a cross-ref in several help topics to another topic which in the PDF comes immediately afterwards, you might want the cross-ref in the help but not in the PDF output because it'd look silly, so you'd condition it as OnlineOnly.)

TRY THIS BIT FIRST. In your PDF target, change the stylesheet that it uses to use CompanyX.css, default medium, build the target and see what happens. You might find that it all works beautifully first time (but I very much doubt it). If ultimately you're trying to get both help and PDF to look the same this would be my first step.

(Personally, I don't use Flare's stylesheet editor AT ALL, so I can't advise on how to use it, or tips and tricks, so some of this reply might be way out of your comfort zone.)

Open your stylesheet in a text editor and sort the entries so that the styles are in some kind of sensible order (all headings together, all p styles together, all lists together, that kind of thing). I suspect that you've got things all over the shop as various people have been editing it over the years so this could take a while, but I have found it invaluable if I ever want to look at the stylesheet in Notepad rather than Flare's stylesheet editor. (The problem arises that whenever you add a new style using Flare's editor, it just dumps the info for the new style or class at the end of the text file. Not its fault, really, but does make it difficult to read after a while.)

You might find that you DO want things to be specified differently between default and print mediums. This is so that you can use relative measurements for your online output (like setting your font sizes or spacing after paragraphs as % or em) but absolute measurements for your PDFs (like using exact point sizes for fonts or an exact measurement for spacing after paragraphs). I'm sure I've seen a Madcap webinar that deals with this subject, so do take a look through the extensive list of recorded webinars and try to get a few of them under your belt, they're a terrific resource.

Sorry if I've made several rather vague suggestions rather than step-by-step instructions, but it's difficult to advise in more detail without being a bit more familiar with your project setup.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
garlindj59
Jr. Propeller Head
Posts: 6
Joined: Thu Oct 12, 2017 8:19 am

Re: Style Updates: Import Style or Update Stylesheet Editor?

Post by garlindj59 »

Thank you so much, all your tips are VERY helpful, and my team will also appreciate it! I am going to take a stab at some of your suggestions regarding the PDF Target. I've become intimately familiar with these properties (as well as the Stylesheet Editor), so it's really not that difficult. As you implied, it's a matter of trial and error, in baby steps. Just wanted to get advice from the forum before diving too deep into this massive effort.

I appreciate any other advice peers, experts, and gods in this forum may have to offer!

Linda
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: Style Updates: Import Style or Update Stylesheet Editor?

Post by devjoe »

What Choccie said is good advice.

When you are setting up a whole style sheet, trying to set 1000 properties via the style editor is a pain, and getting comfortable with the text of CSS is a good idea.

You will want to identify all the named styles as well as all the elements whose default styles are defined in your current style sheet. If possible, keep those names.

When I first brought stuff into Flare, we were importing content directly from RoboHelp HTML projects, from RoboHelp for Word that had never been converted (despite my advice as much as 10 years earlier to get out of RoboWord), and directly from Word documents. And even among these sources there were multiple different templates in use: in RoboHelp there was a stylesheet for things that had been converted from RoboHelp for Word and another stylesheet for newer projects natively created in RoboHelp HTML. Some projects imported from Word had another variation on the stylesheet, and some from FrameMaker had another. And then there were projects that were on older versions of these stylesheets. And some of the style names that came from Word or FrameMaker imports had never been cleaned up, and instead just defined in the stylesheet to look like some other style. By the time I collected all the styles, I had about 900 distinct style names for what were really only about 30 or 40 styles. So I didn't have the option to keep style names; I wrote code to convert every style name to one of the ones in the new style sheet I'd built for Flare (and clean up all the fake lists, and a bunch of other mess).

If your hot mess is limited to some autonumbered headings then you can probably keep the names. If there are a few places where you have multiple names for things, those can be defined as synonyms when you get around to doing the defining, for example:
p.note, p.pointout {
...
}
Or, if the alternate names are rarely used, you can search for them and replace them in your projects.

Start your new style sheet by making a copy of your help style sheet, and stripping out everything but the style names. Put the style definitions in a sensible order (this is a major thing you lose when you use a graphical CSS editor, the way styles build on one another). The BODY tag should come first, with definitions for overall margins and also a default font definition (font and size, probably nothing else), based on the new guidelines you have been given. Any otherwise unstyled text (such as text in tables or lists which is not inside a P tag) will inherit this definition. Follow this with a definition for the P tag, which may have the same default style. You can then define your lists and tables, your heading styles, and all the other named styles that are classes on the P or other tags. Try to define the minimum necessary in each style to modify the base definition of that style to make it look correct.

Set up a sampler. Make a topic, or a few if needed, with instances of all the styles used as they are intended to be used. If you have messed with the margins on styles, make sure you check what those look like before/after tables, lists, and headings as well as ordinary text styles. You can preview this or build a project with your sampler to check how things look in the output.

Finally, since you're trying to make the PDF look like the help, you can build both from the same stylesheet. Your print medium will inherit the settings from the default medium, but you'll want to redefine the margins on BODY and perhaps other changes in order to make things look good in the PDF while still maintaining the same style.
Post Reply