35 Replies Latest reply on Feb 8, 2011 3:52 AM by Harbs.

    Importing edited RTF file and auto-applying styles?

    JustyR Level 1

      Hi,

       

      I've been working on a huge document that requires exporting all text to an RTF file. The client makes amendments as necessary and the file is re-imported.

       

      However, when the RTF is brought back in, the character styles don't seem to update themselves. Paragraph styles seem easy enough to re-assign and update but if a word is made bold by using a character style, that same word in the ID doc shows a style override (the + symbol).

       

      How can these overrides be cleared in one go, or perhaps checked for and updated like doing a find/change?

       

      Thanks in advance if you can help.

       

      Justy

        • 1. Re: Importing edited RTF file and auto-applying styles?
          Peter Spier Most Valuable Participant (Moderator)

          Sounds like theclient is using local formatting rather thanthe defined styles, which isn't too unusual. There are a couple of find/change scripts floating around that will find text that is locally formatted with things like bold or italic and assign the character styles. Afet that you select all and clear overrides.

           

          Take a look at http://forums.adobe.com/message/1946434#1946434

          • 2. Re: Importing edited RTF file and auto-applying styles?
            Petteri_Paananen Level 4

            Did you use style mapping. I just ran a quick test and had no problems with either character or paragraph style mappings, no overrides...

             

            If you did use style mapping tool, then I think Peter may be right...

            • 3. Re: Importing edited RTF file and auto-applying styles?
              BobLevine MVP & Adobe Community Professional

              In addition to the other posts, I'll do what I always do...recommend that you look into using InCopy for this.

               

              Bob

              • 4. Re: Importing edited RTF file and auto-applying styles?
                JustyR Level 1

                Thanks, guys, for the help.

                 

                Unfortunately, InCopy isn't an option as it would take too long for the client to learn to use it.

                 

                Here's the process I've tested:

                 

                Create a single page of placeholder text.

                 

                Format using paragraph and character styles setup in InDesign.

                 

                Export as an RTF.

                 

                Delete the text from the ID page and do a File > Place > Show Import Options ... use style mapping to make sure all the correct paragraph and character styles are being used.

                 

                The text now comes back in but the character styles are not properly assigned. They have a style override added, which isn't obvious unless you know which bit of text should have a character style.

                 

                I've tried the script that was in the other thread but it doesn't seem to help with the above issue.

                 

                Any ideas?

                • 5. Re: Importing edited RTF file and auto-applying styles?
                  Peter Spier Most Valuable Participant (Moderator)

                  Are you absolutely certain that there are no overides in ID BEFORE you export as RTF?

                   

                  When you import, if the styles in the RTF are used, there should be no reason to need to map styles, just preserve styles and formatting, import styles automatically and in case of conflict use InDesign defintion.

                  • 6. Re: Importing edited RTF file and auto-applying styles?
                    JustyR Level 1

                    Got it to work once with your suggestion but then all the styles became linked RTF styles, not the original ID styles. Then tried again with the settings you suggested and the character style still doesn't update itself properly.

                     

                    I'm perplexed.

                    • 7. Re: Importing edited RTF file and auto-applying styles?
                      Peter Spier Most Valuable Participant (Moderator)

                      Could possibly be a corrupt document or corrupt prefs. It won't hurt anything to try these:

                       

                      Replace Your Preferences and

                      Remove minor corruption by exporting

                       

                      Do you have any third party plugins? A font manager? What's the OS?

                      • 8. Re: Importing edited RTF file and auto-applying styles?
                        JustyR Level 1

                        Thanks for your continued help.

                         

                        I've deleted the prefs file and made a new ID document but the character style is still coming in needing an override.

                         

                        Have you tested this yourself? Did it work as expected?

                         

                        Could you type out the exact settings you're using for the "Show Import Options"?

                        • 9. Re: Importing edited RTF file and auto-applying styles?
                          Peter Spier Most Valuable Participant (Moderator)

                          OK, I just tried it here. I made a frame and filled with Placeholder text. Then I created 3 paragraph styles, all based on either [No Style] or each other to avoid basing anything on [Basic Paragraph] (you can have all sorts of strange things happen with styles based on Basic Paragraph when moving text between files where the definition has bee altered). The I created a Bold and an Italic character style, and applied the paragraph styles to all but one paragraph (leaving one as Basic Paragraph), and applying the character styles to the first or last word in each paragraph in order to know where they were.

                           

                          I exported to RTF, opened Word and applied the character styles to some additonal words, swapped some paragraph styles, redefined the font in one style and added a paragraph, then did a save as to RTF.

                           

                          I reimported the RTF to ID. If I import to a file (such as the original file) where the styles already exist, the tags are maintained and the text is styled correctly, but as you report, all the paragraph styles now have an override. I checked, and this override is for hyphenation settings, so it should not be affecting your italics or other character styles. It seems that Word perhaps does not respect the hyphenation settings in the exported styles, but I don't know why ID doesn't reset them -- it correctly reset the changed font.

                           

                          If I import into a new document where only Basic Paragraph exists, paragraph tagged with basic paragraph has an override for hyphenation and uses the definition for Basic Paragraph in the ID file. The other styles are imported as external styles, which is to be expected since there were no exisiting styles with those names. All the character styles are correctly applied. These are the settings I used:

                          RTF import.png

                           

                          SInce on the file where the styles showed overrides they were strictly hyphenation-related, and since properly applied character styles are not overrides, it is safe to select all and clear overrides. On the file showing the disk import you can edit the style to correct the hyphenation rules, or just cange any attibute and then change back before clicking OK and closing if all you want to do is get rid of the disk icon.

                           

                          I'm still not sure why you are not seeing your italics where they ought to be. The only explanation I can think of is they were never tagged with the italic style.

                          1 person found this helpful
                          • 10. Re: Importing edited RTF file and auto-applying styles?
                            JustyR Level 1

                            Thanks, Peter, I knew I was doing it correctly.

                             

                            I've found a workaround to get the character styles to show up properly:

                             

                            Once the RTF has been re-imported or its link updated, go to any word in the document and alter it, e.g. make it bigger without using a style sheet. Select all (cmd-A), then choose clear overrides in the paragraph styles palette. This then clears the overrides in the character styles, too, which otherwise would need doing by hand, instance by instance.

                             

                            The downside of course is that everything is changed at once and there may be text in there you don't want to override. I'm trying to find a script that allows a find/change approach. The only thing I've happened across at the moment is this:

                             

                            http://www.indiscripts.com/post/2010/05/show-local-formatting-in-indesign-cs4

                            • 11. Re: Importing edited RTF file and auto-applying styles?
                              Peter Spier Most Valuable Participant (Moderator)

                              As I said, it makes no sense that a character style would have an override unless the user on the other end is completely in the dark about properly applying styles. All I can think of is someone adding text after a styled word, that new text picks up the style for the previous word, and the user uses local formatting to remove the styling. Since Word seems totally ignorant that text can have a [None] style, this is probably what's happening. I don't see a way around this in Word other than to be careful about where you insert the cursor, and being careful in ID not to include trailing spaces in the style. There seems to be no way in Word to remove a character style from text once it is applied.

                               

                              Perhaps what you need is a script that will find character styles to which overrides have been applied and apply [None], but of course you still have the problem of knowing if the other user intended for a style to be applied.

                              • 12. Re: Importing edited RTF file and auto-applying styles?
                                JustyR Level 1

                                I'm doing these tests with my own files, so any style formatting has been applied by myself in ID and Word; only using the same ones, not local formatting.

                                 

                                Been playing about and I don't think I've changed anything but now when exporting to RTF and bringing it back in, Times is changing to Times New Roman and it's missing. By updating the font all the correct styling now shows up. Seems rather weird. I think it requires more live-testing, rather than me doing it at home on a small file.

                                • 13. Re: Importing edited RTF file and auto-applying styles?
                                  Peter Spier Most Valuable Participant (Moderator)

                                  Are you using a style named Normal or BodyText, or something else that Word has by default? It's possible that word is redefining the styles to match its definitions, and if you import back to a file without your own defs things are not being changed, but I'd really need to see your test files to know why things don't work for you the way they should.

                                  • 14. Re: Importing edited RTF file and auto-applying styles?
                                    JustyR Level 1

                                    Probably the best idea. I'm sure I've done something wrong somewhere. Really what I'm trying to do is figure out a best practice process for the future.

                                     

                                    http://www.ziddu.com/download/11434546/Archive.zip.html

                                    • 15. Re: Importing edited RTF file and auto-applying styles?
                                      Peter Spier Most Valuable Participant (Moderator)

                                      Don't have time, myself, to look tonight, but if nobody else takes a stab, I'll try to get to it tomorrow.

                                      • 16. Re: Importing edited RTF file and auto-applying styles?
                                        Peter Spier Most Valuable Participant (Moderator)

                                        Word seems to be seriously screwing up this file. I've been working with it for over an hour, and I think the problem is at least partly related to your style names. Word has default styles named Header and Body, and if I get rid of those names in ID in favor of Heading and Body Text most of the problems seem to disappear, but your Body Bold Character style is still holding onto the wrong font and showing an override. That seems to clear up properly when I select all and clear overrides.

                                         

                                        Note that any changes you make other than style definitions are going to be lost because you are linking to the RTF rather than embedding the file, so you should do all the editing in Word.

                                        1 person found this helpful
                                        • 17. Re: Importing edited RTF file and auto-applying styles?
                                          JustyR Level 1

                                          Thanks for checking this out.

                                           

                                          I've been deleting the incorrect styles coming in from Word and replacing with the correct ones in ID. That, as you say, clears most of the issues. Just those character overrides that remain.

                                           

                                          I think I'll try and create a workflow for the next project that uses this process to make it as painless as possible.

                                           

                                          Thanks again for your help.

                                          • 18. Re: Importing edited RTF file and auto-applying styles?
                                            Peter Spier Most Valuable Participant (Moderator)

                                            There's a similar thread started yesterday about unlinking a linked RTF, and your file and his show a remarkable similarity. I'm not convinced that there isn't some corruption in the RTF.

                                            • 19. Re: Importing edited RTF file and auto-applying styles?
                                              Jeneffer Goncalves

                                              I am having the same problem with importing text from word. How do I run this script in Indesign?

                                              • 20. Re: Importing edited RTF file and auto-applying styles?
                                                [Jongware]-9BC6tI Level 4

                                                Download the ZIP file and unpack it (if your browser doesn't do that by itself); save into your User Scripts folder. Where is your User Scripts folder? Fastest way to find out is select the "User" folder thingy in the Scripts panel, then right-click it. The only option the pop-up menu offers is "Reveal in Finder"/"Reveal in Explorer". Put the script in there.

                                                 

                                                To run it, make sure your text cursor is inside the story you want to prepare. Then double-click the script name to run it.

                                                • 21. Re: Importing edited RTF file and auto-applying styles?
                                                  Jeneffer Goncalves Level 1

                                                  Thanks, but it is not really working for me. Here is my problem... I have a

                                                  word document with paragraph and character style that I want to replace in

                                                  Indesign. I use the ID import option and then mapping to replace the word

                                                  style with my ID styles. When I place the text it does not change to my ID

                                                  style paragraph but only after I clear overrides +, which gets rid off any

                                                  bold or stalics in the text---I don't want this to happen... I want to keep

                                                  bold and stalics, or least know where they are so I can change the font to

                                                  match the ID paragraph style. Is there a away to keep them even after I

                                                  clear the overrides?My ID paragraph style uses garamond regular, I wish

                                                  there was a way that when it comes across italics within the text it changes

                                                  it to garamond italics or at least the option to do so.

                                                  • 22. Re: Importing edited RTF file and auto-applying styles?
                                                    BobLevine MVP & Adobe Community Professional

                                                    There is a sample script called createcharacterstyles. That will convert the manual bolds and italics to true character styles. After that you can kill the rest of the overrides.

                                                     

                                                    Bob

                                                    • 24. Re: Importing edited RTF file and auto-applying styles?
                                                      Jeneffer Goncalves Level 1

                                                      I see where I can find it now... I am not sure why I would need a script to

                                                      create a character style. When I import the text using ID style import ID

                                                      keeps the original font from word even though I applied a paragraph style to

                                                      text, it is only after I clear the overrides that the ID paragraph style

                                                      kicks in but my bolds and italics are gone--not good.... I guess I just have

                                                      make a separate character style for my bolds and italics, and change them

                                                      manually before I clear overrides...

                                                      • 25. Re: Importing edited RTF file and auto-applying styles?
                                                        Joel Cherney Level 5
                                                        I guess I just have make a separate character style for my bolds and italics, and change them

                                                        manually before I clear overrides...

                                                        That's exactly what the script that Bob is suggesting to you will do.

                                                         

                                                        I prefer PrepText, but there are a few other script out there that do similar tasks. If I can find 'em, I'll post links.

                                                        • 26. Re: Importing edited RTF file and auto-applying styles?
                                                          Jeneffer Goncalves Level 1

                                                          I figured that... It .. Even if I run the script to create a new character

                                                          style I still have to change the font to the correct family font... So I was

                                                          just saying that I can just select the text that is italic and bold create a

                                                          new style without having to use the script... It takes just as much time...

                                                          at least for me.

                                                          • 27. Re: Importing edited RTF file and auto-applying styles?
                                                            Joel Cherney Level 5

                                                            I guess so. In my case, it's the difference between 10 clicks to get the script going and something like sixty clicks per language of a 100+page manual going into eight languages, but you'd be the best judge of the most efficient method for you.

                                                            • 28. Re: Importing edited RTF file and auto-applying styles?
                                                              Jeneffer Goncalves Level 1

                                                              I see...In my case creating character style for bold and stalics does not

                                                              resolve my original problem. Import options in Indesign seems to have a mind

                                                              of it own, I am always getting undesirable results---I have spent two days

                                                              figuring out the best way to place a word document into Indesign--very

                                                              frustrating...

                                                              • 29. Re: Importing edited RTF file and auto-applying styles?
                                                                Joel Cherney Level 5

                                                                The workflow I use to handle running English text out of ID documents into RTF for translators to work in Word, and to run their translations back in, is exactly what you're asking about.

                                                                 

                                                                Analyze ID file

                                                                Make sure the para and character styling in ID is absolutely perfect without any overrides anywhere

                                                                Export RTF

                                                                Send to translator

                                                                Receive translated file

                                                                Place RTF

                                                                Map styles in Import Options

                                                                Create new charstyles for new local formatting

                                                                Clear all overrides

                                                                 

                                                                ... and then I crawl through the document doing little tweaks to the layout.

                                                                 

                                                                I have spent two days figuring out the best way to place a word document into Indesign

                                                                Only two days? It took me weeks to get this workflow to work at all. Now that I've been using it for years, it usually goes off without a hitch, but there are a very large number of variables that need to be watched carefully. (InCopy would be a much better solution, if I could get 100+ translators to pay for it, learn how to use it, and abandon their transation memory tools that work with Word but not InCopy... never gonna happen.)

                                                                 

                                                                Can you post your RTFs and your ID file? It might be easier to understand what is not working for you if we could try it ourselves.

                                                                • 30. Re: Importing edited RTF file and auto-applying styles?
                                                                  Jeneffer Goncalves Level 1

                                                                  Sounds like what you are doing is a lot complicated. I am currently working on a Magazine, where I have to place in Indesign unformatted doc files from the editor and then reformatting them using my ID styles. In any case, I'll try your approach and see if it works. Thanks.

                                                                  • 31. Re: Importing edited RTF file and auto-applying styles?
                                                                    Joel Cherney Level 5

                                                                    I am currently working on a Magazine, where I have to place in Indesign unformatted doc files from the editor and then reformatting them using my ID styles. In any case, I'll try your approach and see if it works. Thanks.

                                                                    It sounds like my approach won't work 100% for you; one of the advantages I have is that translators tend to hit the Insert key and type over the English with their translations, which more-or-less preserves the styles in the RTF that I built in InDesign. (Also, translators tend to both respect styles in Word, which is very unusual among Word users, and many of them use translation memory applications that preserve styles perfectly.) If your editorial contributors get to make up their own Word files, then using a script to turn locally-applied character formatting in Word to character styles in InDesign will save you some time, but you'll still need to apply your own paragraph styles to the text.

                                                                     

                                                                    If your editorial contributors working in Word use their own styles in Word, you might be able to map their styles to yours (using the "Customize Style Import" radio button at the bottom of the screenshot in Peter's post no. 9), or you might just import their styles and do a (manual or automated) find & change on those styles. However, in a worst-case scenario where you work with a number of editors, each of whom have complete control over their own Word files, and each of whom has a unique approach to using or neglecting styles, then you will face a large amount of manual work no matter what, even with scripts to help. One useful tool is only available when right-clicking on a paragraph style; "Apply Style then Next Style" is useful when you want to apply a subheader style & then body style to a large number of paragraphs.

                                                                     

                                                                    I've had some luck with imposing my own Word .dot template files on editorial contributors, but in each case where I've had this luck, I've convinced a boss to impose Word templates with locked-down styles on everyone involved in producing content for the project. This tactic may not work for you, depending on whether or not you have the ear of someone in the organization who can tell people "You must use this Word template."

                                                                     

                                                                    This is one of the clumsier ways to lock editors into respecting formatting, but if you can't use a content management system or a structured authoring system or InCopy or anything like that, it may work for you.

                                                                    • 32. Re: Importing edited RTF file and auto-applying styles?
                                                                      Jeneffer Goncalves Level 1

                                                                      I will talk to my boss and see if we can impose word templates on our

                                                                      editorial staff--that's probably the best solution to my problems. Thanks

                                                                      for the suggestions.

                                                                      • 33. Re: Importing edited RTF file and auto-applying styles?
                                                                        Joel Cherney Level 5

                                                                        It's worth a shot; best of luck.

                                                                         

                                                                        If I were in your shoes, my order of suggestions would go like this:

                                                                         

                                                                        1) InCopy

                                                                        2) Word document template with heavy protection (user must start all new Word files with a given .dot; layout staff rejects any Word file not generated with correct .dot; .dot allows only typing of text and selection of styles)

                                                                        3) Word file assignment with styles and heavy protection (user can't even change fonts, only type text and select styles)

                                                                        4) Word document template with  styles, unprotected (user can deviate from styles with manual formatting; layout staff rejects any Word file not generated with correct .dot; .dot allows only typing of text and selection of styles)

                                                                        5) Word file assignments with styles, unprotected (user can deviate from styles with manual formatting)

                                                                        • 34. Re: Importing edited RTF file and auto-applying styles?
                                                                          Peter Spier Most Valuable Participant (Moderator)

                                                                          Joel, your user account looks screwed up (though the post count appears to be accurate). You might want to try logging out and clear your cookies, then log in again.

                                                                          • 35. Re: Importing edited RTF file and auto-applying styles?
                                                                            Harbs. Level 6

                                                                            Yeah. This forum software sometimes make you want to "chuck your cookies"...

                                                                             

                                                                            Harbs