Style classes in stylesheet are not visible in style window

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
hranga81
Propeller Head
Posts: 35
Joined: Tue Mar 20, 2012 11:17 pm

Style classes in stylesheet are not visible in style window

Post by hranga81 »

Hi,
I have few paragraph tags in the style sheet, but that is not visible in the style window.
Any inputs? I can see it in Style sheet editor, but it is not appearing in the style window panel.

I have a deliverable tomorrow. Any quick solution will help me finish it soon.

Thanks
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Style classes in stylesheet are not visible in style window

Post by kwag_myers »

This topic has come up a few times. I really can't say what the criteria is for the styles that display in the Styles window or menu, other than if I need it it's not there. Since you're coming up on a deadline, my suggestion is to go old school. Open the Text Editor for the topic (for Flare 8, it's the last button on the right in the topic toolbar) and manually type in the desired style class for each <p> tag.

Whether you do this on the fly or after the topic is completed is up to you.

Ideally, I think you'd have to delete all styles not in use in order to limit the options and increase the probability of your desired styles displaying. Again, I really don't understand how Flare decides what styles to display. It seems fairly random to me.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Style classes in stylesheet are not visible in style window

Post by LTinker68 »

Another possibility is that you or someone else might have "disabled" the styles, which prevents them from being visible in the styles lists.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
hranga81
Propeller Head
Posts: 35
Joined: Tue Mar 20, 2012 11:17 pm

Re: Style classes in stylesheet are not visible in style window

Post by hranga81 »

Oh..How do we enable it?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Style classes in stylesheet are not visible in style window

Post by LTinker68 »

Open the stylesheet in the Stylesheet Editor then click the Options drop-down field along the top of the Stylesheet Editor screen and click Disable Styles to bring up the screen of the same name. If there are any styles shown on the left side, select them then move them back to the right to re-enable them.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: Style classes in stylesheet are not visible in style window

Post by rob hollinger »

If you added the classes under the Print medium and are viewing the topic in a different medium (Default), they will not show up in the style drop down.

Open a topic and open the styles window (F12).
Switch the mediums in the Topic editor
Do they show up in the styles window with a specific medium?

Best Practice is to always add classes to the default medium in the stylesheet editor.
Then edit the styles based on the medium needed for the target.
Rob Hollinger
MadCap Software
hranga81
Propeller Head
Posts: 35
Joined: Tue Mar 20, 2012 11:17 pm

Re: Style classes in stylesheet are not visible in style window

Post by hranga81 »

Hi Lisa and Rob,
Thanks for your suggestions! I checked the disable styles, all were enabled. And, switching mediums too doesn't have any change. Any other suggestions?

Thanks,
Harini
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Style classes in stylesheet are not visible in style window

Post by kwag_myers »

Harini, correct me if I'm wrong, but as I've stated in my first post, there seems to be no rhyme or reason as to what styles are displayed in the Styles window or menu. Here are my <p> tag styles:
cssStyles.png
Here is my Styles menu with my cursor in a new paragraph:
menuStyles.png
I should also mention there are no p.* styles (p.bullet, p.Concept, etc.) as with <span> and <div>, only the top level <p>. I don't understand why all my paragraph styles are not listed, and haven't been able to find a way to make this happen. This is why I have had to abandon the UI and manually type in my paragraph classes in the text editor.

I think it would be helpful to understand how Flare determines what styles to display.
You do not have the required permissions to view the files attached to this post.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Style classes in stylesheet are not visible in style window

Post by LTinker68 »

Your second screenshot is showing generic classes. Generic classes can be used, by definition, with any tag, so no matter which type of tag you're in, you should see that list of generic classes. Your screenshot doesn't show if there's a scrollbar on the right of the Styles pane or list, but there should be, so if you scroll down, you should start seeing paragraph, heading, and span styles (if you're in a paragraph or heading tag), or list styles if you're in a list tag, etc.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Style classes in stylesheet are not visible in style window

Post by kwag_myers »

