Accessibility
Adobe
Sign in Privacy My Adobe

Creating conditional text

David Blatner

David Blatner

www.63p.com

Learn InDesign CS4

Learn InDesign CS4

Created:
15 Oct 2008
User Level:
Intermediate, Advanced
Products:
InDesign CS4 or later

Walk through creating and applying text conditions, and hiding them to create different versions of a document. Save time by creating condition sets.

AlertThis content requires Flash

Download the free Flash Player now!

Get Adobe Flash Player


Requirements

To complete the tasks demonstrated in this tutorial, you need the following software and files:

Adobe InDesign CS4

Sample file

lrvid4026_id.zip (ZIP, 241MB)

Prerequisite knowledge

Intermediate knowledge of GREP code and anchored objects

Creating conditional text

Adobe® InDesign® CS4 allows you to create multiple versions of the same document using conditional text. In this tutorial, you will learn how to create and apply text conditions. You will also learn how to create condition sets to optimize the use of hidden text.

The Conditional Text panel

InDesign CS4 allows you to create conditional text, which allows your documents to do double duty. You can show and hide text on the page depending on the export destination or end use. For example, you might create a catalog with UK and US prices and hide one set during printing for the US and hide the other set during printing for the UK. Creating and applying conditions has been simplified with the addition of the Conditional Text panel. To use the Conditional Text panel:

  1. Open a document with multiple versions of text, such as foreign and domestic prices.
  2. Choose Window > Type And Tables > Conditional Text. The Conditional Text panel opens.

    Conditional Text panel

    Figure 1: The Conditional Text panel

    Note: By default, there is one item, Unconditional, in the Conditional Text panel.

  3. Choose New Condition from the Conditional Text panel menu in the upper-right corner of the Conditional Text panel. The New Conditions dialog box opens.

    Tip: You can also click the New Condition button at the bottom of the Conditional Text panel to create a new condition.

    Conditional Text panel

    Figure 2: Select New Condition from the Conditional Text panel menu
  4. In the New Condition dialog box, type the name of your new condition in the Name field. Click OK.

    Note: All of the text in your document is set to Unconditional by default. Any text listed as unconditional is always visible. This is not the case with text marked as conditional.

    New Condition dialog box

    Figure 3: The New Condition dialog box
  5. Use the Type tool to select an instance of unconditional text in your document.
  6. Click on a condition in the Conditional Text panel. Notice that the checkmark moves from Unconditional to the newly selected condition.

    condition selected

    Figure 4: Selecting a condition to apply to text
  7. Repeat this process as needed to turn standard text into into different types of conditional text.

    Note: You can apply more than one condition to text by pressing the Shift key and clicking multiple checkboxes.

Using Quick Apply and the GREP feature to apply conditions

You can apply conditions to text more quickly using the Quick Apply and GREP features in InDesign:

  1. Select a portion of text.
  2. Press Ctrl+Enter/Command+Return to open the Quick Apply dialog box. The Quick Apply dialog box has a number of preset conditional text types, such as US Prices.

    The Quick Apply dialog box

    Figure 5: The Quick Apply dialog box
  3. Choose the desired preset from the Quick Apply menu. Press Enter or Return to apply the condition to the selected text. Repeat this process as needed.
  4. To use the GREP feature in the Find/Change dialog box to apply a condition, choose Edit > Find/Change. The Find/Change dialog box opens.
  5. Click the GREP tab. Type the GREP code for the types of text you would like to apply the condition to.

    Find Change dialog box

    Figure 6: The GREP tab in the Find/Change dialog box

    Tip: You can type just the beginning of the GREP code and click the @ symbol next to the Find What field to open a context menu of special characters and modifiers. For example, for UK prices, you could type the £ (pound symbol) and choose Wildcards > Any Digit and then Repeat > One Or More Times to find variations on a price.

  6. To apply a condition to the found text, click the Specify Attributes To Change icon next to the Change Format field of the Find/Change dialog box (see Figure 7) The Change Format Settings dialog box opens.

    highlighted text

    Figure 7: Applying a condition to the found text
  7. Choose Conditions from the pane on the left side of the dialog box and select the condition you want to apply from the right. Click OK.

    choosing a condition

    Figure 8: Choosing conditions to apply to found text
  8. Return to the Find/Change Dialog dialog box and click Change All to apply your conditions.

Applying conditions to anchored objects

In some cases, you may want to apply a condition to a nontext item. Because InDesign only allows you to apply conditions to elements inside of a text frame, you need to first turn your nontext items into anchored objects. Then, to assign a condition to an anchored object:

  1. Choose Edit > Edit In Story Editor. The Story Editor opens.
  2. To make the Story Editor a pane within the main page of the document, click the Arrange Documents icon.

    Arranging the document window

    Figure 9: Arranging the document window
  3. Choose the vertical split pane arrangement as shown in Figure 10. Adjust the pane dividing the main document page from the Story Editor by moving it to the left or right as needed.

    vertical split pane

    Figure 10: The vertical split pane arrangement
  4. Look in the Story Editor. An icon appears beside the anchored object. Assign an existing condition to the anchored object or create a new condition using the Conditional Text panel.

    Note: You can apply conditions to tables using the same process as for applying conditions to anchored objects. You will also notice that the Story Editor assigns a colored underline to each conditional text element. These colors correspond to the conditions displayed in the Conditional Text panel. If you move out of preview mode on the main page, these same indicators appear under the conditional text elements on the page.

Hiding conditional text

You can also hide conditional text with the Conditional Text panel. To hide conditional text:

  1. Click the eyeball icon next to the conditional text elements in the Conditional Text panel. The eyeball icon disappears, indicating that the conditional text is hidden. You can click the eyeball icon again to display the conditional text. Repeat this process for all conditions displayed in the Conditional Text panel.
  2. Choose Type > Show Hidden Characters to see markers indicating the presence of hidden text. The markers appear as a caret on the main page and as an eyeball in the Story Editor.

Creating a conditional set

When dealing with multiple conditions, it can be time consuming turning each condition on and off individually. In such cases, it is best to use a condition set. To use a condition set:

  1. Click the Set menu at the bottom of the Conditional Text panel. (If you do not see the Set menu, go to the Conditional Text panel menu and click Show Options.)

    Conditional Text panel options

    Figure 11: Revealing the Conditional Text panel options
  2. Arrange the conditions in the order you want them to appear by dragging them into place.
  3. Choose Create New Set from the Set menu. A dialog box prompting you to name the conditional set appears. Type the name in the name field and click OK.

    new conditional set

    Figure 12: Creating a new conditional set
  4. To view the all of the conditional text you have created, deselect the editable text field on which you are working. Close the Story Editor and return to Preview mode. You can choose which conditions to view by selecting them from the Set menu in the Conditional Text panel.

    new conditional set

    Figure 13: Choosing Preview mode

Where to go from here

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

About the authors

David Blatner is the author or co-author of more than a dozen books, including Real World InDesign, Real World Scanning and Halftones, InDesign CS/CS2 Breakthroughs, Real World Photoshop, and Moving to InDesign. He is also a contributing editor for creativepro.com and the editorial director of InDesign Magazine. His books have sold more than a half-million copies worldwide and have been translated into 15 languages.