15. Automating the Way You Work

Introduction

A library stores InDesign items, such as text frames, graphics frames, shapes, buttons, sounds, and movies so you can use them in other documents. A library is not an InDesign document; it’s a separate file (INDL). After you add items to a library, you can use them in any InDesign document. A snippet is an item from an InDesign document that you can save as an external InDesign Snippet file (IDMS) for use later. Snippets and libraries are similar. However, there are a few differences. Libraries are composed of a group of items, while snippets as individual items. You can store hundreds of items in a library. You may not want to do that, but you can if you want. When a library contains a lot of items, it can be hard to find the one you want. You can use the Show Subset dialog box to search for any item in a library. The powerful search features allow you to specify one or more levels of search criteria to find exactly what you want.

Conditional text allows you to create different versions of the same document. If you want to create two versions of the same document without having to create two separate files, you can create conditions for different text, and then show and hide conditions to create multiple versions. You can also merge data between documents. With the Data Merge panel, you can create a form letter, envelopes, or mailing labels by merging data from a source file with an InDesign target document.

A script is external code that allows you to extend the functionality of InDesign. InDesign comes with a set of sample scripts that you can run at any time. If you know how to write code for a script, you can create your own. XML (Extensible Markup Language) provides a way to reuse data from one file in another file. If you have some experience with XML, it’s a good way to reuse information and automate the way you work with content.

Creating a Library

A library stores InDesign items, such as text frames, graphics frames, shapes, buttons, sounds, and movies so you can use them in other documents. A library is not an InDesign document; it’s a separate file (INDL). When you create a new library or open an existing library, the Library panel appears, displaying the library name in the title tab. In the Library panel, you can add, remove, or update items. You can add items to the library one at a time, all items from a page, or as a whole page.

Create a New Library

Image Click the File menu, point to New, and then click Library.

Image Enter a name for the library file.

Image Navigate to the location where you want to save the library.

Image Click Save.

The tab for the Library panel displays the name of the library.

Image

Open an Existing Library

Image Click the File menu, and then click Open.

Image Navigate to the location where the library you want to open is stored.

Image Select the library file you want to open.

Image Click Open.

Image

The Library panel opens.

Add or Delete Items in a Library

Image Open the library you want to edit.

Image Do any of the following:

Add an Item. Select the item in layout view, and then click the New Library Item button on the panel.

Add a Page. Display the page in layout view, click the Options button, and then click Add Items on “Page.”

Add All Items on a Page as Separate Objects. Display the page in layout view, click the Options button, and then click Add Items on “Page” as Separate Objects.

Delete Items. Select the items in the Library panel, click the Delete Library Item button on the panel, and then click Yes.

Press Ctrl (Win) or Image(Mac) to select multiple non-contiguous items or press Shift to select multiple contiguous items.

Press Alt (Win) or Option (Mac) to bypass the confirmation dialog box.

Image Click the Close button to exit the library.

Image

Did You Know?

You can use libraries from Adobe Bridge. A library file (INDL) appears in Adobe Bridge like any other file. However, the files appears as icons, not as preview documents. You can open a library from Bridge as you would any InDesign file.


Using and Updating a Library

After you add items to a library, you can use them in any InDesign document. You can add library items to a page by dragging them individually, dragging a selection, or by using the Place Item(s) command on the Options menu. If you change a library item in your document, you can use the Update Library Item on the Options menu to replace the existing item in the library with the updated one.

Place Library Items on a Page

Image Open the library you want to use.

Image Select the items that you want to place on a page.

Image

Press Ctrl (Win) or Image(Mac) to select multiple non-contiguous items or press Shift to select multiple contiguous items.

Image Drag the selection from the Library panel onto the page.

Update a Library Item in the Library

Image Select and modify the library item that you want to update in the Library panel.

Image

Image Open the library you want to use.

Image Click the Options button, and then click Update Library Item.

Image

Changing Library Item Information

When you add items to a library, the item appears as an untitled element. You’ll want to name the items for searching and sorting purposes. InDesign tries to assign an object type to the item, but it may not always be what you want. If an item contains multiple objects, such as a shape with text or a button with text, you may want to change the object type. You can change the item name and object type, as well as add a short description in the Item Information dialog box.

