Soft return in tagged text file

Hi, anyone has example of using a End of line (soft return)  in tagged text file?
i tried using <0x000A> but it does not work. Advice needed.
Tkz

So it does. It also drops it if you export in GB 18030. I would file a bug report:
https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Only workaround I can think of would be to enter some other unique character (maybe |?) and find/replace it in ID after bringing in the tagged text.
Ken
Hold on, I tried exporting tagged text and then bringing it back in. It's not dropping the forced line break. It's exporting it as a single Line Feed (hex 0a). And it interprets that as a forced line break when importing back in. My text editor ignores Line Feeds. I had to look at it in a hex editor to see the 0a.
I don't know if that helps any. However you're producing the tagged text, you would need to be able to make it enter a line feed without the carriage return.
Ken

Similar Messages

  • Soft Returns in Tagged Text

    Our Pindar AgilityCMS content managment system flows text to an InDesign page using a special PlugIn.
    Some characters are stored natively (store an "a", get an "a" on the page), while other special characters are stored using Tagged Text or Unicode. A return can be either <0x000D> or \u000D. This is especially useful because we can output through one of four "channels".... InDesign, Quark, HTML or as entered in the content manager. The return can now be \p in Quark or <BR> in HTML.  A non-breaking space, for example, can be \u00A0 in the InDesign channel, &nbsp; in HTML or <\!s> in Quark. When we insert the "special character" in the Data Editor of our content system, it might be displayed as [sp], but it will resolve correctly regardless of which channel we publish to.
    The problem is that unlike Quark, Adobe does not provide for a "soft return" or forced line break. Sure, you can type one from the keyboard with shift+return, and purists will argue that you'd never want to store a soft (discretionary) return in any type of tagged text or a content management system. However, all our text is set flush left, ragged right, and we frequently want to force line breaks for readability, and do so consistently.
    Instead of:
    On Sale Now Buy One, Get
    One Free
    we always want
    On Sale Now
    Buy One, Get One Free
    Again, this is a problem whether you store your data in simple tagged text files, or if you bring it in via a complex PlugIn, as we do.
    There are many, many threads on this site and elsewhere that discuss this shortcoming. Does Adobe plan to support Soft Returns in Tagged Text with some kind of special tag?

    Your question is predicated on some false assumptions, and I'm afraid Peter, Peter, and Stix didn't quite pick that up in their replies. (This gives me pause since normally they're all very detail-oriented).
    As I told you when you posted in the thread from 2009, "InDesign Tagged Text supports forced line breaks just fine."
    You write:
    Does Adobe plan to support Soft Returns in Tagged Text with some kind of special tag?
    Adobe's import mechanism does indeed support soft returns. There's no need to speculate on Adobe's plans, which is the direction the other replies went to.
    With that in mind, let's move to your actual question:
    Our Pindar AgilityCMS content managment system flows text to an InDesign page using a special PlugIn. 
    Some characters are stored natively (store an "a", get an "a" on the page), while other special characters are stored using Tagged Text or Unicode. A return can be either <0x000D> or \u000D. This is especially useful because we can output through one of four "channels".... InDesign, Quark, HTML or as entered in the content manager. The return can now be \p in Quark or <BR> in HTML.  A non-breaking space, for example, can be \u00A0 in the InDesign channel, &nbsp; in HTML or <\!s> in Quark. When we insert the "special character" in the Data Editor of our content system, it might be displayed as [sp], but it will resolve correctly regardless of which channel we publish to.
    I think you need to address this question to your support channel for Pindar AgilityCMS. Indeed, in IDTT <000A> represents a shift-return. Here's a screenshot of a test textframe:
    and when exported to InDesign Tagged Text, it produces:
    <ASCII-MAC>
    <Version:7><FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
    <DefineParaStyle:NormalParagraphStyle=<Nextstyle:NormalParagraphStyle>>
    <ParaStyle:NormalParagraphStyle>Paragraph one
    <ParaStyle:NormalParagraphStyle>Paragraph two<0x000A>P2/Line two
    I presume you have tried <0x000A> as discussed in the prior thread.
    I suppose it's remotely possible this is a Mac/PC issue, because the two operating systems do you different line break characters.
    Anyhow, once again, your criticism of InDesign and Adobe is false and unfair. And if you have a problem with a 3rd party plugin, those are really the people you need to talk to.
    Still, it might be wise to get it working with plain File > Place. Try testing my above IDTT file. Or exporting your own from a sample textframe like the one I used.

  • How do I import an InDesign tagged text file into multiple pages and export as .ps or .pdf using Jav

    I have an InDesign tagged text file I've translated from .xml. I need to automate the following steps:
    1 - access specific InDesign template (eg. ABC_template.ind)
    2 - import tagged text file into InDesign
    3 - autoflow text to END of document (normally around 3-5 pages)
    4 - save document as either .ps or .pdf file
    5 - where the input file stub name matches the output stub name (eg., OrigName.txt outputs as OrigName.pdf).
    I would like to completely automate this whole process using JavaScript (because I don't know anyone that knows AppleScript). I've automated the first part using a perl script. I've been trying to find sample snipits of JavaScript that would do one or more of the items listed above, but am having a hard time finding what I need.
    Please, I'm desperate!! Can any of you InDesign scripting guru's out there help me??
    Thanks in advance!!
    LindaD

    Hi Linda,
    I might be able to help you out. You can contact me by email (click on my user name for the address), or if you post your email here.

  • Linked Adobe Tagged Text files importing without styles

    I have several data-heavy weekly publications where suddenly, the link to all Adobe Tagged Text format files have the proper paragraph styles and character styles stripped on being placed.  I'm aware of the default settings issue, where you deselect all and make sure the character styles is none, and that does not seem to be the issue. Specifics are
    Working in CS 5 (Version 7.0.4)
    The Adobe Tagged Text format files are exported from Excel spreadsheets
    The InDesign documents have links to the Adobe Tagged Text format files, and Update Link is used inside InDesign to update the text when the file is exported from the spreadsheet.
    When the publications are opened on my workstation, ALL files linked to Adobe Tagged Text files are not imported correctly, they revert to the Basic Paragraph style.
    These are not new documents I'm designing or new Adobe Tagged Text files, this is part of a production process that has worked without issue for years.
    When the same documents are opened on another workstation, and Update Links used, they come in perfectly, so it doesn't seem to be a document or file corruption problem, but a problem with my environment or ID settings.
    It's not one specific document or file, it is every single document that has a link to an Adobe Tagged Text file (and we have lots, I tried several!)
    I've opened the text files in the text editor to check them, but as I mentioned: same document, same files, I'm the only one who can't update without stripping out the styles.
    Thanks! Nancy

    Hi, Peter! Thanks for the response. Yes, it's really Tagged Text. See below. After exporting from the spreadsheet and database, opening the document in InDesign, and selecting update link, we do no editing in InDesign after the fact because everything is already setup exactly as we want it with the Tagged Text format.
    I have literally hundreds of these among several different documents, updated weekly, mainly dealing with prices and numbers. Every one of the links to Tagged Text format files in every publication now strips out the Tagged Text paragraph style and character style formatting on Update Link on my workstation only. On my other two workstations, the links update without issue, and everything is correct in the final document.
    So I'm beginning to think I need to look at rebuilding something, maybe as Joel said, replacing preferences. I keep looking for a workstation or ID option that might effect this.
    <ANSI-WIN>
    <vsn:6><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
    <dps:Pnl Comp\:Pnl Comp \$Numbers=<Nextstyle:Pnl Comp\:Pnl Comp \$Numbers>>
    <dps:Pnl Comp\:Pnl Comp Bold \$Numbers=<BasedOn:Pnl Comp\:Pnl Comp \$Numbers><Nextstyle:Pnl Comp\:Pnl Comp Bold \$Numbers>>
    <dps:Pnl Comp\:Pnl Group \$Numbers=<BasedOn:Pnl Comp\:Pnl Comp \$Numbers><Nextstyle:Pnl Comp\:Pnl Group \$Numbers>>
    <pstyle:Pnl Comp\:Pnl Comp Bold \$Numbers> $302 $302 $278
    <pstyle:Pnl Comp\:Pnl Group \$Numbers> 203 202 211
    <pstyle:Pnl Comp\:Pnl Group \$Numbers> 456 458 393

  • Import ID tagged text file results in paragraph style overrides

    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

    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.

  • Multiple Hyperlinks in Tagged Text file

    Hi,
    I'm currently exporting a contact directory database from sql into tagged text so I can import it into InDesign and format it up automatically and unltimately export as pdf.
    So far I have got all the formatting working exactly as I want it to by reverse enginerring an exported file, but now I want to make all the e-mail addresses into hyperlinks.
    I;ve included below an example of what i'm now importing into InDesign, all works and is formatting ok but the hyperlinks aren't being transferred properly.
    Please could somebody advise me on the correct syntax on how to do the above, as I've read the tagged text user guide which gave me the headings to use but now an example of how to make a hyperlink.
    One thing worth mentioning is that I am creating the number in the "HyperlinkDestKey" sequentially when outputting the text, not sure if this might have some bearing on the problem. Also open to any suggestions on trimming unncessary tags from the hyperlink too.
    <ParaStyle:Quick Reference\:Company Grey>248A<0x2002>Company 1<0x0009>00
    <ParaStyle:Quick Reference\:Quick ref text>Tel: 1 23 456 789<0x2002>Fax: 1 123 456 789
    <ParaStyle:Quick Reference\:Quick ref text>Emergency Number - Tel: 123 456 798
    <ParaStyle:Quick Reference\:Quick ref text>Pro:<0x00A0>Mr.<0x00A0>Jo<0x00A0>Bloggs<0x2002>PRO Email<0x00A0><Hyperlink:=<HyperlinkName:jobloggs\@company1.com><HyperlinkDest:mailto\:job loggs\%40company1.com\?subject\=><HyperlinkDestKey:3><CharStyleRef:><HyperlinkLength:21><H yperlinkStartOffset:0><Hidden:0><BrdrVisible:0><BrdrWidth:Thin><BrdrHilight:None><BrdrStyl e:Solid><BrdrColor:0\,0\,0>>[email protected]
    <ParaStyle:Quick Reference\:Company Grey>248B<0x2002>Company 2,Los<0x00A0>Angeles<0x0009>00
    <ParaStyle:Quick Reference\:Quick ref text>Tel: 123456789<0x2002>Fax: 12345679
    <ParaStyle:Quick Reference\:Quick ref text>Emergency Number - Tel: 123456798
    <ParaStyle:Quick Reference\:Quick ref text>Pro:<0x00A0>Ms.<0x00A0>Freda<0x00A0>Jones<0x2002>PRO Email<0x00A0><Hyperlink:=<HyperlinkName:fjones\@company2.com><HyperlinkDest:mailto\:fjone s\%40company2.com\?subject\=><HyperlinkDestKey:4><CharStyleRef:><HyperlinkLength:19><Hyper linkStartOffset:0><Hidden:0><BrdrVisible:0><BrdrWidth:Thin><BrdrHilight:None><BrdrStyle:So lid><BrdrColor:0\,0\,0>>[email protected]
    <ParaStyle:Quick Reference\:Company Grey>248C<0x2002>Company3,New<0x00A0>York<0x0009>00
    <ParaStyle:Quick Reference\:Quick ref text>Tel: 987654321<0x2002>Fax: 987654321
    <ParaStyle:Quick Reference\:Quick ref text>Emergency Number - Tel: 987654321
    <ParaStyle:Quick Reference\:Quick ref text>Pro:<0x00A0>Mrs.<0x00A0>Darlena<0x00A0>McManus<0x2002>PRO Email<0x00A0><Hyperlink:=<HyperlinkName:dmcmanu\@company3.com><HyperlinkDest:mailto\:dmcm anu\%40company3.com\?subject\=><HyperlinkDestKey:5><CharStyleRef:><HyperlinkLength:20><Hyp erlinkStartOffset:0><Hidden:0><BrdrVisible:0><BrdrWidth:Thin><BrdrHilight:None><BrdrStyle: Solid><BrdrColor:0\,0\,0>>[email protected]
    Kind Regards
    Steve Tucker

    So it does. It also drops it if you export in GB 18030. I would file a bug report:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Only workaround I can think of would be to enter some other unique character (maybe |?) and find/replace it in ID after bringing in the tagged text.
    Ken
    Hold on, I tried exporting tagged text and then bringing it back in. It's not dropping the forced line break. It's exporting it as a single Line Feed (hex 0a). And it interprets that as a forced line break when importing back in. My text editor ignores Line Feeds. I had to look at it in a hex editor to see the 0a.
    I don't know if that helps any. However you're producing the tagged text, you would need to be able to make it enter a line feed without the carriage return.
    Ken

  • Pre-tagging text files for FrameMaker 11

    In older versions of FrameMaker I used to be able to pre-tag a text/data file using @tag name=[paratext] at the beginning of a paragraph so that when the file was imported to a FrameMaker template, the specified tag would be applied automatically and I didn't have to apply the tags manually. This doesn't seem to work any more, but I can't believe this feature is no longer available. How do I do the same thing for FrameMaker 11 please?

    The include statement at the top of an MML file is optional, but handy if you do a lot of MML work and always use the same styles. For occasional work or document with a "novelty" style-set, it's enough to put a <!DefineTag> slug at the top of the MML source for each style. Just remember to start the file with <MML> – the FM import scrutinises the file rather than relying on the extension – and to save it as ANSII. Oh, and I've noticed/learnt that if you don't leave a blank line between each tagged paragraph in the input, FM adds a space at the end of the paragraph. (showing my age – I've been sternly warned against increasing file-size with this sort of thing)
    I use MML a lot, for cleaning up – erm – enthusiastically formatted or completely unformatted .doc files, and apart from missing support for tables I find it a valuable blade on my FM Swiss Army knife <g> Minimal work with a text editor can convert an MML file into tagged text suitable for InDesign. Haven't had the occasion to experiment with IDD to MML, but who knows … that might work too.
    Just for completeness, a small example:
    <MML>
    <!DefineTag :h2>
    <!DefineTag :p>
    <!DefineTag :ul>
    <!DefineTag :ul_2>
    <:h2>System requirements – disk space
    <:p>A minimum of 1Gb free disk space is recommended.
    <:ul>around 250 MB for Java
    <:ul>around 12 MB for a fresh Tomcat Server installation
    <:ul>around 23 MB for KEY LOADING SERVER files
    <:ul>additional space for
    <:ul_2>Tomcat Server working files
    <:ul_2>KEY LOADING reports
    <:ul_2>log files (space depends on the trace level and clean up policies adopted)

  • Writing new lines or carrige returns to a text file

    I am try to use either FileOutputStream or FileWriter to write a String to a text file. Only any \n or \r characters within
    the string open as square blocks in notepad when the string is writen, and all the text is on one line.
    example code:
    FileWriter writer = new FileWriter(name + ".txt", false);
    String writeString = "Name: " + name + "\nSurname: " + surname;
    writer.write(writeString, 0, writeString.length());
    I am using Win98.

    Notepad is a Windows-bigoted program and requires \r\n to denote the end of a line. (Or is it \n\r? Can't remember.) If you only give it \n (as in your example) it doesn't understand and displays those boxes. Other Windows text editors do a better job.
    If you wrap your FileWriter in a PrintWriter, then you can just use its "println" method, which will take care of line-ending characters for you (it understands which OS you are running under and writes whatever combination of \n and \r is appropriate). Like this:FileWriter writer = new FileWriter(name + ".txt", false);
    PrintWriter printer = new PrintWriter(writer);
    String writeString = "Name: " + name;
    writer.println(writeString);
    writeString = "Surname: " + surname;
    writer.println(writeString);

  • How to write a return in a text file.

    Hi, i am trying to write diferent lines into a text file, i write strings ending with \r\n but it doesn't work, how could i write in diferent lines?
    Thanks.

    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("myfile.txt")));
    out.println("This is the first line");
    out.println("This is the second line");
    out.flush();
    out.close();Jesper

  • Return character in text file

    I have a JTextArea. I read a file and place the contents into the textArea. The user can change the text in the textArea. The user can then save changes to the text file.
    To write to the text file I use:
    writer = new PrintWriter(new BufferedWriter(
    new FileWriter(path)));
    writer.print(textArea.getText());
    writer.flush();
    writer.close();
    The new file is written correctly except for whereever there is an
    <ENTER> key press, it prints a block like character (a rectangle) instead of going to the next line.
    Anyone know the answer to solving this one, I will greatly appreciate the help.
    Thanks, Jason

    You can do this (it works essentially like the "/r/n", but is platform independant (Use code at your own discretion) :
      public void formatAndWrite(String txt)  throws IOException {
        BufferedWriter buffy = new BufferedWriter(
                               new FileWriter("out_stuff.txt"));
        char[] chars = txt.toCharArray();
        StringBuffer text = new StringBuffer("");
        String lineSep = System.getProperty( "line.separator" );
        for (int i=0; i<chars.length; i++) {
          if ( chars[ i ] == '\n' ) {
            text.append(lineSep);
          else {
            text.append(chars[ i ]);
        buffy.write(new String(text));
        if ( buffy != null ) {
          buffy.close();
      }... figure the String text argument that the method takes comes from the TextArea.
    ~Bill

  • Importing Tagged Text Files

    Working in MAC ID CS5 and pulling in text from a Windows based database that places tags automatically with the information it pulls.  Using <

    Shoot! Yes, I had typed in my code and it stopped at that.
    "Working in MAC ID CS5 and pulling in text from a Windows based database  that places tags automatically with the information it pulls.  Using Unicode tagging direct to TextEdit and saving as Unicode (UTF-16).  When placed in ID it either gives Boxes with x's in them, text only or response in below pic.  Is there a specific way to save, code or place that I am not seeing.  Where are the "rules" from ID on this.  We used Quark before and it was so simple.

  • Tagged text export unicode

    hi,
    is there any possibility to set the ITaggedTextImportPreferences before exporting to a tagged text file with an IExportProvider?
    i need to export it in Unicode, but default is ASCII.
    best regards

    As far as I can tell, this isn't a new bug in as much as InDesign CS3, CS4, CS5 and CS5.5 (Mac) all exhibit the same problem exporting soft-returns in Unicode encoded Tagged Text where they are replaced with hard returns on import. Unfortunately it appears that we may be the only ones that care and thus it's unlikely that Adobe will fix it (unless someone adopts it as a JDI bug).
    Update: after testing some more it appears this is an export bug for Mac OS-only. In other words, if you use a PC to export a story that contains soft-returns to Tagged Text (Unicode), the soft-returns are preserved when placing into a document using a Mac. And vice-versa, using a Mac to export a story with soft-returns to Tagged Text (Unicode) and then placing this into a document using a PC exhibits the same substitition of soft-returns for hard-returns.
    Message was edited by: Caleb Clauset

  • Soft returns not importing

    Hi. I recently impoterd a Frame 7.1 Chapter into RoboHelp
    HTML 8.0 and everything worked okay with the exception of soft
    returns. For some reason it didn't import these and I was left with
    large strings of test which I had to fix by hand. Any ideas? Thanks
    in advance

    As far as I can tell, this isn't a new bug in as much as InDesign CS3, CS4, CS5 and CS5.5 (Mac) all exhibit the same problem exporting soft-returns in Unicode encoded Tagged Text where they are replaced with hard returns on import. Unfortunately it appears that we may be the only ones that care and thus it's unlikely that Adobe will fix it (unless someone adopts it as a JDI bug).
    Update: after testing some more it appears this is an export bug for Mac OS-only. In other words, if you use a PC to export a story that contains soft-returns to Tagged Text (Unicode), the soft-returns are preserved when placing into a document using a Mac. And vice-versa, using a Mac to export a story with soft-returns to Tagged Text (Unicode) and then placing this into a document using a PC exhibits the same substitition of soft-returns for hard-returns.
    Message was edited by: Caleb Clauset

  • Tagged Text in InDesign 5.5

    I posted this in the general discussion and was pointed to scripting.
    I use tagged text in the files I place
    in InDesign. For example,
    <cn>This is the chapter number
    <ct>This is the chapter title
    <cst>This is the chapter subtitle
    <bt>This is the beginning of the body text
    <ah>This is an A-level head
                    and so on. In PageMaker, there was a checkbox in the "place"
    dialogue box named "Read tags." I checked that, and when I placed the file in the template (in which I had the styles defined), the whole chapter appeared with the formatting I wanted for each style. I could use anything I wanted for a text tag, as long as it was in <>. If it wasn't defined in the PM document, it came in in the basic style but could be formatted on the fly in PageMaker.
                    I can't find the equivalent checkbox in InDesign. I can't believe it is no longer there, but I can't find it. There is a lot online about exporting tagged text, but where, oh where, is my checkbox for placing tagged text? If someone knows where it is, I'd be very grateful. It seems that such a great (and incredibly easy) function shouldn't be gone.
    Thanks (and apologies to those who already saw this in the general discussion),

    Well, not quite four hours, but yes, I couldn’t get it to work. For one thing, I wasn’t sure about the header to use, since I’m on Windows. I used <ASCII-WIN>
    <Version:7><FeatureSet:InDesign-Roman>
    <pstyle:ah>
    <pstyle:ah_bib>
    <pstyle:bib>
    <pstyle:bh>
    <pstyle:bl>
    <pstyle:bl_ext>
    <pstyle:bt>
    <pstyle:bt_fl>
    <pstyle:cn>
    <pstyle:ct>
    <pstyle:cst>
    <pstyle:epi>
    <pstyle:epi_source>
    <pstyle:ext>
    <pstyle:ext_1stpara>
    <pstyle:ext_2dpara>
    <pstyle:fn>
    <pstyle:fn_2dpara>
    <pstyle:poem>
    <pstyle:poem_1st>
    <pstyle:poem_last>
    I added the above to one of my tagged text files and saved it from Word as .xml. When I brought it into InDesign, I got a sidebar with a couple of entries, one of which expanded to several “parts.” There was nothing in the template until I double clicked (I think that’s what I did; maybe right clicked) one of those sidebar items and placed the text. It came it as one long file with no returns and no formatting. The tags remained as text.
    I came back to the Internet and found an article by Peter Kahrel entitled “A GREP queries manager.” OK, I admit I didn’t understand much of it, but the notion of chaining queries sounds good.
    I did the Lynda.com tutorials when I was first ordered to make the change to InDesign (last month). I found them very helpful, but if they have anything on this, I missed it. Maybe I was too busy figuring out how to turn pages, find things on the pasteboard, and determine what character styles are and why I have to use them J
    “Not hard”? Um, what is the etiquette for asking you to do this task for me? I’m assuming that once I had a script in hand, I could add new paragraph styles by mimicking the entries. Is that right? Would it really be as easy as opening all the files and running the script to make the changes throughout? That sounds wonderful. Even running it on one at a time would be a great improvement. Do I need to contact you off list, and, if so, how?
    Thanks . . . yet again.

  • Problems importing tagged text

    IDD CS5.5, 7.5.2
    what I do
    prepare IDD tagged text file, using DOS/Windows line ends and ANSII encoding
    open IDD CS5.5 file with formatted content
    select all content
    File > Place InDesign tagged text file, using "show list of problem tags" option
    what I get
    no angle brackets imported, no errors in the list of problem tags …
    74 paragraphs, all using the first paragraph style specified in the tagged text
    I wish IDD tagged text were as easy to get on with as FrameMaker's MML … that would also make it easier for me to start with one tagged source file and use the content in different applications with a minimum of effort. Any tips on _exactly_ what has to be done to placate the IDD Import goblins welcome!

    Give this script a try:
    // DESCRIPTION: This InDesign script reads the tags of an imported MML file and applies their corresponding paragraph styles.
    // USAGE: Place the MML file in InDesign. Using the Text tool, select all or part of the imported text. Run this script.
    var myDocument = app.activeDocument;
    if (app.documents.length != 0){
    //If the selection contains more than one item, the selection
    //is not text selected with the Type tool.
    if (app.selection.length == 1){
    //Evaluate the selection based on its type.
      switch (app.selection[0].constructor.name){
       case "Character":
       case "Word":
       case "TextStyleRange":
       case "Line":
       case "Paragraph":
       case "TextColumn":
       case "Text":
        convertMML(app.selection[0]);
       break;
       default:
        alert("Please select all or part of the text using the Text Tool.");
       break;
    } else {
      alert("No valid selection.");
    function convertMML(theSelection) {
    // this sequence collects the names of the paragraph styles in the MML file
    var theContent = theSelection.contents;
      var theParagraphs = theContent.split("\r");
      var theParagraphStyles = [];
      for (var i = 0; i < theParagraphs.length; i++) {
        if (theTag = theSelection.paragraphs[i].contents.match(/<!DefineTag (.+?)>/)) {
          theParagraphStyles.push(theTag[1]);
    // ********* this sequence adds dummy paragraph styles in the document, if necessary
    for (var i = 0; i < theParagraphStyles.length; i++) {
      var currentStyle = theParagraphStyles[i];
            try { myDocument.paragraphStyles.add({ name: currentStyle }) } catch(err){};
    // ********* This sequence set the preferences of the Grep queries
    app.findChangeGrepOptions.includeFootnotes = true;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    // ********* The action begins here
    // ********* This sequence removes spaces and/or TABs in the beginning of the lines
    app.findGrepPreferences.findWhat = '^\\s+';
    app.changeGrepPreferences.changeTo = '';
    myDocument.changeGrep();
    // ********* This sequence consolidates multiple paragraph returns into one
    app.findGrepPreferences.findWhat = '\\r\\r+';
    app.changeGrepPreferences.changeTo = '\\r';
    myDocument.changeGrep();
    // ********* This sequence removes the header and the paragraph declarations
    app.findGrepPreferences.findWhat = '((^<MML>\\r)|(^<!DefineTag .+?>\\r))';
    app.changeGrepPreferences.changeTo = '';
    myDocument.changeGrep();
    // ********* Now that everything is cleared up and in place, we can make the required changes
    for (var i = 0; i < theParagraphStyles.length; i++) {
      app.findGrepPreferences = NothingEnum.nothing;
      app.changeGrepPreferences = NothingEnum.nothing;
      var currentStyle = theParagraphStyles[i];
      var theGrepString = '^<' + currentStyle + '>';
      app.findGrepPreferences.findWhat = theGrepString;
      app.changeGrepPreferences.appliedParagraphStyle = myDocument.paragraphStyles.itemByName(currentStyle);
      myDocument.changeGrep();
      app.findGrepPreferences = NothingEnum.nothing;
      app.changeGrepPreferences = NothingEnum.nothing;
      app.findGrepPreferences.findWhat = theGrepString;
      app.changeGrepPreferences.changeTo = '';
      myDocument.changeGrep();
    It worked in your sample. To install it, select the text between the multi-hyphens lines, copy it to a text editor, save it with the ".js" or ".jsx" extension and put it on your Scripts Panel folder.
    To run it, place the MML in InDesign as unformatted text, select everything with the Text tool and double click the script in the Scripts panel. All the tags will be eliminated and the paragraphs will be formatted according with the MML tags. Be aware that this script doesn't contemplate character styles and any other formatting; only paragraph tags, like your sample.
    Hope it helps.

Maybe you are looking for

  • Two  iPods on one account?

    Aloha All, I'm buying a second iPod as my wife frequently borrows mine (she has no interest in using a computer) and I'm wondering if iTunes will support both my existing iPod and the second one I'm buying. I see no sense in having two separate accou

  • How do I enable root in OS X 10.8.3?

    I need the ability to change file ownership and location.  Having used migration assistant to copy a bunch of stuff from my Windows machine to my Mac, I have many directories of files that are now owned by other 'users'.  The migration tool requires

  • Are there any additional Captivate themes available?

    I have been tasked with designed and producing a series of e-learning courses and although I have ID experience, I am not a graphics designer. There are a handful of themes available in Captivate 8, but I was hoping to have a wider selection. Are the

  • MacBook Pro Retina '15 OS X 10.8.2 cannot display HD movies through projector

    I have a new MB Pro retina '15 that I use in the classroom via projector. A few movies I have in my iTunes are HD, but when I attempt to view them a message reads that iTunes cannot display HD. As far as I can tell all of the SD films can be displaye

  • EPS file opens as code language on Mac CS4 and CS3

    A client is providing us with some art work for packaging material in EPS format. The Illustrator CS4 and CS3 open these files as some kind of Code language. This is how it looks like on my illustrator window ( saved as PDF and copy pasted a portion