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.

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

span style creates character style with unneeded/wrong info

Postby dgc on Thu Jun 21, 2007 6:15 am

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?
dgc
Jr. Propeller Head
 
Posts: 4
Joined: Thu Feb 02, 2006 12:53 pm
Location: Ottawa, Ontario, Canada

Postby RamonS on Thu Jun 21, 2007 6:28 am

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?
RamonS
Senior Propellus Maximus
 
Posts: 4287
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Postby doc_guy on Thu Jun 21, 2007 9:52 am

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.
User avatar
doc_guy
Propellus Maximus
 
Posts: 1956
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West

Postby RamonS on Thu Jun 21, 2007 10:10 am

One workaround would be to produce more styles, but is that really needed?
RamonS
Senior Propellus Maximus
 
Posts: 4287
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re:

Postby KevinDAmery on Thu Jun 21, 2007 10:17 am

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
KevinDAmery
Propellus Maximus
 
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

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

Postby LTinker68 on Thu Jun 21, 2007 2:21 pm

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.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

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

Postby dgc on Mon Jun 25, 2007 7:01 am

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

Postby dgc on Mon Jun 25, 2007 7:05 am

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.
dgc
Jr. Propeller Head
 
Posts: 4
Joined: Thu Feb 02, 2006 12:53 pm
Location: Ottawa, Ontario, Canada

Postby LTinker68 on Tue Jun 26, 2007 1:03 pm

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.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Duplicate styles quashed in Word

Postby Paul Griffiths on Fri May 16, 2008 2:07 pm

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.)
Paul Griffiths
Sr. Propeller Head
 
Posts: 249
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK


Return to Printed Documentation Targets

Who is online

Users browsing this forum: Google [Bot] and 2 guests