Change Library Item Information

Image Open the library you want to use.

Image Select the item that you want to change.

Image Click the Library Item Information button on the panel.

Image

You can also double-click a library item.

Image Enter a name for the item.

Image Click the Object Type list arrow, and then select an object type:

Image. Specifies a raster graphic.

EPS. Specifies an EPS file.

PDF. Specifies a PDF file.

Geometry. Specifies frames and rules that don’t contain graphics or text.

Page. Specifies an entire page.

Text. Specifies a text frame.

Structure. Specifies an XML element.

InDesign File. Specifies an InDesign file.

Image Enter a short description for the item.

Image Click OK.

Image

Searching and Sorting Libraries

You can store hundreds of items in a library. You may not want to do that, but you can if you want. When a library contains a lot of items, it can be hard to find the one you want. You can use the Show Subset dialog box to search for any item in a library. The powerful search features allow you to specify one or more levels of search criteria to find what you want. In addition to searching for items, you can also sort items in a library by name, newest, oldest, and type. A library panel displays items as thumbnails by default. If your prefer using a list to help you find what you want, you can change the library display.

Search in a Library

Image Open the library you want to use.

Image Click the Show Library Subset button on the panel.

Image

Image Click the Search Entire Library option to search all items in the library or click the Search Currently Shown Items option to search only those items currently displayed in the library.

Image Use the list arrows under Parameters to specify the search criteria you want.

Image If you want to add multiple levels of search criteria, click More Choices.

Image With More Choices, use the list arrows to specify the next level of search criteria you want, and then click the Match All or Match Any One option.

Image To remove a level of search criteria, click Fewer Choices. To add more levels of criteria, click More Choices again.

Image Click OK.

Image

All the items that match the search criteria appear in the library.

Image To show all library items, click the Options button, and then click Show All.

Image

Sort Library Items

Image Open the library you want to use.

Image Click the Options button, point to Sort Items, and then select a sort command:

Image

by Name. Sorts library items by name.

by Newest. Sorts library items from newest to oldest.

by Oldest. Sorts library items from oldest to newest.

by Type. Sorts library items into groups by object type.

Change the Library Display

Image Open the library you want to use.

Image Click the Options button, and then select a display command:

Image

List View. Displays library items with a name and an icon that indicates the item type.

Thumbnail View. Displays library items with a name and image preview.

Large Thumbnail View. Displays library items with a name and large image preview.

Creating and Using Snippets

A snippet is an item from an InDesign document, such as a text frame, graphics frame, shape, button, sound, or movie, that you can save as an external InDesign Snippet file (IDMS) for use later. You can’t use a text selection as a snippet, but you can use a text frame. Snippets and libraries are similar. However, there are a few differences. Libraries are composed of a group of items, while snippets individual items. You can drag individual snippets from a folder, desktop, or the Adobe Bridge into an InDesign document, which you can’t do with library items. Since snippets are individual items, you can preview them (unlike library items). Snippets also typically have a smaller file size than a library file.

Create a Snippet

Image Select the items on the page that you want to use to create a snippet.

Image

Image Click the File menu, and then click Export.

Image Enter a name for the file.

Image Click the Save as Type list arrow (Win) or Format popup (Mac), and then click InDesign Snippet.

Image Navigate to the location where you want to save the snippet.

Image

Image Click Save.

Create a Snippet by Dragging

Image Select the items on the page that you want to use to create a snippet.

Image Drag the items into a folder or onto the desktop.

The snippet appears with a file name assigned by InDesign, and a file extension of .idms.

Image Click the icon name, type a new name, and then press Enter (Win) or Return (Mac).

Image

Use a Snippet

Image Select the snippet in a folder, on the desktop, or from Adobe Bridge.

Image Drag the snippet icon onto the InDesign document page.

Image

Creating Conditional Text

