Using Tagged Text


InDesign offers a file format of its own: Adobe InDesign Tagged Text. Tagged Text actually is ASCII (text-only) text that contains embedded codes to tell InDesign which formatting to apply. You embed these codes, which are similar to macros, as you create files in your word processor.

No matter what layout program they use, most people don't use the tagged-text option because the coding can be tortuous. Because you can't use tagged-text codes with your word processor's formatting, you must code everything with tagged text and save the document as an ASCII file. So why have Tagged Text at all? Because this format is the one format sure to support all the formatting you do in InDesign.

Working with exported Tagged Text files

The usefulness of Tagged Text is not in creating text for import, but in transferring files created in InDesign to another InDesign user (including someone working on another platform) or to a word processor for further work. You can export an InDesign story or piece of selected text in the Tagged Text format, and then transfer the exported file to another InDesign user or to a word processor for further editing.

Exporting a Tagged Text file into a word processor makes sense if you want to add or delete text without losing special formatting ‚ such as fonts, kerning, or style tags ‚ that your word processor doesn't support. After you edit the text, you can save the altered file (make sure that it is saved as ASCII text) and reimport it into your InDesign layout.

The best way to understand the Tagged Text format is to export some of your own documents to it, and open the resulting file in a word processor to see how InDesign coded the file. A warning: The Tagged Text format can be complex, especially because most codes have two forms, a short (abbreviated) one and a long (verbose) one ‚ you choose which InDesign exports from the Export dialog box in InDesign (File Export, then choose InDesign Tagged Text as the file format). Note that a Tagged Text file is simply an ASCII text file, so it will have the extension .TXT and use the standard text-only file icon in Windows and on the Mac.

Here's an example of verbose coding (because the code is so long, I had to add line breaks; slightly indented lines are actually part of the same code segment):

 <ASCII-WIN> <DefineParaStyle:Normal=<Nextstyle:Normal><cTypeface:Regular> <cSize:10.000000><pHyphenationLadderLimit:0><pHyphenation:0> <pHyphenationZone:18.000000><cFont:Times New Roman> <cColorTint:100.000000>> <DefineCharStyle:Default Paragraph Font= <Nextstyle:Default Paragraph Font>> <DefineCharStyle:Hyperlink=<BasedOn:Default Paragraph Font> <Nextstyle:Hyperlink><cColor:Blue><cTypeface:Regular> <cSize:10.000000><cHorizontalScale:1.000000> <cBaselineShift:0.000000><cCase:Normal><cStrokeColor:> <cUnderline:1><cFont:Times New Roman><cPosition:Normal> <cStrikethru:0><cColorTint:100.000000>> <ColorTable:=<Black:COLOR:CMYK:Process:0.000000,0.000000, 0.000000,1.000000><Blue:COLOR:RGB:Process:0.000000,0.000000, 1.000000>> <ParaStyle:Normal><pHyphenation:1> <CharStyle:Default Paragraph Font>  <CharStyle:><CharStyle:Hyperlink>www.adobe.com<CharStyle:> <CharStyle:Default Paragraph Font>. <CharStyle:><pHyphenation:> 

Here is the same text with abbreviated tags:

 <ASCII-WIN> <dps:Normal=<Nextstyle:Normal><ct:Regular><cs:10.000000> <phll:0><ph:0><phz:18.000000><cf:Times New Roman> <cct:100.000000>> <dcs:Default Paragraph Font=<Nextstyle:Default Paragraph Font>> <dcs:Hyperlink=<BasedOn:Default Paragraph Font> <Nextstyle:Hyperlink><cc:Blue><ct:Regular><cs:10.000000> <chs:1.000000><cbs:0.000000><ccase:Normal><csc:><cu:1> <cf:Times New Roman><cp:Normal><cstrike:0><cct:100.000000>> <ctable:=<Black:COLOR:CMYK:Process:0.000000,0.000000,0.000000, 1.000000><Blue:COLOR:RGB:Process:0.000000,0.000000,1.000000>> <pstyle:Normal><ph:1><cstyle:Default Paragraph Font>  <cstyle:><cstyle:Hyperlink>www.adobe.com<cstyle:> <cstyle:Default Paragraph Font>. <cstyle:><ph:> 

What does all that coding mean? Well, that's for a one-page document with one frame that has simply one line of text:

 This is a hyperlink to  www.adobe.com  . 

The text is black, except for the Web address, which is in blue underline.

As you can see, there's a lot to Tagged Text codes. InDesign comes with a complete list of codes in a PDF file called Tagged Text.pdf that you'll find in the Tagged Text folder within the Adobe Technical Info folder on the InDesign CD-ROM.

In practical terms, you may not mind editing Tagged Text slightly or leaving them in a file when you alter its text. But you're not likely to forgo the friendly formatting available in your word processor and in InDesign to apply Tagged Text coding to everything in your text files.

Using Tagged Text for database publishing

Tagged Text format can be very handy as a start to database publishing. The codes in the preceding section define the formatting in a document. However, you don't need to go that far; you can simply specify paragraph tags using Tagged Text, so when text is imported into an InDesign document, InDesign knows what styles to apply. You would use this technique to import data gathered by, for example, a Web-based survey page or exported from a database. By placing the Tagged Text codes before each paragraph, you will save the effort of manually tagging every paragraph in InDesign.

For example, say you have a product director that lists the company name , URL, and product description. You'd have a text file with entries that look something like this:

 <ASCII-WIN> <pstyle:Company>Name 1 <pstyle:URL>Web address 1 <pstyle:Description>Descriptive text 1 goes here. <pstyle:Company>Name 2 <pstyle:URL>Web address 2 <pstyle:Description>Descriptive text 2 goes here. 

The <ASCII-WIN> (or <ASCII-MAC> if the file was created on a Mac) code appears only at the top of the file. The code <pstyle: style name > specifies the paragraph style to apply (for character styles, the code is <cstyle: style name > ) ‚ be sure that the name is an exact match, including any capitalization; otherwise , InDesign won't recognize the style you want to use.

To use text coded this way, you open an existing document that is already set up with text frames and text styles, then place the text file into the document. The tagged text will take on the designated styles, making it easy, for example, to flow an updated catalog into a template. Figure 14-1 shows a document created this way.


Figure 14-1: A catalog created by importing a Tagged Text file.



Adobe InDesign CS Bible
Adobe InDesign CS3 Bible
ISBN: 0470119381
EAN: 2147483647
Year: 2003
Pages: 344
Authors: Galen Gruman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net