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.
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.
Click the File menu, point to New, and then click Library.
Enter a name for the library file.
Navigate to the drive or folder location where you want to save the library.
Click Save.
The tab for the Library panel displays the name of the library.
Click the File menu, and then click Open.
Navigate to the drive or folder location where the library you want to open is stored.
Select the library file you want to open.
Click Open.
The Library panel opens.
Open the library you want to edit.
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 menu, 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 menu, 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 (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.
Click the Close button to exit the 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.
Open the library you want to use.
Select the items that you want to place on a page.
• Press Ctrl (Win) or (Mac) to select multiple non-contiguous items or press Shift to select multiple contiguous items.
Drag the selection from the Library panel onto the page.
Select and modify the library item that you want to update in the Library panel.
Open the library you want to use.
Click the Options menu, and then click Update Library Item.
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.
Open the library you want to use.
Select the item that you want to change.
Click the Library Item Information button on the panel.
• You can also double-click a library item.
Enter a name for the item.
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.
Enter a short description for the item.
Click OK.
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.
Open the library you want to use.
Click the Show Library Subset button on the panel.
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.
Use the list arrows under Parameters to specify the search criteria you want.
If you want to add multiple levels of search criteria, click More Choices.
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.
To remove a level of search criteria, click Fewer Choices. To add more levels of criteria, click More Choices again.
Click OK.
All the items that match the search criteria appear in the library.
To show all library items, click the Options menu, and then click Show All.
Open the library you want to use.
Click the Options menu, point to Sort Items, and then select a sort command:
• 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.
Open the library you want to use.
Click the Options menu, and then select a display command:
• 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.
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.
Select the items on the page that you want to use to create a snippet.
Click the File menu, and then click Export.
Enter a name for the file.
Click the Save as Type list arrow (Win) or Format popup (Mac), and then click InDesign Snippet.
Navigate to the drive or folder location where you want to save the snippet.
Click Save.
Select the items on the page that you want to use to create a snippet.
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.
Click the icon name, type a new name, and then press Enter (Win) or Return (Mac).
Select the snippet in a folder, on the desktop, or from Adobe Bridge.
Drag the snippet icon onto the InDesign document page.
Conditional text (New!) 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.
To create a condition for all new documents, close all documents. Otherwise any new conditions are saved only with the current document.
Select the Conditional Text panel.
• Click the Window menu, point to Type & Tables, and then click Conditional Text.
Click the New Condition button on the panel.
Enter a name for the condition.
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.
Click OK.
To apply a condition, select the text you want, and then click the condition name on the panel.
• To remove a condition, deselect the check box next to the condition name on the panel.
Select the Conditional Text panel.
• Click the Window menu, point to Type & Tables, and then click Conditional Text.
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.
Select the Conditional Text panel.
Click the Set list arrow, and then click Create New Set.
• If the Set menu doesn’t appear, click the Options menu, and then click Show Options.
Enter a name for the condition set.
Click OK.
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.
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.
To display your own scripts in the Scripts panel, put the script file in the following folder:
• Windows. C:UsernameAppDataRoamingAdobeInDesignVersion 6.0en_USScriptsScripts Panel
• Macintosh. Hard DiskUsersnameLibraryPreferencesAdobe InDesignVersion 6.0en_USScriptsScripts Panel
Select the Scripts panel.
• Click the Window menu, point to Automation, and then click Scripts.
Click the triangle to expand folders in the Scripts panel to locate a script.
Select a script.
Click the Options menu, 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.
If a specific script requires it, select an object or text.
Select the Scripts panel.
• Click the Window menu, point to Automation, and then click Scripts.
Click the triangle to expand folders in the Scripts panel to locate a script.
Double-click the script name.
• You can also click the Options menu, and then click Run Script.
The script runs.
See “Defining Shortcut Keys” on page 427 for more information on assigning keyboard shortcuts to scripts.
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 (New!).
• Click the Window menu, point to Automation, and then click Data Merge.
Click the Options menu, and then click Select Data Source.
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.
Click to place the insertion point in the text frame (document or master page) where you want data field.
Click a field in the Data Merge panel list.
• For image data, drag the image field onto an empty frame or existing graphics frame.
Text fields appear with double angled brackets, such as <<Name>>.
Select the Preview check box on the panel to preview data in the target document.
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.
To work with the data source, do any of the following:
• Update. Edit the data source file in the source program, click the Options menu, and then click Update Data Source.
• Remove Connection. Click the Options menu, and then click Remove Data Source.
• Replace. Click the Options menu, click Select Data Source, select a new file, and then click Open.
• Image Placement. Click the Options menu, click Content Placement Options, select options, and then click OK.
Click the Create Merged Document button on the panel.
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.
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.
Click OK.
Specify options to export the merged document to a PDF (see Chapter 15 for details), and then click Export.
Enter a name, specify a location, and then click Save.
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.
• Click the Window menu, and then click Tags.
Click the New Tag button on the panel.
Type a name for the tag (no spaces or non-standard characters), and then press Enter (Win) or Return (Mac).
Double-click the tag, select a color, and then click OK.
The color appears when you apply the tag to a frame or text.
You can delete a tag. Select the Tags panel, select the tag, and then click the Delete Tag button on the panel.
Click the View menu, point to Structure, and then click Show Structure.
Select the Tags panel.
• Click the Window menu, and then click Tags.
Select the text frame or individual text.
Click a tag in the Tags panel.
• To untag an item, select the element in the Structure pane, and then click Untag in the Tags panel.
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.
To map XML tags to styles in your document for formatting, click the Options menu, click Map Tags To Styles, select a style for each tag, and then click OK.
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.
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. The export process is similar to saving a file. 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 (New!).
Click the File menu, and then click Export.
Enter a name for the file.
Click the Save as Type list arrow (Win) or Format popup (Mac), and then click XML or InDesign Markup (IDML).
Navigate to the drive or folder location where you want to save the XML document.
Click Save.
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. Open 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.
Click Export.