Conditional text allows you to create different versions of the same document. If you want to create two versions of the same document without having to create two separate files, you can create conditions for different text, and then show and hide different conditions to create multiple versions. For example, if you’re creating a computer book for the Macintosh and Windows operating systems, like the one you’re reading, you can create text conditions for each Macintosh and Windows step instead of creating two separate files. You can apply conditions to text in a frame or table. A condition includes formatting indicators to make each condition easy to see in a document. To display different versions quickly, you can create condition sets. A condition set saves the visibility settings (the Eye icon) for all conditions.

Create and Apply a Condition

Image To create a condition for all new documents, close all documents. Otherwise any new conditions are saved only with the current document.

Image Select the Conditional Text panel.

Click the Window menu, point to Type & Tables, and then click Conditional Text.

Image Click the New Condition button on the panel.

Image

Image Enter a name for the condition.

Image Specify the following condition indicator options:

Method. Highlights or underlines the conditional text.

Appearance. Displays an underline style for the conditional text.

Color. Displays a color for highlighted conditional text or for the underline indicator.

Image Click OK.

Image

Image To apply a condition, select the text you want, and then click the condition name on the panel.

Image
Image

To remove a condition, deselect the check box next to the condition name on the panel.

Use the Conditional Text Panel

Image Select the Conditional Text panel.

Image

Click the Window menu, point to Type & Tables, and then click Conditional Text.

Image Use any of the following buttons or commands:

Apply a Condition. Select text, and then click a condition.

Show or Hide Conditions. Click the Eye icon to toggle on/off.

Delete a Condition. Select a condition, and then click the Delete Condition button.

Edit a Condition. Double-click a condition and make changes.

Condition Indicators. Specify an option: Show, Show and Print, or Hide.

Create a Condition Set

Image Apply conditions to text.

Image Select the Conditional Text panel.

Image Click the Set list arrow, and then click Create New Set.

Image

If the Set menu doesn’t appear, click the Options button, and then click Show Options.

Image Enter a name for the condition set.

Image Click OK.

Image
Image

Image To use a condition set, click the Set list arrow, and then select a sort command:

Set Name. Applies the condition set to the document.

Delete Set. Deletes the condition set.

Rename/Redefine. Renames or redefines the condition set.

Collecting and Placing Content

With the Content Collector and Content Placer tools on the Tools panel, you can quickly collect page elements in the Conveyor and then place them in other parts of your document or in different documents. When you collect an element, the Conveyor appears at the bottom of the screen, where you can view the collected elements, switch between the Content Collector and Content Placer tools, select placement options and specify whether to create a link or map text styles. You can load as many elements as you want. The Content Collector loads elements into the Conveyor, and the Content Placer puts the elements in a loaded cursor where you can place them one at a time.

Collect Content to the Conveyor

Image Select the Content Collector tool on the Tools panel.

Image

By default, the Conveyor appears at the bottom of the screen.

To show or hide the Conveyor when you select the Content Collector or Content Placer tool, click the View menu, point to Extras, and then click Show or Hide Conveyor.

Image Point to an element on the page you want to add to the Conveyor.

The element is highlighted with a light blue selection.

Image Click the element to add it to the Conveyor, and then continue to add the elements you want.

Image

The cursor indicates the number of items collected.

Image Select the Collect All Threaded Frames check box to include all threads in a text frame.

Image To change the way the Content Collector loads elements, click the Load Conveyor button, select the options you want, and then click OK.

Image To close the Conveyor, click the Close button or another button on the Tools panel.

Image
Image

Place Content from Conveyor

Image Select the Content Placer tool on the Tools panel.

Image

By default, the Conveyor appears at the bottom of the screen.

To show or hide the Conveyor when you select the Content Collector or Content Placer tool, click the View menu, point to Extras, and then click Show or Hide Conveyor.

Image Select a placement button.

Place (item), remove from Conveyor and load next (one).

Place (item) multiple (times) and keep in Conveyor.

Place (item), keep in Conveyor and load next (one).

Image To switch element positions in the Conveyor, click the Next Cluster, Next, Previous, or Previous Cluster buttons.

Image Select linking options as desired.

Create Link. Select to create a link with the selected item in the Conveyor.

Map Styles. Select to use text style mapping.

Edit Custom Style Mapping. Click to specify custom text style mapping.

Image Click the loaded cursor to place an element one at a time on a page based on the placement option.

Image

