is now part of CreativePro.com!

InDesign Tagged Text is Not XPress Tags

33

Tagged text is to typesetting as HTML is to a Web page. That is, it’s a bunch of codes around text that gets interpreted/converted into something pretty, something WYWIWYG. I used to love tagged text, back in the old Quark XPress Tags days. I came up with all kinds of cool solutions for managing and massaging test with tags. Even before that, people were doing cool stuff with PageMaker’s tagged text system (PMtags).

For example, one common use for tagged text was to allow someone with very little computing power (say, someone on an old 286 computer) to type fully-formated text with codes. They could type the name of a style at the beginning of each paragraph (such as “@head1:”) and that style would be applied when the txt file was imported into the page-layout program.

Even better, you could easily get a database or spreadsheet to spit out normal ASCII text with the proper codes in it so that it would be formatted when it was placed in QX. It was awesome!

But then came InDesign. InDesign has a tagged text system called (incredibly!) InDesign Tagged Text. It even works. Mostly. However, while I can’t point to any specific problems, I always the sense that it’s somewhat buggy and just barely held together with duct tape. I certainly don’t get the sense that anyone at Adobe thinks of it often or fondly.

And yet, it still has its fans, and they still email us asking what on earth to do, now that they’re using InDesign.

The best piece of advice I can offer is, if you can afford it, get xTags from Em Software. This venerable software was originally written for XPress, but now they have an InDesign version, too. It basically lets you import XPress Tags into InDesign (in case you still have old XPress Tags files, or systems based on them). But it supports many more tags than just those from XPress (it has it’s own tagging codes beyond those from QX).

If you don’t want to standardize on xTags, then you can probably figure out InDesign’s Tagged Text system reasonably well by reading their PDF documentation. I’m honestly not sure if they ship those docs on the install discs anymore, but you can find them here.

With that information, I can see that I can type this in a text file:

taggedtext2

And when I import it into InDesign, the program will apply the “head1” paragraph style to the paragraph.

One great way to figure out tagged text codes is to export some example text from InDesign. Just select some text, choose File > Export, then choose InDesign Tagged Text from the Export dialog box. InDesign will offer you a few options, but you’ll likely just want to use Verbose (a.k.a. “mostly human readable”):

taggedtext1

Here’s a couple other helpful hints, culled from Real World InDesign CS3:

  • While you do not need to include the DefineParagraphStyle tags in the heading of the file, it’s a good idea to do so. If you don’t, and then import the tagged text file into a document that does not contain the styles referred to in the tagged text file, InDesign will not associate the paragraphs with the style.
  • While PageMaker and QuarkXPress paragraph style tags don’t require that you tag each paragraph, you should tag each paragraph in the InDesign version of the file.
  • InDesign’s tagged text import filter is fragile, and can crash the program when it encounters a tag it doesn’t understand. Always save your work before importing a tagged text file.

