3 Replies Latest reply on Mar 14, 2012 1:23 AM by Willam van Weelden

    Cannot define style for following paragraph


      I am trying to clean up the behavior the styles in a template I am creating and this has become a universal problem. I will give a specific example to illustrate. I am trying to create styles for a glossary and I want to create two paragraph styles:





      In the edit styles dialogue box for glossary_entry, I want to set Style: / (Style for following paragraph) with the glossary_definition paragraph style. This would mean that after you choose glossary_entry and hit enter, it automatically brings up the glossary_definition style on the next line.


      However, when I choose any style that I have created, the style always reverts to the default RH Normal style. Actually, it will work if I choose other/any RH default styles (ex. Heading 1), but never if I choose a paragraph style I created.


      You can also choose No Change and it will just repeat the style in question. But this is annoying, as there are many styles I have created that I do not want to repeat. For example, I have a warning element, but I don't want it to keep creating warning elements with every carrriage return. Instead, I want it to return to the standard paragraph style I created.


      Not being able to choose paragraph styles makes no sense to me, especially since all the paragraph styles I created appear as options in the Style: / (Style for following paragraph) drop down box.


      Can someone please tell me if this is a glitch or what I can do to fix this issue?


      Thanks in advance,



        • 1. Re: Cannot define style for following paragraph



          You should be able to fix this with a minor modification to your CSS file. If you add the x-next-class parameter to the glossary_definition section, the next paragraph should pick up the style you define.


          The CSS entries for your pararaph styles should probably look something like this:


          p.glossary_definition {

              font-family: <font>;

              font-size: <size>;

              x-next-class: glossary_entry;


          p.glossary_entry {

              font-family: <font>;

              font-size: <size>;


          1 person found this helpful
          • 2. Re: Cannot define style for following paragraph
            Douglas_Campbell Level 1

            Thought I should follow up to share the root cause of this problem, at least in my case. Apparently RH does not like symbols and characters other than the basic alphanumeric variety. I had prepended all my styles with "!" to get them to appear at the top of the styles list and not mix them in with the RH default styles. I had also used underscore symbols between multiple words in the style name. For some reason, the error message that lead me to discover this did not appear until I tried forcing the style with FirstScript's CSS hack:


            A style name cannot contain spaces and cannot begin with a digit. Also a style name containing anything but the letters and a-z and digits will not work in browsers other than IE.


            I was aware that there couldn't be any spaces, but thought that the underscores were an acceptable work around. I don't think these limitaiton are fully detailed in the RH documentation.

            • 3. Re: Cannot define style for following paragraph
              Willam van Weelden Adobe Community Professional & MVP



              This is a limitation of the HTML standard, not a limitation of RoboHelp. Multiple classnames are seperated by spaces, but underscores are allowed. The limitations are as follows:

              • Letters, numbers, underscores and hyphens are allowed in style names.
              • You must start a class name with a letter, an underscore or a hyphen.
              • Class names are case sensitive.