The cursor indicates the number of items to place.

You can press Esc to delete the current element in the loaded cursor.

Image To close the Conveyor, click the Close button or another button on the Tools panel.

Image

Creating Linked Content

With the Place and Link command, you can reuse content—including text, shapes, graphics, groups and interactivity elements (such as a button)—in the same InDesign document or in other documents. By creating a link (to a parent), you create an identical object (child) in a layout, which you can update as desired as content changes. This is useful when you want to create stationery and want to use boilerplate text and logo on different size letterhead or envelopes or when you want to create an InDesign document as a centralized repository to storage and manage reusable content. When content is placed, one or more links appear in the Links panel, where you can update all or individual linked content. InDesign views content and frames as unique elements to differentiate between the content and container. Any unique changes to child content are overwritten by parent content, except for specified style mapping exceptions and local edits.

Reuse Linked Text

Image Select the Selection tool on the Tools panel.

Image Click to place the insertion point in the text frame (parent story) you want to reuse as linked text.

Image

Image Click the Edit menu, and then click Place and Link.

If the Conveyor opens, click the Close button on the Conveyor.

Image Click or drag a text frame or click an existing empty text frame with the loaded text cursor to place the text where you want it (child story).

Image

Image To show or hide the linked Badge icon, click the View menu, point to Extras, and then click Show or Hide Linked Badge.

Image Select the Type tool on the Tools panel, and then make changes to the parent story content or format.

Image Click the Window menu, and then click Links to open the Links panel.

Image Select the child linked text item in the Links panel to display link info.

Image To update child linked stories, double-click the Badge icon next to the text item.

Image

Reuse Linked Objects

Image Select the Selection tool on the Tools panel.

Image Select the object frame—shape, graphic, text, group, or interactivity element (such as a button)—you want to reuse.

Image Click the Edit menu, and then click Place and Link.

If the Conveyor opens, click the Close button on the Conveyor.

Image Click or drag a frame with the loaded cursor to place the content where you want it (child).

Image

A link appears for the frame and another one appears for the object itself. Related items are grouped together. You can click the Expand/Collapse arrow to view or hide its contents.

Image To show or hide the linked Badge icon, click the View menu, point to Extras, and then click Show or Hide Linked Badge.

Image Make changes to the parent frame or object content.

Image Click the Window menu, and then click Links to open the Links panel.

Image Select the child linked item in the Links panel to display link info.

Image To update child linked items, double-click the Badge icon.

Image

See Also

See “Collecting and Placing Content,” on page 408 for more information on using the Conveyor.


Linking Content Across Documents

With the Place and Link command, you can reuse content in the same document, however, you can also reuse content in another InDesign document. This allows you to use an InDesign document as a centralized repository to storage and manage reusable content. When the linked content is placed in another document, one or more links appear in the destination’s Links panel, where you can update all or individual linked content. InDesign views content and frames as unique elements to differentiate between the content and container. Any unique changes to child content are overwritten by parent content, except for specified style mapping exceptions and local edits.

Link Content Across Documents

Image Select the Selection tool on the Tools panel.

Image Select the object frame or place the insertion point in a text frame you want to reuse.

Image Click the Edit menu, and then click Place and Link.

If the Conveyor opens, click the Close button on the Conveyor.

Image Switch to another document for the destination content.

Image Click or drag a frame with the loaded cursor to place the content where you want it (child).

Image

Image To show or hide the linked Badge icon, click the View menu, point to Extras, and then click Show or Hide Linked Badge.

Image Make changes to the parent frame or object content.

Image Click the Window menu, and then click Links to open the Links panel.

Image Select the child linked object in the Links panel to display link info.

Image To update linked child items, double-click the Badge icon.

Image To view the source object, select the child linked object, click the Options button, and then click Go To Source.

Image

Managing Linked Content

When you link content in the same document or in a different document, the child element is set by default to update to exactly the same as the parent. However, there are situations where you want the child to be a little different than the parent. For example, between the print and digital version of the same document publication, you want the headline and body text to be larger in the digital version than the print version. With the Link Options dialog box, you can set options to preserve local edits while updating object links and specify style mapping exceptions. In addition, there are options to update links when saving a document or display a warning if an update will overwrite local edits.

