3 Replies Latest reply on Jul 29, 2009 11:37 AM by RGranger

    Need to re-tag some Para styles of imported Word docs

    RGranger

      I'm hoping someone can help. I have a fairly modest-sized help system that is created from imported Word Docs (Office Word 2003). These documents use conventional paragraph styles (Heading 1, Heading 2, etc.).

      In my RoboHelp X5 project, I've created a custom CSS file that I apply to the imported Word docs. After importing any of the docs, some of my paragraph styles become misaligned: for example, my Heading 3 paragraphs are flush with the left margin, rather than indented as they should. When I click inside the mis-aligned paragraph, I see that the paragraph is indeed tagged as Heading 3. At fist I thought it might have been my CSS file style definitions, but they appear to be fine. In fact, all I have to do to correct the paragraph alignment is to reassert the tag (ie From the RB Project window, click the para (the fomating combo box reads Heading 3), reselect (reapply) the style (Heading 3), and then select "Reapply formatting  of the style to the selection" from the Update/Reapply Style dialog. RH then correctly applies the alignment defined for the style in my CSS. Note, this appears only to be an alignment issue; the fonts and other attributes always seem to work on import. Unfortunately, I have to do this hundreds of times because I seem to have several styles that need retagging after import.

       

      Any ideas? I downloaded a trial copy of RB 8, hoping this was peculiar to X5, but RB8 behaved the same way.  If it's any help, I've pasted the HTML coding for a Heading 3 paragraph, 1) just after import 2) the para after Heading 3 style was reasserted. For some reason RH is "margin left" and "text-indent" attributes.

       

      1) Immediately after import

       

      <h3 style=

      "margin-left: 40.3pt; text-indent: -40.3pt;">2.2.1<span style="font: 7.0pt 'Times New Roman';">     

       

       

      </span>Using the Stylus</h3>

       

      2) After retagging as heading Heading 3

       

      <h3>

      2.2.1<span style="font: 7.0pt 'Times New Roman';">     </span>Using the Stylus</h3>

       

      Thanks.....rob

        • 1. Re: Need to re-tag some Para styles of imported Word docs
          RoboColum(n) Level 5

          Hi Rob.

          I confess to not knowing why you are getting the additional style tags but thought that it if you can't get an answer you may want to try using a find and replace tool like FAR to change the tag as required. It would be a lot quicker.

           


          Read the RoboColum(n).

          • 2. Re: Need to re-tag some Para styles of imported Word docs
            MergeThis Level 4

            Judging from the excess spacing between the "2.2.1" and the H3 title, I suspect that your Word file has a tab set in there. I believe replacing the tab with one or two spaces should import the file without the indent.

             

            As to the font (span) tagging, are you sure that your Heading 3 style in Word is the original, default Heading 3, and not some re-styled Heading 3 based on Normal or something else, or a "Heading 3 + Font: 7 pt, Times New Roman", which would indicate inline modification of the style rather than a global replacement of settings for the style? I've never seen RH add span tagging unless it encounters non-standard styles in the base document.

             

            Select a test .doc file. Before importing it to RH, try these:

             

            • Use Format Painter in Word to manually re-style any non-standard paragraphs.
            • Do not attach a .css to the Word file, only to the resulting RH topic.

             

            Do you see a difference?

             

             

            Good luck,

            Leon

            • 3. Re: Need to re-tag some Para styles of imported Word docs
              RGranger Level 1

              Thanks to both of you for responding. The tabbing was not a problem, but your suggestion to tinker with a small test file helped me to uncover the problem. Turned out Microsoft was "helping" me. I was indeed using conventional Word headings that I changed to conform to the desired formatting. Unfortunately, these are numbered headings and the selected style right-justifed some numbers and left justified others. My bad for not realizing this. But, as I altered the heading styles, for example .5inch left margin and click OK, Word would actually change this value to something else. It's a little hard to explain. I only noticed this when I reopened the sytle definition. What can I say, I miss Frame.