Clearly, tagged text isn’t for everyone, but it can be incredibly helpful in the right situation, especially when trying to automate formatting.

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • Klaus Nordby says:

    I, too, worked with QXP tags back in the ’90s, creating some DOS DataEase database which wrote out the ASCII files and produced some spiffy charts and whatnot — it was both useful and fairly easy to do, even for a non-coder. But when I switched to ID, now 8 years ago, I tested out its native tagging file format a bit — and found myself much frustrated. I couldn’t really make it “behave” like I could so easily with the QXP tags. I no longer recall the gory details, but there were things about the ID tag format which was deeply troublesome. I’ve not tested it for years, and it’s sad to hear you too, David, is less-than-happy with the ID tag system. I guess now Adobe thinks that the damn XML is replacing any need to fixing the ID tag system. Alas, alas, for I still hate XML!

  • michel says:

    I too used a database to quark solution for about 8 years that I updated last year to be database (filemaker) to inDesign. In learning about tagging for InDesign, I learned a few things via trial and error:

    1 – if you’re going to use a database to generate tagged text, format some sample text the way you want in InDesign, and export tagged text to examine what it is.

    2 – simplify and test! before you even start trying to tag anything, play around with the exported text, remove extraneous info (for example, accents like é become a tagged code, which isn’t necessary for a successful import). Try re-importing your edited tagged text to see if it comes in right. Simplify some more.

    3 – Play with paragraph styles and character styles rather than character level formatting. This gives you much more flexibility in your layout.

    That said, Xtags was a great stopgap for me before I switched my solution over. As it says on their site “In demonstration mode, Xtags will import and export no more than 50 paragraphs at a time.” This worked for my catalogue, and it may be good enough for you!

  • Monica says:

    Hi David! I have recently begun to study the other kind of tagging, PDF tagging, which is related to XML, right? Is it possible to reverse engineer Xtags into XML? I hope this isn’t a completely naive question . . .

  • Monica: That’s an interesting point. No, these kinds of tags are very different than XML kinds of tags, actually! I’m sure it’s possible to convert xtags to XML, but not easily.

  • Jarrod says:

    On the most basic level I just need manuscript that flows in styled. I don’t need the tags to define styles, manually style the text, or anything complicated.

    The biggest advantage to xTags is that I can code a manuscript simply and quickly:

    @AHD:This is an A-Head
    @T:And this is some text.
    Another Paragraph.
    Another Paragraph.
    @BHD:This is a B-Head

    With InDesign Tagged Text I have to type:

    <ParaStyle:Ahead>This is an A-Head
    <ParaStyle:Text> And this is some text.
    <ParaStyle:Text>Another paragraph.
    <ParaStyle:Text>Another paragraph.
    <ParaStyle:Bhead>This is a B-Head.

    That’s way too much extra typing on every paragraph of a five or six hundred page book.

    It’s really unfortunate that Adobe created such a dense coding system. It may ultimately be much more powerful than xTags, but it’s so much of a time drag that given the choice it’s much faster to not code the manuscript at all and just style by hand.

    xTags is fast and easy. But it’s also $400 . . .

  • Jarrod, I had to fix the angle brackets you typed; I hope I got those correct. (Typing code with greater-than and less-than is not easy in this comment field. You have to use the html codes, such as: & lt ; )

  • Lori says:

    David–

    Third paragraph, I think you mean Quark in the last line…

  • Thanks, Lori. I fixed it.

  • michel says:

    Jarrod,

    I believe you can do your ID tags almost as quickly as Quark tags:

    This is an A-Head
    And this is some text.
    Another paragraph.
    Another paragraph.
    This is a B-Head.

    Another option is to bring in the Quark tagged material as text, and then use GREP along with the find/change script to apply styles. I’d recommend choosing the paragraph style that is the most prevalent, and applying it everywhere to start, and then running GREP to apply the exceptional paragraph styles.

    This is a good way of dealing with other kinds of tags as well. We sometimes get files tagged from a publisher with for Header 1, for example. Or text. With GREP and the find/change script, you can adapt solutions to many kinds of tagging schemes.

  • michel says:

    Oh rats, I just read about the less-than & greater-than symbols in comments… Is it possible to edit posts?

  • Nigel Chapman says:

    I don’t know whether Klaus Nordby’s comment that Adobe thinks that XML is replacing any need to fix ID tags is accurate about what Adobe thinks, but it does seem as if XML will do all the little markup jobs mentioned in the original article. You wouldn’t need a DTD or anything unpleasant like that: just make a list of tags that match the styles you want to use, and you’ll be able to import the XML and map tags to styles.

    If it’s typing all the angle brackets and closing tags that bothers you, invest in a copy of Textmate, or any other XML-aware editor, and you won’t have to type any tags by hand. You’ll end up doing less typing than you would with those XTags, I reckon.

  • Nigel, I’m sorry, but it sounds as though you have obviously never worked with tagged text. XML is not a replacement for tagged text, and is so amazingly more complicated and annoying than tagged text that it makes me wince to think about it.

    Sure, XML is a reasonable solution for many automated formatting systems, but it is not tagged text and simply should not, can not, be put in the same sentence.

    For example, how would you write “use -10 tracking for this word” in XML? Can’t do it unless you create a new character style AND a new xml element and tag it and blah blah blah. What about, “insert a special pi symbol in this middle of this sentence”? Feh. My basic rule is: If you can do it successfully and efficiently any way other than XML, you should.

  • Nigel Chapman says:

    David,

    I did say ‘all the little markup jobs mentioned in the original article’. But then, I’m the sort of person who probably would define a new character style to set tracking to -10.

    I defer to your greater experience, though. I will never put XML and tagged text in the same sentence again. (I hope that doesn’t come over as sarcastic; it isn’t meant that way.)

  • Nigel, I’m very sorry for being so harsh in my comment above. Hadn’t had my coffee yet. What I should have said was: Yes, you’re right that people should consider XML and see if it works for them. But in many cases, something straightforward such as tagged text will do the job in an easy and elegant way.

    The clue you offer here is an important one: You are the kind of person who would define a new style for a tracking change. You are exactly the kind of person that will succeed with XML! Unfortunately, many others are a bit sloppier (if good intentioned) and XML ends up being a problem for them.

  • Martin says:

    I too am converting to InDesign from Xpress. I have had no luck finding the InDesign tag for Indent Here which I use after a bullet and fixed space. When I export to tags, it doesn’t give the code. Any help would be appreciated.

  • In the olden days, we used to use XPTags to convert word processing files for import into Quark. We had developed many conversion programs for MSWord, WordPerfect, AmiPro, MSWrite, and the myriad other ones that were out there. Since the world has pretty much either standardized on Word, or a version that is next-to-word, we don’t really have to do that anymore. I can give a typist a marked up manuscript, have them style it in word with my InDesign styles and I get as good import as I used to get with tags. As David said in his post, this was a sleek solution when we were working with people using a 286 computer.

  • Kel says:

    I use XPress Tags and InDesign Tagged text. I have a cool Mac tip. If you export your file as InDesign Tagged text and call the file up in TextWranger (which is free) you can do S&Rs etc. using grep if you want to, which gives you lots of editing power. Now here’s the best bit. You can even record what searches etc. you do. It saves them as AppleScript files. So, for instance, I work on a series of books that come out each year that are presented to me in code form (GYPSY if anybody knows what that is). I just run the Applescripts I created using TextWrangler and it does all the work for me. The changes and S&Rs I used to have to do use to take about 10 hours per book. After doing the Applescripts it now takes about 3 minutes. I just sit and watch them automatically being done! The file that is left has the correct InDesign character and paragraph styles in it, so I just import this file into the my InDesign document and it is all there, formatted correctly.

  • Kel, that’s a very good point! Another option (in CS3) is to use the GREP feature inside the Find/Change dialog box. Remember that you can save your search criteria. And, for even more automation, use the FindChangeByList.jsx script, which comes with InDesign. You can code a list of grep (or other) searches in one file and run them all from inside InDesign with a double-click.

  • Jordann says:

    Does anyone know about CS4 – I just got off the phone with Adobe and they said they got rid of tagged text – using ASCII-MAC.. What the heck!?? I have a huuuge project coming up and need some immediate help.

    Does anyone know how to use tagged text in CS4? Primarily using ASCII-MAC? Currently, I only use paragraph style sheets and they work extremely well for me. I don’t understand why its not an option and I need some help getting it to read my coding. If you have another suggestion… I would be thrilled to hear it…

  • @Jordann: The tagged text options in CS4 appear to me to be exactly the same as they were in CS3. Are you not seeing the same options? ASCII is certainly there.

  • Chris Marco says:

    Given this is an InDesign site, it may not be the right place for my question, but I’ll ask anyway. I used to use XPress tags all the time when I worked on text books, we had a stellar system for quickly tagging our text in Word. After that job I went into regular advertising and never had enough text that I needed to use tags. I left ad work right before folks started switching to InDesign and didn’t think I’d go back. Surprisingly, years later, I’ve sort of fallen into a job that still does all their work in Quark. Last night I tried to remember how to format tags and apply them in Word in order to import a good bunch of text into an annual report. Quark’s supplied manual is useless and what I’ve found online seems to be much more complicated looking tags than what I used to use. David, do you have any good recs for where I can find info about applying old-fashioned tags (@text:) to my text and getting it to import into Quark 7 the way I remember? I’d really appreciate any help.

  • Debby Wechsler says:

    This is great info, maybe now I will not have to run everything through Pagemaker… I just have one comment from my previous experience doing directories. You don’t need to type or have the exact Tags in your original document (or have whoever gives it to you do them). You just need to use something you can search-and-replace before you import into InDesign. I have people code text coming from a database with codes like $1 or %3 that wouldn’t otherwise occur in the text and then I can replace with correct bracketed codes. If they are extra-cautious and do too many codes, I can just delete them. Or replace them with tabs or other items I may need that aren’t specified otherwise.

  • Bill Owen says:

    I also have used Quark tags for over 10 years and trying to do similar with InDesign… got all the differences translated but cannot get them to import at all… the tags arrive with the text. I tried changing all the Show Import Options in each combinations. Is there a troubleshooting reference somewhere? Thanks!

  • @Bill: There’s a PDF from adobe’s web site mentioned in the blog post. here’s another tech note that might help.

    It might be an encoding issue; check on what encoding your text editor is using.

    Can you export a tagged text document out of INDD and reimport it? That’s a good test to make sure it’s all working.

  • Bill Owen says:

    Yes, very clever! Exporting out allowed me to look at it more closely and it did indeed reimport okay. I appreciate the fast answer and when I looked more closely I had pStyle: not ParaStyle: !!! So I’m out of the ditch and moving again. Thanks!

  • Debby Wechsler says:

    okay, I tried exporting out tagged text. It came out with a huge header of coding and then pages of coding below that, but in between was the text with its associated tags. I figured out that I needed to put the header at the top. When I tried to import into CS2, it came in with all tags showing as text. When I tried to import into CS3 (which I just bought), it came in but asked also for character-level codes, not just paragraph codes. If I remove all the header and the pages of extraneous stuff at the bottom (which seems to be a bunch of hyperlinks that may have been hidden in the original document?) it comes in looking more or less okay, but all in 8 pt. Arial. So where is the information that tells the stype what is the font and typesize if not in the paragraph style? In order to tell my client how to code the database-based info coming to me, I need to be able to tell them what text to add.

  • David Williams says:

    For years I have placed simple html style tagging in text files imported into PageMaker. Now that I’m looking at converting to InDesign it’s a real pain that custom tags don’t appear to be supported!

    My L3 Heading
    My 1st paragraph xxx xxx xxx
    xxx xxx xxx
    My 2nd Paragraph yyy yyy
    yyyy
    Sub-title
    More text zzzz
    zzzz

  • David Williams says:

    My sample html tags (h3, p, h4) got removed from my example above.

  • @David: Yup. Frustrating. You could look into Xtags from emsoftware.com or Formatting Tools from in-tools.com.

  • John Dovey says:

    I wrote a VERY simple, VERY crude php script to convert html to tagged text. You can see it at my blog

    Any comments, additions, rewrites etc are VERY welcome.
    John

  • John Dovey says:

    I created a table of as many of the html ascii codes as I could, because the Adobe documentation only gave a small subset. You can find it at https://justdone.co.za/tools/ascii_table.php

  • Peter Williams says:

    Maybe someone can help. We are converting to inDesign from….. Wait for it… The OLD GEM version of Ventura Publisher. We used tagged text there to convert our database tables to a catalog listing. Many of these listings include images. In Ventura we can add an anchor into the tagged text which would allow us to load a previosuly created Image Frame in ventura at the correct position.

    Is there something similar in Indesign Tagged Text?
    I’ve found that I can use the HREF in an xml header if I import XML, but the XML import take too long for my purpose (We routinely load, view, modify up to 50 different chapters/documents multiple times every few minutes during our production cycle. An XML fie to produce 10 pages takes about 4 minutes to load. Our Publication/Book is almost 800 pages.

    Tagged text is so much faster, if only we could import images.

    Any ideas?

    Thanks

  • >