Thanks, but the only paragraph style on the menu is p. There is no .bullet or p.bullet, etc.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Style classes in stylesheet are not visible in style window

Post by LTinker68 »

If you open the stylesheet file in the Internal Text Editor, can you find the styles then?

Also, do you have more than one stylesheet in the project? If so, is the stylesheet you're looking in the one that's 1) referenced in the target, and 2) is that target set as the primary target? If the primary target is a different target that's pointing to a different stylesheet, then you'd see the styles in that stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
hranga81
Propeller Head
Posts: 35
Joined: Tue Mar 20, 2012 11:17 pm

Re: Style classes in stylesheet are not visible in style window

Post by hranga81 »

Hi,
I made my target as Primary Target. Yet it is not showing up. I am attaching screenshots of Style sheet Editor and Style Sheet Window for your reference.

Style Sheet Editor
StylesheetEditor.png
Style Sheet Window
StylesheetWindow.png
Note that the stylesheet classes are missing in the Style sheet window. P.noteclass, p.example were all created by me. The only difference is that the numlist classes (that are highlighted) were created recently.
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Style classes in stylesheet are not visible in style window

Post by LTinker68 »

Huh. You might need to send the project to MadCap Support to see if they can figure out what's happening. Based on the screenshots, the cursor appears to be in a heading tag (<h1>), which should list all paragraph classes (except MadCap-related features, like the mini-TOC), unless one of the previous instances is happening (e.g., the class had been created under the print medium but the primary target is an online target). The only other thing I can think of is to make sure the XML Editor is set to show both online output and default medium, or print output with print medium. I guess I never paid attention to how those settings affected the Styles drop-down or Styles pane, but that's the only other possibility I can think of, if it's not one of the previously mentioned possibilities.

But like I said, it might be easier to send it to MadCap Support since they can look at the whole project.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
hranga81
Propeller Head
Posts: 35
Joined: Tue Mar 20, 2012 11:17 pm

Re: Style classes in stylesheet are not visible in style window

Post by hranga81 »

Hi Lisa,
I found out a solution. Those style classes that were visible in the Style sheet editor as well as in the internal editor (but not in style window), in actual were not present in the project. I positioned the cursor on the style that was not visible and tried to edit the style. It gave me a message saying that the "style is not present. Do you want to create it?". All this while, I was wondering why it wasn't showing up in the style window. The Style sheet editor and the internal editor were wrongly showing the styles when the style itself wasn't there.

Maybe, you could try and make it not appear when it is not present in the project.

My work got more easier after i created those styles back!

I have one more query:
I have a master project which has contents from 2 projects. Both the projects use different styles. Hence the formatting is corrupted. Now, if i link those style sheets only in the master project, will the formatting error resolve?; since proj A using Style A will get their styles, similarly Proj B using Style B will get theirs.

I am going to try it anyways, just wanted to know if it is the right approach.

Thanks,
Harini
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Style classes in stylesheet are not visible in style window

Post by LTinker68 »

hranga81 wrote:I have a master project which has contents from 2 projects. Both the projects use different styles. Hence the formatting is corrupted. Now, if i link those style sheets only in the master project, will the formatting error resolve?; since proj A using Style A will get their styles, similarly Proj B using Style B will get theirs.
I've never used the project linking, so I can't answer, but hopefully someone else who's worked with it will step in with an answer.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
CatVancouver
Propeller Head
Posts: 13
Joined: Wed Oct 26, 2011 1:20 pm

Re: Style classes in stylesheet are not visible in style window

Post by CatVancouver »

Thanks Lisa for the tip about making certain that the Primary target is using the SAME stylesheet as the document I'm working on! I've been wondering why sometimes the Styles editor works and sometimes it doesn't. So, thanks. Sorry it didn't fix everyone's problem, but it is a little known fact that fixed 1 of mine.
Catherine
Ineffable
Sr. Propeller Head
Posts: 148
Joined: Mon Jan 15, 2007 3:08 pm
Location: Bay Area, CA

