26 Replies Latest reply on Jun 13, 2011 5:43 PM by Harold Sensei

    Import ID tagged text file results in paragraph style overrides

    Harold Sensei

      I have been working on a project that requires the import of a large amount of information from a database. I have defined all the paragraph styles in InDesign and have a program to apply the paragraph style to the database information creating the InDesign Tagged Text file. When I place it into my document the paragraph styles are recognized but there is an override. If I clear the override, the text looks fine. I have an example document that I have exported and imported some text to rule out the program, but even in this case, an override occurs. Text is there, the paragraph format is there, but font size (for example) is wrong. Where should I be looking to correct this issue?

       

      Harold

        • 1. Re: Import ID tagged text file results in paragraph style overrides
          John Hawkinson Level 5

          Please pare down the Tagged Text file to a minimum sample to demonstrate the problem (e.g. a single sentence) and then paste it here so we can see it...

          • 2. Re: Import ID tagged text file results in paragraph style overrides
            Harold Sensei Level 1

            I had to switch the interface over to English so it was more understandable. Here is a small example. Have some text. Three paragraphs with different paragraph tags. I then write out the tagged-text file and then Place it after a paragraph break in the same text box. (Will do another reply to keep clear).

            Handout1.PNG

            • 3. Re: Import ID tagged text file results in paragraph style overrides
              Harold Sensei Level 1

              and this is what I get. The paragraph tags are there, but the line spacing, font size seems bunged up.

              Handout2.PNG

              • 4. Re: Import ID tagged text file results in paragraph style overrides
                John Hawkinson Level 5

                OK, but can you paste in the actual tagged text file? Cut-and-paste from a text editor. If there are issues with non-ASCII characters, upload to pastebin.com and include the URL here.

                • 5. Re: Import ID tagged text file results in paragraph style overrides
                  Harold Sensei Level 1

                  Here is the tagged-text except.

                   

                  <SJIS-WIN>

                  ..... (Cut some out as it went WAY to the left and I don't think it is relevant)..........
                  <dps:Entry\:HEADING=<Nextstyle:Entry\:HEADING><cc:C\=20 M\=94 Y\=100 K\=0><cs:32.000000><cl:34.000000><ph:0><pswa:Left><pta:Left>>
                  <dps:Entry\:CORE=<Nextstyle:Entry\:CORE><cc:C\=20 M\=94 Y\=100 K\=0><ct:Semibold><cs:9.000000><capk:None><ck:0><cl:10.000000><cf:Myriad Pro><pta:Left>>
                  <dps:Entry\:READINGS=<Nextstyle:Entry\:READINGS><ct:Regular><cs:7.500000><ctk:-25><ptc:HL Single J><cl:8.250000><cf:Myriad Pro><pmaws:1.200000><pswa:Left><pta:Left><cts:0.500000><pcjkh:KinsokuForceHang>>
                  <dps:Entry\:READINGS\_NAME=<BasedOn:Entry\:READINGS><Nextstyle:Entry\:READINGS\_NAME><ct:L ><ctk:0><cl:9.000000><cf:Kozuka Mincho Pro><cts:0.000000>>
                  <pstyle:Entry\:HEADING>&#144;ì
                  <pstyle:Entry\:CORE>kawa
                  <pstyle:Entry\:READINGS\_NAME>river

                   

                  I really am at a loss to understand what is going on. Are the Paragraphs set up incorrectly? Do they not define everything?

                  • 6. Re: Import ID tagged text file results in paragraph style overrides
                    John Hawkinson Level 5

                    And there are overrides applied to what is styled HEADING in the first image after the IDTT import? Hrmm.

                    • 7. Re: Import ID tagged text file results in paragraph style overrides
                      Harold Sensei Level 1

                      The first image is of the "source". I mocked that up and then wrote the tagged text file. I did write it out as abbreviated, not verbose.

                       

                      Verbose has no different effect.

                       

                      No, I don't think so. There is no + symbol. In the actual one, more complicated, I did see overrides when I Placed back into ID. But this mocked up example doesn't show it.

                      • 8. Re: Import ID tagged text file results in paragraph style overrides
                        John Hawkinson Level 5

                        So, there are no overrides but two different paragraphs with the same style appear differently? Could you please double-check? Because that would be much worse than a failure reading or writing IDTT -- that would be an object model corruption problem...

                        • 9. Re: Import ID tagged text file results in paragraph style overrides
                          Harold Sensei Level 1

                          Strange, when a paragraph is selected in the second grouping, no paragraph tag is highlighting in the panel. Of course, (re)selecting

                          the original paragraph style reforces it to be what you would expect. I selected the second group of text, exported it using IDTT and it has the correct tags in the IDTT file. Ugh. Could the file somehow be corrupt? Is there a non-indtt export-import path to cleanse the file?

                          • 10. Re: Import ID tagged text file results in paragraph style overrides
                            Harold Sensei Level 1

                            Some more info. In the Paragraph Style panel, at the top, it says (No Styles). It is as if it loses the paragraph styles on Place, but somehow knows to keep the right color....

                            • 11. Re: Import ID tagged text file results in paragraph style overrides
                              John Hawkinson Level 5

                              I apologize, Harold, I had meant to look at this much earlier and got bogged down.

                               

                              The tagged-text excerpt you posted is not valid, and does not import as tagged text. That makes it not very useful for debugging.  Additionally, it does not paste well from the forum. Can you please use an example that you can confirm demonstrates the problem and upload it via pastebin.com? That way we can try to reproduce your problem, rather than speculating.

                               

                              You do have some next styles and nested styles in there, I sort of wonder if that is related.

                               

                              Is there a non-indtt export-import path to cleanse the file?

                              Indeed there is -- the way you ask makes me wonder if you already knew the answer, or just have great intuition. Export the entire document to IDML and then re-open the IDML. That is a great way to address document corruption issues.

                               

                              You might also see if you have more/different success importing a snippet rather than tagged text, but that would require retooling your entire workflow and the snippet format is much more complicated than the IDTT format.

                               

                              Also, does the problem happen when you Place the IDTT file into a bare and empty textframe, rather than one with text in it already?

                              • 12. Re: Import ID tagged text file results in paragraph style overrides
                                Harold Sensei Level 1

                                OK. I think the invalidity was caused because I put some &quot;...&quot; in there to show where I cut it out. I will post it on pastebin and you can see why I cut some out. It has a few lines which are really, really long that play havoc on editors.

                                 

                                I am suspicious of the styles (and nesting) as well. I inherited a &quot;sample&quot; layout page which has the styles predefined, but I just don&#39;t think they are right.

                                 

                                I am going to follow this up with some more posts which some hopefully explanatory images.

                                 

                                I hope it is good intuition... Going to try the IDML.

                                 

                                Bare textframe didn&#39;t work either. See image to follow.

                                • 13. Re: Import ID tagged text file results in paragraph style overrides
                                  Harold Sensei Level 1

                                  Here is the pastebin.

                                  http://pastebin.com/Br17xfgW

                                   

                                  I modified the example. Here is the original example.

                                  Mockup1.PNG

                                  • 14. Re: Import ID tagged text file results in paragraph style overrides
                                    Harold Sensei Level 1

                                    An image after the Place (text existing in

                                    box to show change in format)

                                    Mockup2.PNG

                                    • 15. Re: Import ID tagged text file results in paragraph style overrides
                                      Harold Sensei Level 1

                                      An image showing how the Placed text does NOT seem to pick up the paragraph. That is the whole point of using IDTT.

                                      Mockup4.PNG

                                      • 16. Re: Import ID tagged text file results in paragraph style overrides
                                        John Hawkinson Level 5

                                        I'm sorry for being so slow to respond.

                                         

                                        Do you have "Show List of Problems Tags before Place" enabled, it's an option in the Import Options when you import IDTT. For your file, I get these errors:

                                         

                                        tterr.png

                                        This is what I get placing your text:

                                        placed.png

                                        It might be a lot easier if we could demonstrate this problem with purely roman text...it looks like what you had to me?

                                         

                                        Anyhow, there are plenty of overrides applied, but the paragraph style is also applied:

                                         

                                        overrides.png

                                         

                                        Which of these, if any, are wrong?

                                         

                                        In any case, though, it seems screwy. The HEADING style has an autoLeading percentage of 120%. Where does the 175% override come from? It should be set with one of these tags:

                                         

                                        AttributeTag name
                                        Tag abbr.
                                        Examples and Notes
                                        Leading: autoleading percentagepAutoLeadPercent:Realpalp<pAutoLeadPercent:1.2> The value 1.0 equals 100%. Specify a value between 0 and 5 (500%). The default value is 1.75 (175%) for text in plain text frames and 1 (100%) for text in frame grids.

                                         

                                        There are no "palp" or "pAutoLeadPercent" tags in your tagged text file...

                                        These overrides appear to be because of the Japanese featuresets. This IDTT file gives the goofy overrides:

                                         

                                        <SJIS-WIN>
                                        <Version:6><FeatureSet:InDesign-Japanese>
                                        <ParaStyle:Entry\:HEADING><CharStyle:ENTRY\:MAIN\_ENTRY>foobar
                                        

                                         

                                        And this one does not:

                                        <SJIS-WIN>
                                        <Version:6>
                                        <DefineParaStyle:Entry\:HEADING=>
                                        <ParaStyle:Entry\:HEADING>foobaz
                                        

                                         

                                        I'm still a little confused since I thought you were generating the IDTT file yourself? But the FeatureSet: tag is not documented in the tagged text spec, so I'm not sure why you'd be including it.

                                         

                                        Hopefully this is helpful though?

                                        • 17. Re: Import ID tagged text file results in paragraph style overrides
                                          Joel Cherney Adobe Community Professional & MVP
                                          This IDTT file gives the goofy overrides:

                                           

                                          <SJIS-WIN>
                                          <Version:6><FeatureSet:InDesign-Japanese>
                                          <ParaStyle:Entry\:HEADING><CharStyle:ENTRY\:MAIN\_ENTRY>foobar
                                          

                                           

                                          And this one does not:

                                          <SJIS-WIN>
                                          <Version:6>
                                          <DefineParaStyle:Entry\:HEADING=>
                                          <ParaStyle:Entry\:HEADING>foobaz
                                          

                                           

                                          I'm still a little confused since I thought you were generating the IDTT file yourself? But the FeatureSet: tag is not documented in the tagged text spec, so I'm not sure why you'd be including it.

                                           

                                          Hopefully this is helpful though?

                                           

                                          John is about fifty million times better than I at this kind of troubleshooting, but I may be able to contribute something here. I have saved a rant (somewhere in my poorly-maintained archives) from some localization listerv by a Japanese typesetter about Japanese tagged text in InDesign, and I think that the content may be relevant here. The gist of the rant was that there were features that were poorly documented in the Japanese documentation, and that were not mentioned at all in the English documentation. Japanese ID has a wide variety of typesetting tools not implemented in English ID (or implemented but hidden, I dunno) so I would be unsurprised if IDTT generated by Japanese ID, or by someone writing a tool to generate INTT for Japanese ID, failed upon import into any other version of InDesign. Looking at the stuff on pastebin I see tags like "DefineMojikumiStyle" that do not appear in any English-language INTT documentation I can find.

                                           

                                          So: are you trying to place this tagged text into English ID, or Japanese ID? Can you tell us what tool you're using to generate the tagged text? Is it an in-house tool or a commercial product? Is it really the best way to do this? Some of the regulars here <cough> don't like using XML import in InDesign, and it does have some flaws, but heck, if I needed to get a kanji reading dictionary out of a database and into ID, I'd want XML-tagged raw Unicode text spat out of that database. Just a thought; much easier to tag up with XML than to generate valid IDTT, it seems. (To the casual observer, anyhow.) On the other hand, it may be much easier to just lay your hands on a license for Japanese ID and try the tagged text import there to see if it works - unless I've been mislead by your English-language-interface screenshots and you are working in Japanese ID, in which case you can safely ignore pretty much everything I've said.

                                           

                                          There's also a Japanese-language InDesign forum where there may be people more knowledgable about this issue.

                                          • 18. Re: Import ID tagged text file results in paragraph style overrides
                                            Harold Sensei Level 1

                                            John, Joel,

                                             

                                            These are very helpful posts. First the import that John shows has gone awry. The resulting characters are not proper Japanese. The first line in the IDTT specifies the encoding &lt;SJIS-WIN&gt; so I would have thought that would have prevented that kind of encoding misrecognition. By chance, are you on a Mac? Thus the error messages related to the import are probably not important in that if the character encoding is not recognized, all bets are off. With mutibyte characters, if the character encoding is not recognized then the backspaces with wreak hovoc.

                                             

                                            First we need to solve the encoding problem. I could export in Unicode or mock up an example using ASCII  characters, but want to be careful about taking too many steps away from my problem.

                                             

                                            I am running the Japanese version of ID CS4. I have two copies, one on a desktop with a Japanese UI. One on a laptop which I followed an Adobe post about how to change the UI into English. (It involved a registry modification) I had used that version for clarity in posting. I will discontinue the use of the Japanese version with EN UI, just to remove variables from the equation. So moving forward in this debugging exercise, it will be all Japanese.

                                             

                                            So the IDTT was produced by a Japanese ID program and you can see the mojikumi tags. (Mojikumi adjusts spacing for punctuation characters. Normally, all characters will be full width (like a square box), but this gets rids of extraneous space)

                                             

                                            I will investigate those forums and get back.

                                             

                                            The problem is exhibited whether I use generated IDTT (my own program) or write out a sample and try to Place it (all ID)

                                            • 19. Re: Import ID tagged text file results in paragraph style overrides
                                              John Hawkinson Level 5

                                              I think Joel is modest, but he's also more than fifty-million times better than I am at these non-Roman characters...

                                               

                                              Joel asks good questions, but he also says:

                                              if I needed to get a kanji reading dictionary out of a database and into ID, I'd want XML-tagged raw Unicode text spat out of that database. Just a thought; much easier to tag up with XML than to generate valid IDTT, it seems. (To the casual observer, anyhow.)

                                              I would indeed disagree. Getting InDesign to deal with XML is a pain, and it's not self-contained, and without scripting, it is quite limited in the formatting it can apply. You can't produce an XML file that defines a paragraph style, or centers some text, or baseline shifts a few letters, etc. You can get these effects by using paragraph and character styles that already exist in the document, but that can be annoying to accomplish, and also confusing for the user who imports it.

                                               

                                              Getting IDTT to work right can be a bit tricky, but usually you should just be able to export the example you want, adjust it, and then re-import it. (Or build a tool that clones it).

                                               

                                              Both IDTT and XML are equally Unicode-saavy.

                                              • 20. Re: Import ID tagged text file results in paragraph style overrides
                                                John Hawkinson Level 5

                                                I am on a Mac...it might also be pastebin.com's fault. I wouldn't worry too much about the encoding problem unless you yourself see it.

                                                But your IDTT file should probably use <UNICODE-WIN> for maximum portability...

                                                 

                                                I'd like to know whether removing the Japanese feature set marker eliminates your problem...

                                                • 21. Re: Import ID tagged text file results in paragraph style overrides
                                                  Harold Sensei Level 1

                                                  I have drafted a new example from scratch, discarding all the previously defined character and paragraph samples. This example has no Japanese characters. I saved the IDTT using ASCII character encoding. Still seeing the same problem. Could this be a bug in the Japanese ID? Screenshot follows.

                                                  • 23. Re: Import ID tagged text file results in paragraph style overrides
                                                    John Hawkinson Level 5

                                                    Again, the problem is what precisely? Or as I asked before, "Which of these, if any, are wrong?"

                                                     

                                                    I do see goofy overrides placing your new IDTT file. If I remove the "<FeatureSet:InDesign-Japanese>" I do not see goofy overrides.

                                                     

                                                    What happens when you remove it?

                                                    • 24. Re: Import ID tagged text file results in paragraph style overrides
                                                      Harold Sensei Level 1

                                                      I don't recognize any of those being wrong, per se. I have the file on another computer, so I mocked up yet another one. Sorry

                                                      Again in this one I did ASCII export, no fancy characters. And this one demonstrates the problem, too. I have two kinds of paragraphs. A big one and a small one. I create those paragraph styles. I select the only two lines in the file. Export and then bring them in underneath themselves to compare.

                                                       

                                                      The paragraph styles for the newly Placed paragraphs are gone. The font color is the same. But the font size and font have not changed.

                                                      I manually edited the IDTT and removed the <Japanese feature> tag. Placed it again. Font color is the same, but the size and font are wrong.

                                                      In other words, my problem is that ID does not seem to apply the paragraph style to the text when it is imported. Aren't the font size and font defined in the Paragraph Style?

                                                       

                                                      My end goal is to define some paragraph styles and create the IDTT automatically from a database. My hope was that the paragraphs would be formated properly based on the predefined styles when the IDTT comes in. I cannot get it to do this even for a pared down example. Aren't other users doing this?

                                                       

                                                      Here is the IDTT on pastebin (with the <Japanese...> tag removed)

                                                      http://pastebin.com/Vdc6NVDV

                                                       

                                                      And what it looks like after the intial Place with <Japanese...> tag in, edited line from Small to "Deleted Japanese feature...", removed tag from IDTT and then did another Place.

                                                      Bangfinger2.PNG

                                                      • 25. Re: Import ID tagged text file results in paragraph style overrides
                                                        John Hawkinson Level 5

                                                        Well, when I place your IDTT file, I get a problem tag error about a style definition from <30C7> but it imports fine with Big Paragraph Style and Small Paragraph Style and no overrides. So I conclude this is something wrong with the Japanese version of InDesign.

                                                         

                                                        In case it wasn't clear, I'm just using the US English version of ID.

                                                         

                                                        I think I could scrape up a Japanese CS5 install, but it'd probably be easier for Joel if he has it kicking around? [Joel?]

                                                        • 26. Re: Import ID tagged text file results in paragraph style overrides
                                                          Harold Sensei Level 1

                                                          Joel, John,

                                                           

                                                          I found the answer. I had an InDesign expert in house yesterday and after some experimentation,

                                                          he determined the root cause to be the グリッドフォー的の適用 / Apply grid layout button was checked

                                                          on the import.With this check box unselected, the text and formats come in cleanly. It never occurred

                                                          to me to uncheck this as I associate it with the placement of images.

                                                           

                                                          Thank you both for your efforts.

                                                           

                                                          Harold