12 Replies Latest reply on Oct 13, 2018 5:53 AM by Stefan Gentz [Adobe]

    RH 2019 | Formatting | Missing paragraph breaks

    isabelleg85447096 Level 1

      Hi Everyone,

      I'm having trouble reconciling my topics from Author View and Preview View.

       

      I want breaks between my paragraphs. In Author view I accomplished this by clicking enter twice and it looks correct, like this:

      The trouble is that in Preview View, RH is removing these breaks. It looks lite this:

       

      Why!?!  How can I fix this? Is there an element in the css that I haven't correctly specified?

       

      Yes, I have saved project. Yes, I tried a reboot.

      There are not yet enough resources available for me to trouble shoot this on my own and I really appreciate the community support.

       

      Thank you!

        • 1. Re: RH 2019 | Formatting | Missing paragraph breaks
          Peter Grainge Adobe Community Professional

          There was an issue with blank lines not showing in Preview but paragraphs have been OK in the beta testing and still are.

           

          Is the code correct? Is the correct style applied?

           


          See www.grainge.org for free RoboHelp and Authoring information.

           

           

          @petergrainge

          • 2. Re: RH 2019 | Formatting | Missing paragraph breaks
            isabelleg85447096 Level 1

            Hi Peter,

            I'm a content author and out of my league when it comes to code.  Here is what the code looks like:

            The line break should be where the arrow is indicating.

            I tried putting code in at line 17: </p>

            but RH rejected that as a pitiful coding attempt.

             

            I did have trouble setting up the css styles. Noticed in the webinar that there was some coding education required to create new styles. I wonder if there is one in the css file that I haven't configured properly. Been combing through the available Styles and I don't identify one that refers to the space between paragraphs.

             

            Thank  you

            • 3. Re: RH 2019 | Formatting | Missing paragraph breaks
              Peter Grainge Adobe Community Professional

              Try putting in the code below.

               

              <p>&#160;</p>

               

              Check only the above gets pasted in. You may need to type that in rather than paste it.

               

              The code for lines 17-20 has no content so you should be able to replace those lines with the above. If was just happening here that would solve the problem but even in this little code snippet, I see other instances of it.

               

              I believe it is a bug in 2019. Please follow this link to report bugs and request features. The more people who do so, the higher it gets prioritised.

               

              https://tracker.adobe.com

               

              Post the link to that bug/feature in this thread and others can vote for it.

               


              See www.grainge.org for free RoboHelp and Authoring information.

               

               

              @petergrainge

              • 4. Re: RH 2019 | Formatting | Missing paragraph breaks
                Stefan Gentz [Adobe] Adobe Employee (Admin)

                Hi,

                 

                what you have there is the following – "a little bit" simplified (with your line numbers added here at the beginning of each line):

                 

                15 <p style="margin-top: 0cm; margin-bottom: .35pt;"><span>Esta herramienta (…)</span></p>
                17 <p style="margin-top: 0cm; margin-bottom: .35pt;"></p>
                19 <p style="margin-top: 0cm; margin-bottom: .35pt;"></p>
                21 <p style="margin-top: 0cm; margin-bottom: .35pt;"><span>Acceda a este (…)</span></p>
                

                 

                This creates four paragraphs. Two of them are completely empty. All of them have "local style overrides" (through the "style" attribute").

                 

                These inline style definitions override what is defined in your stylesheet or just duplicate it unnecessarily (CSS):

                • Space above the paragraph is set to "0 cm" (margin-top: 0 cm)
                • Space below a paragraph to .35 Point (margin-bottom: .35 pt).

                 

                So, there is practically no space above and below these paragraphs. As RoboHelp is standard compliant, it follows the recommendation of W3C and does not show these empty paragraphs. Also, most modern browsers like Google Chrome, Firefox, Edge, and Safari ignore empty paragraphs as well when rendering the page. As a result of all this (empty paragraphs are ignored and no space above/below is set to 0), the fourths paragraph is right next after to the first paragraph.

                 

                That said, it is not a good idea to use empty paragraphs as visual "spacing separators" :-)

                I do not follow Peter's recommendation to add an empty paragraph with a non-breaking space.

                 

                My recommendation here is to clean this up and keep the code simple and strictly separate structure and content from formatting. This will make your life much easier, is much more stable, works with all browsers and is much more future proof. Also, it's best practice in terms of information architecture.

                 

                Try to clean this up:

                1. Make a backup of everything :-)
                2. Delete the style attributes from the <p> elements.
                3. Delete the <span> elements that only set the language.
                4. Specify the language on the topic level (right-click on the topic in the contents pod > Properties > Language)
                5. Define everything once in your stylesheet (CSS file). No coding required, you can do that in the visual CSS designer. Work with pt and em instead of cm which is better for responsive websites.
                6. Don't work with "empty" paragraph just to create spacing between paragraphs. Best practice is to do this by defining space before/space after for a paragraph through CSS.

                 

                For the more technical people reading this, a look into the code as well:

                 

                This is how it could look like after the clean-up of the code:

                 

                First, the cleaned up HTML:

                 

                <?xml version="1.0" encoding="utf-8" ?>
                <!DOCTYPE html>
                <html xmlns="http://www.w3.org/1999/xhtml">
                     <head>
                          <title>My title</title>
                          <link rel="stylesheet" href="assets/css/default.css" type="text/css" />
                     </head>
                     <body>
                          <p>Esta herramienta …</p>
                          <p>Acceda a este …</p>
                     </body>
                </html>
                

                 

                style attributes are deleted, span elements as well.

                 

                Now the CSS:

                 

                body {
                  font-family: "Segoe UI", "Tahoma", sans-serif;
                  font-size: 11pt;
                  font-style: normal;
                  text-align: left;
                  background-color: #ffffff;
                }
                p {
                  font-size: 1em;
                  color:black;
                  margin-top: 1em;
                  margin-bottom: 1em;
                  line-height: 1.5em;
                }
                

                 

                What this CSS does, is this:

                • It sets the font for the whole document to a font of your choice (here: "Segoe UI" with "Tahoma" as a fallback option; in case "Segoe UI" is not available, and any kind of Sans Serif font as a fallback option, if both Segoe UI and Tahoma should be not available)
                • Sets the base font size for the whole document to 11 Point, font style to normal, text alignment to left-aligned
                • Sets the font size of a normal paragraph to the same size (1em)
                • Sets the margin above a normal paragraph to the base font size (1em → 11 pt)
                • Sets the margin below a normal paragraph to the base font size (1em → 11 pt)
                • Sets the line hight to be a little bit more (1.5 em = 11 pt × 1.5 = 16.5 pt) just to make it look more relaxed

                 

                Hope this helps.

                1 person found this helpful
                • 5. Re: RH 2019 | Formatting | Missing paragraph breaks
                  Peter Grainge Adobe Community Professional

                  @Stefan I did not recommend the code I suggested as a solution, simply something that would work if there were only one instance and nobody would die from using it! The idea was that the poster would prove the issue was what I suspected and report it.

                   

                  What you have offered is a manual clean up of the code for something that was working in earlier versions but not in 2019. It has been reported.

                   

                  In another thread the poster has indicated that she is not code proficient and she shouldn't have to be. That is why I suggested that if the empty paragraph worked, the cause had been identified and was then reported.

                   


                  See www.grainge.org for free RoboHelp and Authoring information.

                   

                   

                  @petergrainge

                  1 person found this helpful
                  • 6. Re: RH 2019 | Formatting | Missing paragraph breaks
                    Peter Grainge Adobe Community Professional

                    Follow up.

                     

                    Have you applied Update 1 to 2019?

                     

                    If you have, was the project upgraded before or after the update was applied?

                     

                    If before, it might be worth upgrading the original project again to see if the empty paragraphs are respected in Preview.

                     


                    See www.grainge.org for free RoboHelp and Authoring information.

                     

                     

                    @petergrainge

                    • 7. Re: RH 2019 | Formatting | Missing paragraph breaks
                      isabelleg85447096 Level 1

                      Thank you for taking time to provide a thorough reply, but, I have a really hard time following your directions. Please keep in mind that my job is to author content so please include explicit instructions. My coding skill are literally at the level of Robot Turtle.

                       

                      You mention "local Style overides" and the webinar mentioned "in line styles" but I don't know what any of these are. The webinar had a recommended best practice about styles and it was WAY more complicated than I can follow. I was looking forward to the RoboHelp course which was supposed to be available yesterday so that I have a slim hope of not being so ignorant but it remains unavailable.

                       

                      When I converted the project from RH2015 to RH2019 it came in looking like a dog's breakfast.  All formatting that had existed previously was gone. I tried to apply changes to the css to fix this and it resulted in inconsistent application, i.e: Topics were displaying in Times New Roman but the css font was Axiforma, text inside tables would follow the format, I had to click every single title and subtitle and then click the corresponding style item to fix them.

                       

                      The css designer is horrible. It is slow to respond. It was defaulting to px and I would change it to pt, when I then entered 12 as the desired font size pt would automatically switch back to px! Then I would switch it again to pt and the 12 would disappear! It would not accept edits, repeatedly crashed the software so that I got a message asking me to reboot RH and to get around this I had to create a new css file.  Then I had to format every topic to look at the new css and not the default.

                       

                      I don't know what most of the options in the css are for. I would love to have the spacing around the paragraphs fixed. You should know that whatever solution you're talking about to define space in my text, separate content and structure from formatting?, I'm sure you're right but this is totally unintuitive to a content author. (What is intuitive is hitting enter twice or clicking a "new paragraph" button) I'm sure that with some explanation I could learn to use this but RH2019 resources are not yet available.

                       

                      OK Step 1: I've made a backup, thank you Peter Grainge I used your instruction from a long ago post to do this.

                       

                      Step 2: Delete the style attributes from the <p> elements.

                      Stefan Gentz [Adobe]Please tell me how to do this. The trash can button just eliminated the style item all together. Thankfully I tested this with H6 which I do not need.

                       

                      If you'd like to keep a step ahead of me, I have no idea how to accomplish step 3 either.

                       

                      Thank you.

                      • 8. Re: RH 2019 | Formatting | Missing paragraph breaks
                        isabelleg85447096 Level 1

                        Hi Peter,

                        I tried inputting <p></p> at line 17. I saved and looked at Preview View.  There was no change.  Author View showed the extra space but not Preview View.  Doesn't appear in the Output either.

                         

                        Output:

                        Code:

                         

                        Thanks for the suggestion though.

                        • 9. Re: RH 2019 | Formatting | Missing paragraph breaks
                          Peter Grainge Adobe Community Professional

                          That's not the code I suggested.

                           

                           

                          Peter Grainge

                          www.grainge.org

                          @petergrainge

                          • 10. Re: RH 2019 | Formatting | Missing paragraph breaks
                            Stefan Gentz [Adobe] Adobe Employee (Admin)

                            What Peter had suggested was not this:

                             

                            <p></p>
                            

                             

                            But this:

                             

                            <p>&160;</p>
                            

                             

                            &160; is the decimal notation of a non-breaking space. It creates the effect, that there is at least "something" in the paragraph (the non-breaking space). All modern browsers ignore completely empty paragraphs (<p></p>). That's why you cannot see it in the output.

                             

                            You do not need to go into the code for that. Just add a non-breaking space in an empty paragraph to make it "save".

                            You can use the Windows Character Map for this (search for "Character Map" in Windows Start menu) and double-click on the non-breaking space, click "Copy" and then paste it into an empty paragraph in RoboHelp.

                            • 11. Re: RH 2019 | Formatting | Missing paragraph breaks
                              Stefan Gentz [Adobe] Adobe Employee (Admin)

                              Hi,

                               

                              try this, please: Open the CSS file from the assets/css folder. Under "Styles" open "Paragraph Styles" and select the style you would like to give a spacing above/below the paragraph. Now open section "Layout" and add a fitting value in the two boxes (here in my example it's 15 points). You might want to click the "chain" icon once so that you can enter different values in the fields. Now save the CSS file again and reopen your topic and check if the spacing fits.

                               

                               

                              Does that help?

                              • 12. Re: RH 2019 | Formatting | Missing paragraph breaks
                                Stefan Gentz [Adobe] Adobe Employee (Admin)

                                Sorry for calling it a "hack," Peter. I have modified my post accordingly. Adding blank paragraphs with a non-breaking space is a working solution.

                                I (and that's just my personal opinion, please) would not do it in my own projects and instead set up the spacing between paragraphs in the paragraph style. It just makes your life as an author more easy :-)