span style creates character style with unneeded/wrong info

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply

Do you think that this is a bug in Flare?

Yes, it is a bug
7
88%
No, it is not a bug
1
13%
I don't know or don't care
0
No votes
 
Total votes: 8

dgc
Jr. Propeller Head
Posts: 4
Joined: Thu Feb 02, 2006 12:53 pm
Location: Ottawa, Ontario, Canada

span style creates character style with unneeded/wrong info

Post by dgc »

I've reported this to Madcap, and was told it wasn't a bug, so I've left to my own devices to find a workaround. I'd like to describe my workaround (simple but tedious) and ask if anyone has a less tedious one.

I have created a span style that I apply to more than one paragraph style. For example, my paragraph styles might be p.body (which has a font-size of 10 pt) and p.copyright (which has a font size of 8 pt). My character style might be span.highlight, which has no font-size associated with it.

When I create Word output, I find that the character style span_highlight has been created, and that it has inherited the point-size of the first paragraph style that contains it--let's say that was p.body, so that would be 10pt. Well, when span_highlight appears in the middle of p.copyright, not only is the text highlight, but it appears 2pt bigger than the rest of the text, which is not what I wanted. So I modify the character style in Word so that it no longer has a reference to point size, and everything is fixed.

Simple, but tedious when you have a lot of styles and/or a lot of instances of that style (Flare sometimes but not regularly creates span_highlight_1 and span_highlight_2). Does anyone have a more elegant solution?
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Post by RamonS »

Anything that generates a negative impact in user experience is a bug! That is not just me writing it, that is consensus across the literature. The styles are clearly defined and shouldn't take on a life of their own.
The question here is if this is Word's doing or not. Word is known for wildly applying styles just because it thinks that is what I want. Just yesterday I wanted to have just one line to be normal font + bold + 6pt after. Word constantly slapped the H3 style on it, which makes that line to show up in the TOC. That is not what I want. Word is broken in that area in at least all versions up to 2k3. I wonder if they finally fixed it in Office 2007.
The other question is, is wrapping the span tag around paragraphs and having it automagically combine the styles allowed following the CSS2 specs? Does it show correctly when you build WebHelp?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Post by doc_guy »

Like Ramon, I agree that this is a bug, but agree that the question is \"is it a Flare bug, or is it a Word bug.\"

Regardless, I don't think it is the expected behavior.

I'll keep thinking about a work around. Maybe a CSS guru will know more.
Paul Pehrson
My Blog

Image
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Post by RamonS »

One workaround would be to produce more styles, but is that really needed?
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re:

Post by KevinDAmery »

RamonS wrote:Word is broken in that area in at least all versions up to 2k3. I wonder if they finally fixed it in Office 2007.
M$ only fixes bugs when it helps them grow market share. The rest of the time they spend on "features" like GUIs with glass 3D effects.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: span style creates character style with unneeded/wrong i

Post by LTinker68 »

dgc wrote:Does anyone have a more elegant solution?
Just to clarify, in your stylesheet, is the style written as span.highlight or just .highlight? And are you applying it to the entire paragraph or just a few words within a paragraph?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
dgc
Jr. Propeller Head
Posts: 4
Joined: Thu Feb 02, 2006 12:53 pm
Location: Ottawa, Ontario, Canada

Re: span style creates character style with unneeded/wrong i

Post by dgc »

LTinker68 wrote:Just to clarify, in your stylesheet, is the style written as span.highlight or just .highlight? And are you applying it to the entire paragraph or just a few words within a paragraph?
The style is written as span.highlight (or would be, if that precise example existed).

I have several span. styles, and they are applied to a few words, single word, short phrase, etc.

I think this may be related at least in part to behaviour by Flare that MadCap claims is not a bug (and here, I have a little more sympathy for their point of view):

Flare is deliberately designed to combine any styles with identical definitions when creating Word output. (So creating more styles is not a good solution, RamonS.) That is, if I have span.uicontrol and span.uiwindowtitle both defined as bold, then in Word, just the first defined style will exist.

I'm oversimplifying like mad, but the general idea is that Flare deliberately reduces what is sees as redundancy in the number of styles. I therefore have my suspicions that the behaviour of Flare of introducing unwanted attributes is Flare's issue, not Word's. And I would much rather be blaming Word... for pretty much anything.

I guess I'll stick with my simple-but-tedious workaround until I hear something brilliant.
dgc
Jr. Propeller Head
Posts: 4
Joined: Thu Feb 02, 2006 12:53 pm
Location: Ottawa, Ontario, Canada

Re: questions from RamonS

Post by dgc »

RamonS wrote:The other question is, is wrapping the span tag around paragraphs and having it automagically combine the styles allowed following the CSS2 specs? Does it show correctly when you build WebHelp?
I don't really know what the first question means. Sorry! I don't think I am wrapping the span tag around paragraphs. I'm using it within paragraphs.

As to your second question: Yes, everything displays correctly and is tagged correctly when I build WebHelp.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Post by LTinker68 »

Ok, I tested it and confirmed that I can reproduce it. That is, if I create two span classes OR generic classes and give them the exact same attributes, then only one of them appears in Word output. However, if I change just one attribute of one of the classes (say, make the font red), then both styles will output to Word correctly.

But to be fair to MadCap, they're probably doing you a favor. You're not supposed to have identical styles in a stylesheet. First of all, why duplicate the work when the first style is sufficient? Second of all, although duplicating one style won't have that much affect, duplicating numerous styles unnecessarily bloats the stylesheet which means more styles to load for each page which could theoretically slow down the pages from loading. So it's better to have a streamlined stylesheet. Granted, those reasons apply more to WebHelp output than Word, but it's the same principle.


And by the way, Word does the same thing, but generally not when you want it to. For instance, say you have a TOC set to go down four heading levels, and the fourth heading level is the same size as the Normal font and bold and underlined. And say you want to bold and underline a line of text but you don't want it to appear in the TOC, so you don't apply the Heading 4 to that paragraph. Unfortunately, that doesn't matter -- because that inline style exactly matches a heading style, Word will automatically convert the paragraph to Heading 4, unless you catch it and switch it back.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Paul Griffiths
Sr. Propeller Head
Posts: 261
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Duplicate styles quashed in Word

Post by Paul Griffiths »

LTinker68 wrote:But to be fair to MadCap, they're probably doing you a favor.
I reported this, assuming it to be a bug, but Support blames Word, not Flare. (I still think it's a bug.)
Post Reply