8 Replies Latest reply on Aug 17, 2012 8:55 AM by namedujour

    Stylesheets vs. HTML files

    namedujour Level 1

      I've always imported Word documents and attached stylesheets. Now I'm importing HTML documents, but the stylesheets don't work on them. The styles that display in the Style window have the characteristics of the original Word document (saved as HTML) even though I've attached the same stylesheet to this file that's on every other file in the project. The rest of the files display correctly.

       

      Is there some way to fix this?


      Thanks

        • 1. Re: Stylesheets vs. HTML files
          Peter Grainge Adobe Community Professional

          When you import, the CSS that Word created when you saved the document as an HTML file comes with the import. You can then change to your own CSS but that will only work wherethe styles have exacty the same name.

           

          Take a look at http://www.grainge.org/pages/authoring/importing/importing_rh9.htm and see if that helps with the process.

           


          See www.grainge.org for RoboHelp and Authoring tips

           

           

          @petergrainge

          • 2. Re: Stylesheets vs. HTML files
            namedujour Level 1

            Peter, Thanks for the link, but I'm seriously not a newbie. I've worked with Robohelp for more than 18 years, and it isn't behaving as expected, so I'm looking for a bug workaround or some explanation for why it's doing this so I can control the output. I just need to delve a little more deeply into this.

             

            The styles have exactly the same name in both Word and the stylesheet. However, some of my styles have different attributes in Word because a style in the "Word color" tips me off that I haven't attached the project stylesheet. So does the font display in "Word teal" instead of "Robohelp blue?" That means I didn't attach the project stylesheet, and still need to do that. It's just a simple safety net, but in this case it caught a problem.

             

            The stylesheet that comes over to Robohelp from Word (the one named original_document_name.css) displays the Word attributes in the Style window until I attach the project stylesheet. As soon as I do, the style window displays the attributes of Project_Stylesheet.css instead of the original stylesheet. In other words, that teal font changes to blue in the style window.

             

            In this case, Project_Stylesheet.css styles don't display in the window correctly when I attach that stylesheet to an imported HTML file. The font for that style still displays as teal in both the Style window and the topic, even though the correct stylesheet is attached and the code says the font should be blue.

             

            Furthermore, Robohelp is not managing the imported image files correctly. When I publish the imported HTML topic, none of the .jpg files display. When I look at the Project Manager, the main HTML file displays under the folder for another topic, and I have no folder containing image files for the imported topic. I don't even know where they went, although I saw them transfer to the server during the publishing process.

             

            So I tried going back to importing it as Word and changed the style of the Word shapes to see if anything had a higher resolution than another style, and they don't. Sometimes you can't even tell that a shape is trying to be an arrow, the image quality is so poor.

             

            Which brings me back to HTML. Does anyone happen to recognize these symptoms, and know what's going on with this and how I can work around it?


            Thanks

            • 3. Re: Stylesheets vs. HTML files
              Peter Grainge Adobe Community Professional

              I'm sorry you have taken exception to my response. The problem with dealing with forum posts is there is no way of knowing whether someone has worked with RoboHelp for 100 minutes, 100 days or 100 months, unless of course they tell you and I cannot see that in your first post. Indeed, I cannot see which version of RoboHelp you are using but I will assume it is 9 as I pointed you to a topic covering that version and you have not said that is wrong. Importing changed a lot in RoboHelp 8 and a lot of issues were fixed in 9.0.2, that was a reason for pointing you to that page as I don't know if you are aware of that. What may have worked before those versions will not necessarily work now.

               

              When you import a Word document, the start of the process is that behind the scenes RoboHelp converts it to and HTML file using Word to do that. Thus there will be some of the same issues if you do the save in HTML format. Style names can get changed during the process with, for example, Normal becoming MsoNormal and then not mapping to your <p> in your own CSS.

               

              From what you say, am I right in thinking that in Word you have a style called say Special where the font is Teal and in RoboHelp that same named style should be Blue but is still showing as Teal after you apply your own CSS? Is there anything inline in RoboHelp that could be causing that and have you checked for any embedded CSS at the top of the topic?

               


              See www.grainge.org for RoboHelp and Authoring tips

               

               

              @petergrainge

              • 4. Re: Stylesheets vs. HTML files
                namedujour Level 1

                I didn't take exception - your site is very nice but I would have to wade through information that doesn't help me and doesn't apply to the specific situation. I was just trying to reiterate that this is a bug and I need a specific workaround. That's why I posted all the steps I took, so someone would have all the symptoms in order to come up with a diagnosis.

                 

                I have to give up on HTML, and I'm reporting it to Adobe. I can see the image files in the correct folder on my C:\ drive, but they never show up in the Robohelp Project Manager - the folder just doesn't appear there, and the published topic doesn't display them in the browser, except in the preview window. If you happen to click the Project Manager folder for another topic (which I did, looking in vain for the image files), the next time you import the HTML file it goes into the selected folder, NOT it's own folder. Surely Robohelp is not working as designed, right? Ironically, I can't see the .png files anywhere either, and they show up in the published topic. So I have no idea what's going on, but it's very strange.

                 

                Back to Word, I'm having some minor success using dark shapes with white borders and NO shadow. I may have to make that shape style my default, and go back to importing Word docs until there's a fix for this.

                 

                Thanks much

                • 5. Re: Stylesheets vs. HTML files
                  Peter Grainge Adobe Community Professional

                  No it doesn't apply to your specific situation but wading through it might give you a process that does work. I know the topic is long but that is because I had to document a process that has to be followed in a very specific way. The issues with importing are not going to be fixed in a hurry so whilst it is right you have reported the problem as a bug, you are still left with the problem.

                   

                  Have you tried an old trick of creating a folder in Project Manager in the same relative location to the imported topic and with the same name as in Windows Explorer? Sometimes when you do that, the images get listed there.

                   

                  Have you checked in the HTML where the topic is looking for the images?

                   

                  As to their quality, that's a whole other subject that generated a long thread a couple of months back.

                   


                  See www.grainge.org for RoboHelp and Authoring tips

                   

                   

                  @petergrainge

                  • 6. Re: Stylesheets vs. HTML files
                    namedujour Level 1

                    I've solved the problem. The correct formatting for the shape is a) select a dark color for the shape, b) unselect the shadowing, and c) set a white border at a width of .5.

                     

                    I would have liked to see that other thread. Did they come up with the same solution?

                    • 7. Re: Stylesheets vs. HTML files
                      Peter Grainge Adobe Community Professional

                      The issue there was the original image looked a reasonable size in Word but if you saved it as an image it was several times larger (5 or 6 I think). During the conversion by Word to HTML it did not resize as nicely. Resizing might not be an issue for you. I think the thread also covered some of the detail of how images get saved in the process but it seems like you have found an OK solution.

                       


                      See www.grainge.org for RoboHelp and Authoring tips

                       

                       

                      @petergrainge

                      • 8. Re: Stylesheets vs. HTML files
                        namedujour Level 1

                        I'm also going to post this in the thread I created to discuss bad graphics. If it comes up again for someone else, that is what you do.

                         

                        Here's an example:

                         

                        Default Word 2010 settings:

                        NewShape.jpg

                         

                         

                        Corrected shape settings:

                        FixedImages.jpg

                        Thanks