Re: Style classes in stylesheet are not visible in style window

Post by Ineffable »

I am having a style display issue as well.

I am running Flare 8.1.2.

I've tried adding the style by handcoding it into the style sheet. It shows in the Style dropdown under the Home menu item. However, none of the formatting the style contains is applied to my content.

When I select content that's had the style applied, it shows up in the Styles window, under Current Style and Local Formatting. Yet, when I click Edit Style, I get a dialog saying that Flare "Can't find a previously defined CSS style for the element. Would you like to create a new style?" I click Yes to create a new style. The Create Style dialog is displayed. I click OK, then another dialog appears: "Do you want to redefine the existing style p.newsitem?". I click Yes and the new style is seemingly created. However, none of its formatting features are applied to the content, as if it never properly registered.

I go back to Edit Style...and the entire process repeats itself, as described above. It's like The Walking Dead, a bunch of "zombie" styles that exist, yet don't exist. I am in my default medium, and I've confirmed that all my styles are enabled (as shown in the Options > Disable Styles... feature).

Thanks for your help.

UPDATE: I opened the topic in which I was trying to use the new style in the text editor. I used a similar style that I know works and compared it against the style that wasn't displaying.

Here is the legacy code that works fine:

Code: Select all

<p class="note" MadCap:autonum="<b>Note:  </b> ">
Here is the code that wasn't displaying properly, either in the topic or style sheet editor:

Code: Select all

<p class="newsitem">
I copied the

Code: Select all

MadCap:autonum="<b>Note:  </b> "
portion from the legacy code into my new style, giving me this:

Code: Select all

<p class="newsitem" MadCap:autonum="<b>New Feature:  </b> ">
And then it worked. I hit refresh and it displayed in the Style Sheet window, too.
MarkMetcalfe
Propeller Head
Posts: 25
Joined: Thu Jun 24, 2010 11:57 am
Location: Nashua, NH
Contact:

Re: Style classes in stylesheet are not visible in style window

Post by MarkMetcalfe »

I placed my cursor on a <p> tag, and went to my Style drop-down chooser to choose H1.
In some places, my H1 showed in the list of elements, but when I placed my cursor on another <p> tag in another place in my file, the H1 did not show.

The reason, I discovered, was that when H1 did show, the <p> tag was at the highest level (unnested). When H1 did not show, the <p> was embedded in a drop-down set. I surmised that inside a drop-down set, I am allowed a subset of tags from which to choose (though I am uncertain as to why).

I am able to get around this nuisance in two ways:

1. Unbind the drop-down, tag the element, and then rebind the drop-down. (Too many steps)
2. Open the Text Editor and change the <p> </p> pair to <h1> </h1>. (preferred method)

Maybe I can get a technical explanation for why I cannot use the styles to change a <p> to and <h1> when I am in a drop-down element.
Mark Metcalfe
Optimizely
542 Amherst St.
Nashua, NH 03063
mark.metcalfe@optimizely.com
FrankyT
Propeller Head
Posts: 56
Joined: Wed Apr 04, 2012 3:45 am
Location: United Kingdom

Re: Style classes in stylesheet are not visible in style win

Post by FrankyT »

It's possible that you've accidentally "pinned" a style. If you click in the right of a style box in the Styles panel, the style jumps up to the top of the list (below "reset class"). Pinned styles appear to be sorted alphabetically above other styles, so it is easy to think they've disappeared if you're looking for them in their old place.

To unpin a style, click the vertical "pin" icon in the right of its box.
aneedell
Propeller Head
Posts: 40
Joined: Tue Jun 19, 2012 10:33 am

Re: Style classes in stylesheet are not visible in style win

Post by aneedell »

There is another possible cause. We have encountered this a few times and the problem was that the writer had submitted his or her Users folder to Perforce, but had not checked it out. Therefore, Flare could not access files such as PinnedStyles.xml. Checking out those Users files resolved the problem. Our stated best practice is to never check in files in the Users folder, but it happens.
Post Reply