Numbered lists show unexpected font. Plz assist....

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
keuler
Propeller Head
Posts: 63
Joined: Sun Sep 20, 2009 2:54 pm

Numbered lists show unexpected font. Plz assist....

Post by keuler »

Experts-

I have a Flare project where most fonts are in a sans serif font (I'm using Calibri). However, I'm finding that while the font appears OK (like Calibri) in Flare's UI editor, when I build and view the HTML5 output, those numbered steps are in some serifed font Something seems to be overriding the font in numbered lists.

If it helps, here's the p class for the first item in a top level list...

Code: Select all

<p class="List1_NumFirst" MadCap:autonum="1.">
Thanks in advance!

-Kurt
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Numbered lists show unexpected font. Plz assist....

Post by SteveS »

Have you (or anyone else) played with media in the stylesheet? If so, the stylesheet editor might not be set to default and you are setting the calibri font for a specific media... Its a bit of a Flare gotcha that's got me in the past.

I'd be tempted to open the stylesheet using a text editor and look to see if there is something strange going on. It sounds as if something 'lower' in the cascade level is changing the font. Failing that, check the text to see if something is being added inline, although from your sample that is unlikely.

HTH
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
keuler
Propeller Head
Posts: 63
Joined: Sun Sep 20, 2009 2:54 pm

Re: Numbered lists show unexpected font. Plz assist....

Post by keuler »

Actually, I'm pretty sure this is a bug, so I filed one (Case 79366).

ISSUE: When an auto-numbered paragraph is configured so that the position of the numbering is Outside Head or Outside Tail, then the font settings for the paragraph don't supersede the settings specified for the topic (html) style in the HTML output. (It is superseded in the XML Editor, just not in the built HTML output (eg HTML5). Here's how I described the bug...

... do this:

1) Ensure the topic (html) tag has a font attribute set, let's say its set to a serif font (or Times New Roman), and red.
2) Configure a paragraph style for some type of auto-numbering, with the position field set to Outside Head.
3) Set some font attributes for this paragraph style to be something different from what was set for the topic tag.
4) Back in the XML editor, apply the new paragraph style to a paragraph. Observe how the paragraph appears with the font characteristics set for the paragraph style (as expected).
4) Build the project to an HTML5 target (or even just do a preview for the one topic).
5) Observe that the font characterstics for the paragraph in the HTML output do NOT match those observed in the XML editor, but instead match the settings set for the topic style.

Note that if you leave the topic style at the default (eg, a blank font), then a serifed font is assumed. But even this assumed font takes precedence over auto-numbered, outside-positioned paragraphs.
Johanna
Propeller Head
Posts: 25
Joined: Wed Feb 25, 2015 3:08 am

Re: Numbered lists show unexpected font. Plz assist....

Post by Johanna »

Any news on this subject? I think I experience the same problem when using outside-head for the auto-number-position in a h1 heading class. If I use the definition as copied below for the default medium in the .css, the xml editor shows it correctly but when I make the HTML5 preview or build the output, it shows the chapter title in the font size 12 that I defined for the body.

If I remove mc-auto-number-position: outside-head the preview and the output will show both the same: font size 30 pts. But of course then I loose the advantage of defining the chapter number outside of head.

I found a workaround but not sure to understand the logic behind the workaround: if I add in the css for the media non-print a font size of 30 pts, it will apply it correctly. Very strange! I thought that if h1.ChapterTitle would not be present in the non-print media for the HTML5 output, it would look in the default definition of css..... :roll:

h1.ChapterTitle
{
text-align: left;
margin-left: 5.1cm;
margin-right: 0cm;
margin-top: 0pt;
margin-bottom: 180pt;
font-weight: normal;
font-style: italic;
mc-hyphenate: never;
mc-auto-number-position: outside-head;
line-height: 45pt;
text-decoration: none;
mc-auto-number-format: 'GH:CHAPTER {n+}.';
mc-auto-number-offset: 250px;
font-size: 30pt;
}
devjoe
Sr. Propeller Head
Posts: 342
Joined: Thu Jan 23, 2014 1:43 pm

Re: Numbered lists show unexpected font. Plz assist....

Post by devjoe »

When you define a style using autonumbers and the position is "outside" anything, the number goes into a <span> tag, which is in some suitable container element outside the paragraph. You can choose a Span Class when you define the autonumbered style, and Flare will assign that class (style) to the span tag. Separately define this style for the span element in your style sheet and you can set up the number with any formatting you want.
Post Reply