H0 style causes problems

This forum is for all Flare issues related to styles, stylesheets and XML.

H0 style causes problems

Postby siskamoens on Mon May 26, 2008 7:50 am

Since I had to provide an additional level of headers above my existing H1-H4 levels, I decided to create a new style called H0. But when I wanted to apply that style to a heading paragraph, it wasn't available for selection in the Style dropdown.
Even more: when I applied the style by modifying the html tags in the internal text editor and opened the topic in the Flare editor afterwards, the paragraph had no "H0" block on the left (it only showed "body"), but apparently the style was applied as a span style.
Is this a bug or did I do something wrong when creating the style? I just copied my existing H1 style and only modified what was necessary.
Any ideas?
---------------------------------------------------------------------
h0
{
mc-auto-number-offset: 0px;
margin-bottom: 20px;
margin-top: 10px;
font-size: 200%;
font-weight: bold;
font-family: Arial, Verdana, Helvetica, sans-serif;
color: #83b819;
clear: both;
}

h1
{
mc-auto-number-offset: 0px;
margin-bottom: 20px;
margin-top: 10px;
font-size: 200%;
font-weight: bold;
font-family: Arial, Verdana, Helvetica, sans-serif;
color: #83b819;
clear: both;
}
(in @media print:)
h0
{
mc-auto-number-position: outside-head;
mc-heading-level: 1;
color: #83b819;
display: block;
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 300%;
mc-auto-number-format: 'GH:{n+}.{ =0}{ =0} ';
page-break-after: avoid;
page-break-before: always;
page-break-inside: avoid;
}

h1
{
mc-auto-number-offset: -10px;
mc-auto-number-position: outside-head;
page-break-after: avoid;
color: #83b819;
display: block;
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 200%;
mc-heading-level: 2;
mc-auto-number-format: 'GH:{n}.{n+}.{ =0} ';
}
siskamoens
Propeller Head
 
Posts: 85
Joined: Wed Mar 21, 2007 3:01 am
Location: Belgium

Re: H0 style causes problems

Postby RamonS on Mon May 26, 2008 9:32 am

Here is a wild guess: CSS does not allow for a heading style to be called H0? You could just add H5 and style it accordingly, but that probably will screw up sequences that feed off the heading level.
Leaving online help aside entirely, selecting the amount of heading levels is an important step before starting to create content for any type of documentation. The reason for that is exactly those problems that you have. I typically create an outline with four levels first and then refine that. In one case I had a need for a fifth level and it was easy to adjust to that. Since that chance passed already, my recommendation would be to make a copy of your entire project, then change the CSS so that the current H1-H4 get renamed to H2-H5. Then use a project wide find and replace in the sources to swap first H4 to H5, then H3 to H4 and so on. After that you have only H2 - H5 in use and your help should look like it did before, but now you can use H1 as an additional top ranked heading style.
RamonS
Senior Propellus Maximus
 
Posts: 4291
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: H0 style causes problems

Postby KevinDAmery on Mon May 26, 2008 9:40 am

You can't define a new tag type--you can only add a class to an existing tag type. Since H0 doesn't exist in the XHTML specification, Flare wouldn't know what to do with it. Even if Flare did, it wouldn't be something that a browser or the CHM viewer could parse correctly.

What I would do instead is make a class from H1, then apply the changes to make it behave the way you want it to. Basically, it would appear in the stylesheet more or less as you have now, only instead of calling it H0 you would call it H1.HeadLevel1 (or something like that). (I say "more or less" because much of the style settings are the same between H0 and H1--since you would be making this a class of H1, there is no need to duplicate it. Only include the parameters that actually change, which appears to be the heading level and the autonumbering.)

EDIT: you could also just move down the heading levels as RamonS suggested--the one advantage to doing it with a class as I've suggested is you wouldn't have to reassign the styles for your existing content except for the ones that had to be H1.HeadLevel1.
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: H0 style causes problems

Postby siskamoens on Tue May 27, 2008 12:07 am

KevinDAmery wrote:What I would do instead is make a class from H1, then apply the changes to make it behave the way you want it to. Basically, it would appear in the stylesheet more or less as you have now, only instead of calling it H0 you would call it H1.HeadLevel1 (or something like that).


That was my first thought as well, but unfortunately that doesn't work for Word output (which I'm struggeling with right now), since Word strips the class and only sees the H1. And that causes the "H0" headers to be on the same level as the "real" H1 headers in Word output.

I think I'll go for the solution Ramon suggested, allthough that means tampering with my entire project...but I guess it's the best option.

Thanks for the suggestions!

Siska
siskamoens
Propeller Head
 
Posts: 85
Joined: Wed Mar 21, 2007 3:01 am
Location: Belgium


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 4 guests

cron