Manage Linked Content

Image Select the Selection tool on the Tools panel.

Image Select the child linked object you want to manage and set linked options.

Image Click the Options button, and then click Link Options.

Image Specify the following options:

Update Link When Saving Document. Select to update links when you save a document.

Warn if Update Edits Will Overwrite Local Edits. Select to display a warning dialog box if an update tries to overwrite local edits.

Image Select the check boxes with the items you want to preserve local edits while updating object links.

Image Specify the following options for text links:

Remove Forced Line Breaks from Story. Select to delete forced line breaks.

Define Custom Style Mapping. Click Settings to set or create style mappings for the text or page between parent and child.

Image Click OK.

Image
Image

Using and Running Scripts

A script is external code that allows you to extend the functionality of InDesign. InDesign comes with a set of sample scripts that you can run at any time. If you know how to write code for a script, you can create your own. InDesign works with AppleScripts on the Macintosh and Visual Basic scripts in Windows. If you want to use the same scripts on both platforms, you can use JavaScript. The Scripts panel displays all the available scripts in InDesign. The sample scripts are located in the Samples folder within the InDesign application folder. You can double-click a script in the Scripts panel to run it, or you can run scripts using Quick Apply on the Control panel. You can also attach text to an object on a page using the Script Label panel. The text you attach can be any text, which you can search for or manipulate using a script.

Run a Script

Image If a specific script requires it, select an object or text.

Image Select the Scripts panel.

Click the Window menu, point to Utilities, and then click Scripts.


Timesaver

Press Alt+Ctrl+ F11 (Win) or Option +Image+F11 (Mac) to open the Scripts panel.


Image Click the triangle to expand folders in the Scripts panel to locate a script.

Image Double-click the script name.

Image

You can also click the Options button, and then click Run Script.

The script runs.


See Also

See “Defining Shortcut Keys” on page 503 for more information on assigning keyboard shortcuts to scripts.


Use the Scripts Panel

Image To display your own scripts in the Scripts panel, put the script file in the Scripts Panel folder.

Scripts Panel Folder Location. Select the Scripts panel, click the Options button, and then click Select in Explorer (Win) or Select in Finder (Mac).

Image Select the Scripts panel.

Click the Window menu, point to Utilities, and then click Scripts.

Image Click the triangle to expand folders in the Scripts panel to locate a script.

Image Select a script.

Image Click the Options button, and then select any of the following commands:

Run Script. Runs the selected script file.

Edit Script. Opens the selected script file in a code editor.

Reveal in Explorer (Win) or Finder (Mac). Displays the script file in Windows Explorer or Macintosh Finder.

Delete Script File. Deletes the selected script file.

Enable Redraw. Enables or disables script redraw.

Display Unsupported Files. Displays all available script files in the Scripts Panel folder.

Image

Using Data Merge

With the Data Merge panel, you can create a form letter, envelopes, or mailing labels by merging data from a source file with an InDesign target document. The source file, such as a Microsoft Excel spreadsheet, in CSV (comma-delimited) or TXT (tab-delimited) contains data fields (columns) and records (rows). Each column of data is a field, such as Name, Address, and so on, while each row of data is a record. If you want to add images to the source file, type an @ before the field name, such as @Photo, and enter the path to the image for each record. The merged document is the result of the data merge between the source and target, which is then exported to a PDF document.

Create a Data Merge

Image Select the Data Merge panel.

Click the Window menu, point to Utilities, and then click Data Merge.

Image Click the Options button, and then click Select Data Source.

Image
Image

Image Navigate to the folder location, select the source file (CSV or TXT), and then click Open.

Select the Show Import Options check box to change options. Specify import options, and then click OK.

Image Click to place the insertion point in the text frame (document or master page) where you want data field.

Image Click a field in the Data Merge panel list.

Image

For image data, drag the image field onto an empty frame or existing graphics frame.

Text fields appear with double angled brackets, like <<Name>>.

Image Select the Preview check box on the panel to preview data in the target document.

Image Click the Preview First Record, Preview Previous Record, Preview Next Record, or Preview Last Record button on the panel to view the record data in the target document.

