is now part of CreativePro.com!

Automate Text Formatting with Tagged Text

24
This article appeared in Issue 124 of InDesign Magazine.

You can export data directly from Excel or a database, ready to flow as preformatted text onto your page.

When you have a lot of data in a spreadsheet (such as Excel) or a database, you have many options for placing it into InDesign, but I want to offer you one that you probably have not considered before: tagged text. This method lets you apply tags to your data so that you can flow it into InDesign completely formatted with paragraph styles, character styles, special characters, and more.

. . . .

This article is for members only. To continue reading, please sign in, or sign up for a membership today. Thanks for supporting CreativePro!

BECOME A MEMBER

CreativePro membership keeps you up-to-date with the technology, solutions, and resources to strengthen your professional development.

For just $6.50/month (billed annually), you’ll get access to valuable benefits, including:

  • 12 monthly issues of CreativePro Magazine, filled with practical, real-world tutorials written by experts
  • Downloadable resources including templates, fonts, scripts, design assets, cheat sheets, and more
  • Hundreds of members-only tutorial and tip articles
  • Top Tips for InDesign, Photoshop, and Illustrator ebook collection
  • Discounts on events and books
  • and more...

Sign up now!


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
  • Dwayne Harris says:

    David–I do a lot of tagging, and come across an issue that someone else can’t import the tagged text file, even with the tag. When they import it, it comes in with all the tags. Sometimes I can resave the .txt file, but then someone else can’t import it.
    Is there some reason why sometimes the tagged file can be imported and it works, and other times it comes through with all the tags?
    As a note, I import tagged Word file into InDesign via XTags then export as a tagged .txt file (tagged for InDesign) for the designer.

    • David Blatner says:

      @Dwayne: xTags has its own tags exporter, so if you’re exporting with that then I’m not sure other people (who don’t have Xtags) will be able to read them. If you’re having troubles with xTags tagged text files, you’ll probably need to contact Em Software.

  • Dwayne Harris says:

    What I do is flow it into via xTags InDesign with my Quark tagging (which is easier). I then export the InDesign file as a tagged ID file (not an xTags export file).
    Mainly because the designers don’t have xTags and need a tagged file to work with, so I give them a tagged ID file (export from ID as a tagged file).
    Checked with xTags and they said no problem on their end. Once it’s flowed into InDesign and exported as a tagged ID file, it’s a problem with either InDesign not recognizing the tag.
    Again–xTags is only used to import into InDesign originally. Then the ID file is exported as a tagged InDesign file.
    It’s weird how some think it’s a regular text file and not a tagged file and don’t recognize the

  • Chris Thompson says:

    Dwayne – donkey’s years ago (CS3 days), I regularly did imports of large InDesign Tagged Text files, which were very sensitive to the line breaks being a particular combination of carriage return/line feed (CR, LF or CR+LF, corresponding to the then-standard Mac, Unix, Windows line breaks).
    Could that explain the ‘other people’ problem that you’re seeing?

    • David Blatner says:

      Yes, that’s a great point: tagged text can be very finicky about Mac vs. Windows! Something about the encoding. It’s a little unclear to me what’s going on technically, but it has to do with the encoding.

    • Dwayne Harris says:

      Chris–no problems so far as the line breaks.It’s basically text and heads and the only returns are after the element (i.e., after a head, at the end of the paragraph).
      InDesign on some people’s computers don’t recognize the in the head of the file. I can do a file and it works properly on my machine and two other machines in the shop. But there will be one or two machines in the office that it won’t work on. Then there will be files that won’t work on mine, but will work on the others.
      It’s baffling.

    • Dwayne Harris says:

      Thanks, Chris. I remember that from years ago. And this has been a problem for years for myself as well.
      To get around it we exported as RTF file which the designer would import with no problems. But after CS5.5 came out, the RTF files did wacky stuff in InDesign. For some reason, when importing the RTF file, Indesign was keeping the RTF’s Word H&Js (or whatever Word calls them) instead of using InDesign’s. That was never fixed.

  • Nita Congress says:

    I have an unrelated question, but I wonder if somebody has some insight. I’ve recently received “heat” graphs generated in Excel for incorporation in InDesign layouts. In the past, I did the math and figured out the percentages and recreated the graphics in Illustrator, but I’m wondering if there is an easier way to actually use and manipulate the Excel information. Any thoughts?

  • Carol Smith says:

    So Geekie, But SOOOOOOoooo Cool!

  • Jim Lyons says:

    Thanks for this article. Tagged text has been the basis of my book publishing workflow for the past decade or so, as a sort of lazy alternative to a full XML process. I wasn’t aware of Xtags; it can do far more than my process in terms of composition, but the things I work on are primarily running text — i.e., no complicated layout required.
    I add paragraph-level tags to manuscript in Word, and my InDesign templates/layouts have paragraph styles corresponding to the tags (and character styles corresponding to inline formatting in Word). From Word, I save as tagged text via a custom macro, do QA and some buffing in BBEdit, then import completely formatted text into InDesign. In InDesign, more or less all I have to do is fine-tune. (Tables imported via tagged text are an exception: they require hand-building in InDesign.) And when a publication is finished, I can export tagged text and then process it, generally back into Word but also into XML-like text.
    The hardest part of the process is the QA in BBEdit, but InDesign’s tagged text import filter helpfully points out problems, by line number, in imported files, so no great knowledge is needed. The production team that I led at a small educational publisher had little difficulty with the process.
    Someone who’s really good with Word macros and grep might find my macros and scripts rudimentary and kludgy, but generally no one looks under the hood — they just follow the process and spend very little time formatting in InDesign.

  • Denis Baker says:

    Ok, so I signed up for InDesignSecrets. Finally got some time to look at it. Logged in and am looking for this article…
    Automate Text Formatting with Tagged Text
    By David Blatner August 1, 2019
    I just cannot see on the webpage how to view the actual article, links to Magazine and Tagged Text just go round in circles – Frustrated and unimpressed!

    • David Blatner says:

      Denis, did you sign up for a free membership or a Premium membership? Magazine articles are available for premium members. If you did, please try logging out and back in (sometimes the site doesn’t register your premium membership at first). If that still doesn’t work, please write to [email protected] and they’ll fix you up!

  • Denis Baker says:

    It was premium David and thank you I will try that now.

  • Denis Baker says:

    Hi David,
    I read that article hoping it would provide some shortcuts to a very laborious job I repeat regularly. Let me describe it if you don’t mind and you might suggest some other approach to streamline the process, if you could please.
    In InDesign, I produce product catalogues which I import as tables from Excel. I retain them as tables to make use of the cell border rules which outline columns when printed. I give a cell style and paragraph style to the entire doc, but then I have to laboriously go through it line by line adding additional paragraph and cell styles to specific rows to highlight them. There can be up to 5,000 rows in one file so it takes a lot of time to process. Is there a quicker approach (my mind is melting with the tedious nature of the job!!).

  • Denis Baker says:

    Thanks Lindsey, I will definitely check that out.

    • Lindsey Martin says:

      We have another series of publications with many small, repeated tables For this we have a contractor who imports the tables from Excel to ID, exports the ID pub to IDML and uses GREP to apply the styles and other fixes before reopening in ID. Once the GREP searches are formulated, production is very quick–about half a day to first proofs.

  • Lindsey Martin says:

    Shoud add that he uses a text editor (probably BBEdit) to run the GREP searches. On the Windows side, EditPad Pro would do well.

  • Weo says:

    Is there a COMMENT tag syntax for tagged text? We’d like to include some file and date and internal information that is not to be printed, but kept as //comments in the file? There seems to be no tag dictionary/documentation that we can find. THANK YOU!

    • David Blatner says:

      It’s a great question, but unfortunately I don’t know of any way to put comments in. Maybe someone else here does.

  • >