Image To work with the data source, do any of the following:

Update. Edit the data source file in the source program, click the Options button, and then click Update Data Source.

Remove Connection. Click the Options button, and then click Remove Data Source.

Replace. Click the Options button, click Select Data Source, select a new file, and then click Open.

Image Placement. Click the Options button, click Content Placement Options, select options, and then click OK.

Image Click the Create Merged Document button on the panel.

Image

Image Specify the following options on the Records tab:

Records To Merge. Specify the records you want to merge.

Records Per Document Page. Select Single Record to start each record at the top of the next page, or select Multiple Records to create more than one record per page.

Image If you select Multiple Records, click the Multiple Record Layout tab, and then specify settings for margins, and the column and row record layout.

Select the Preview Multiple Record Layout check box to preview the data.

Image Click OK.

Image

Image Specify options to export the merged document to a PDF (see Chapter 16 for details), and then click Export.

Image Enter a name, specify a location, and then click Save.

Image

Working with XML

XML (Extensible Markup Language) provides a way to reuse data from one file in another file. XML uses tags to describe data in the XML file that you can export into a different file. Tagged data are called elements. InDesign can create and use XML data. You can tag data as elements in an InDesign document, save and export data as XML, and then reuse it in other documents. InDesign provides the Structure pane and the Tags panel for working with XML data. The Structure pane shows you the hierarchy and structure of XML data and text snippets for viewing purposes, while the Tags panel lists tags for elements and provides tools to import, export, add, delete, and rename tags.

Create an XML Tag

Image Select the Tags panel.

Click the Window menu, point to Utilities, and then click Tags.

Image Click the New Tag button on the panel.

Image Type a name for the tag (no spaces or non-standard characters), and then press Enter (Win) or Return (Mac).

Image

Image Double-click the tag, select a color, and then click OK.

The color appears when you apply the tag to a frame or text.

Image

Did You Know?

You can delete a tag. Select the Tags panel, select the tag, and then click the Delete Tag button on the panel.


Place XML Tags in a Document

Image Click the View menu, point to Structure, and then click Show Structure.

Image Select the Tags panel.

Click the Window menu, point to Utilities, and then click Tags.

Image Select the text frame or individual text.

Image Click a tag in the Tags panel.

Image

To untag an item, select the element in the Structure pane, and then click Untag in the Tags panel.

Image To show tagged frames or text or frames, click the View menu, point to Structure, and then click Show Tag Markers or Show Tagged Frames.

Image

Image To map XML tags to styles in your document for formatting, click the Options button, click Map Tags To Styles, select a style for each tag, and then click OK.


Did You Know?

You can import XML data. Create a placeholder frame, click the File menu, click Import XML, select the Show XML Import Options check box, click the Merge Content or Append Content option, select the XML file, click Open, select the options you want, and then click OK.


Exporting XML or IDML

After you finish creating or loading element tags, applying them to items on the page in your document, and making any final adjustments in the hierarchy of the tagged elements in the Structure pane, you’re ready to export your document to XML for use in other documents. In addition to XML files, you can also export to the InDesign Markup Language (IDML) format, which is an XML-based format. This allows you to create (export) and open XML InDesign documents using standard XML tools. If you’re exporting large documents to PDF or IDML, you can continue to work on your document as InDesign works in the background.

Export XML or IDML

Image Click the File menu, and then click Export.

Image Enter a name for the file.

Image Click the Save as Type list arrow (Win) or Format popup (Mac), and then click XML or InDesign Markup (IDML).

Image Navigate to the location where you want to save the XML document.

Image Click Save.

Image

Image For XML, specify any of the following options on the General tab:

Include DTD Declaration. Uses the DTD along with the XML.

View XML Using. Opens the exported file in a browser.

Export From Selected Element. Starts the export from the selected element in the Structure pane.

Export Untagged Tables as CALS XML. Exports untagged tables in the CALS XML format.

Remap Break, Whitespace, and Special Characters. Exports items as decimal characters.

Apply XSLT. Applies a stylesheet (XSLT) to define the transformed, exported XML.

Encoding. Specifies an encoding method.

Image Click Export.

Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset