When you’re certain you’ve got everything arranged just right, it’s time to choose Create Merged Document from the Data Merge panel menu or click the button in the lower-right corner of
Trang 16 Apply text formatting to each field name in the text frame For example, if you want the <<company>> data to appear in bold, just select that field name and apply the bold style or a bold char-acter style or paragraph style.
Using a Master Page You don’t have to insert the data labels on your
master page, but we usually do because it makes the final merged document more flexible Specifically, if you need to make a change
or reimport the data, you can do so from the document InDesign is about to create rather than having to go back to this original docu-ment and more or less start the import process over However, if you
do put this stuff on the master page, make sure it’s on the right side
of a facing page document For example, you probably want to put it
on the right-hand page of a master page spread, or else nothing will show up on page 1 (which is a right-hand page)
InDesign now knows where the data is and what it’s supposed to look like in your InDesign document, so it’s time to merge the two Turn
on the Preview checkbox in the Data Merge panel and InDesign immediately replaces the data labels with the first record from the data file (see Figure 7-35) This way you can see if you set up the tem-plate correctly To preview another record, click the Next Record button at the bottom of the panel, or type a record number in the text field
When you’re certain you’ve got everything arranged just right, it’s time to choose Create Merged Document from the Data Merge panel menu (or click the button in the lower-right corner of the panel) to
Merging the Data
Figure 7-35 Data Merge Preview Click the Preview option at the bottom of the panel, or choose
Preview from the Data Merge panel menu…
…and InDesign will display a view layout of the first record (or any other record you specify using the controls at the bottom of the panel.
Trang 2pre-create a merged document (see Figure 7-36) Alternately, you can skip creating an InDesign document and create a PDF file instead by choosing Export to PDF from the panel menu.
Figure 7-36 Doing the Data Merge Choose Create Merged Document (or click the button at the bottom of
the Data Merge panel).
InDesign displays the Create Merged Document dialog box Set up the data merge using the controls in this dialog box and click the OK button.
InDesign creates a new document and merges the
data from the data file into the data template you
created, duplicating frames and applying formatting
as necessary In this example, we chose to lay out
multiple records per page
The headline is on the master spread—if
it weren’t, it would have been duplicated
with everything else.
Trang 3InDesign then offers you a number of options in the Create Merged Document dialog box.
Records The first tab of this dialog box lets you choose which
records you want to import from the data file You can also choose whether you want each data record to appear on its own page (choose Single Record from the Records per Document Page pop-up menu)
or whether you want more than one record (like a sheet of mailing labels) We’ll cover the more-than-one record choice below
If you turn on the Generate Overset Text Report with Document Creation checkbox, InDesign will save a text file to your hard disk if the import process causes any text frames to become overset That’s handy so we generally turn it on Similarly, we turn on the Alert When Images are Missing checkbox, because we want to know if something has gone wrong during the import process
Multiple Record Layout If you choose Multiple Records from the
Records per Document Page pop-up menu, InDesign attempts to duplicate your page objects in a grid on your page For example, let’s say you were making name tags for several hundred people You could create one or more text frames on your page (it doesn’t matter where on the page you put them), insert the data merge labels, and then specify Multiple Records The Create Merged Document dialog box has a Preview Multiple Record Layout checkbox that shows you what the layout will look like before you commit to the data merge procedure It takes a little time to process, but it’s well worth the wait,
as you’ll inevitably find you need to tweak something the first time you try it
You can control how InDesign lays out the frames on your page
in the Multiple Record Layout tab of the dialog box, including how much space you want between the rows and columns The Margins fields here simply overrides those in the Margins and Columns dialog box We wish we could save these settings as a preset to recall them quickly later, but no can do
Note that if you have laid out your initial template with more than one frame, InDesign treats them all as a single “group” that gets duplicated multiple times across the page Also, if you have more than one page in your template file, you can’t do multiple record
layout (n-up layout) because well, because it’ll just get too
confus-ing
Options The Options tab of the Create Merged Document dialog
box lets you control how Data Merge handles imported images, blank
Data Merge Layout Options
Trang 4lines in the data file, and large numbers of imported records Choose
a method from the Fitting pop-up menu to control what happens to images that don’t match the frame size you’ve drawn in the template For instance, you might want to choose Fill Frame Proportionally to get the largest image possible in the frame, but that will crop out a portion of the image if the image height/width ratio isn’t the same as the frame If you want imported images to be placed in the center of the frame rather than in the upper-left corner, turn on the Center in Frame checkbox (Of course, if you have no images in your data file, then you can ignore both of these.)
If Link Images is disabled, InDesign embeds all the images into the document itself When enabled, InDesign acts as though you placed the images, linking them to the file on disk
What should InDesign do when a whole line ends up being blank? For example, let’s say you’re inserting someone’s name on one line, their company name on the second line, and their address on the third line If someone isn’t affiliated with a company, then you’d nor-mally end up with a blank line However, if you turn on the Remove Blank Lines for Empty Fields checkbox, InDesign will simply delete that line from the final merged document Note that this only works
when there would be no text on that line—even a blank space after
the text label will foil this feature
The last option, Page Limit Per Document, lets you control how large the final document will be InDesign will import records and keep adding pages until this limit is reached However, if you wanted only single-page InDesign documents, you could change this number to 1 (That’s a good way to max out InDesign’s resources and possibly cause mayhem.)
Doing the Merge When you’re confident that all is well and you’ve
chosen your options wisely, click OK InDesign creates a new ment based on the one you built (the template) and the settings you made If your data merge labels were placed on the master page, they will also be on the master page of this new document, which will allow you to update the data, should the need arise
docu-When you first import the data source into the Data Merge panel, InDesign creates a link between the InDesign file and the txt or csv file—you can even see this link in the Links panel Then, when you create the new merged document, it, too, has that link (as long as the template fields were sitting on the master page rather than the document page) That means if some of the data changes, you don’t necessarily have to go back to the original and create a new merged
Updating Your Data
Trang 5file Instead, you can choose Update Content in Data Fields from the Data Merge panel menu However, this appears to work only when the data fields appear in a single text frame—if you used more than one text frame, it gives you an error message We think this is prob-ably a bug.
(You might think that clicking the Update button in the Links panel should do the same thing as Update Content in Data Fields
No such luck.)
If the names or number of fields in each record change in the data source (perhaps you decided to export from the database with more fields), you should to be able to choose Update Data Source from the panel menu We have never gotten this to work correctly Unfortu-nately, it appears that the best solution is to remove all of the data fields from your original template, choose Update Data Source (or Select Data Source again), and then reapply the data fields manually.Ultimately, we find Data Merge very handy for small or simple jobs, but it’s buggy enough and limited enough that we try not to lean too hard on it
The Best of All Possible Worlds
Can you get there from here? When you’re working with InDesign, you can almost always export or save files in a form you can use in another program, and you can usually produce files in other pro-grams you can import or open using InDesign There are definitely bumps in the road—sometimes, you’ve got to go through an inter-mediate program to convert files from one format to another (par-ticularly if the files came from another type of computer)
Someday, we’ll have a more complete, universal, and cated file format for exchanging publications PDF is getting very close to being that format, and it’s certainly making steps in the right direction When the great day arrives, we’ll be able to take page layouts from InDesign to Illustrator to QuarkXPress to Photoshop, using each program for what it’s best at without losing any format-ting along the way
sophisti-And the streets will be paved with gold, mounted beggars will spend the day ducking winged pigs, and the Seattle Mariners will win the World Series
Trang 6Frame-We’re not sure what our definition of a “long document” is, but we think that anyone building a book, a magazine, a newspaper, a jour-nal, or a catalog—just about any document, really, of any number
of pages—can benefit from the long document features in InDesign.There are three features in InDesign that relate directly to pub-lishing long documents
▶ Books You can tie multiple documents together into a book,
which appears in the form of a panel in InDesign From here, you can control page numbering, printing, and synchronize document attributes as styles, colors, and master pages
▶ Table of Contents If you use paragraph styles regularly, you’re
going to love the Table of Contents feature, which can build a table of contents (or a list of figures, or a table of advertisers, or any number of other things) quickly and easily
▶ Indexes Building an index is a hardship we wouldn’t wish on
anyone (we’ve done enough of them ourselves), but InDesign’s indexing features go a long way toward making it bearable
Trang 7Even though an InDesign document can be thousands of pages long, it’s best to split long documents up into smaller parts Splitting a large project into smaller parts is generally more efficient, especially when more than one person is working on the project at the same time The burning question is: if you break up your project into small documents, how can you ensure style consistency and proper page numbering among them? The answer is InDesign’s Book feature
Most people think of a book as a collection of chapters bound together to act as a single document In InDesign, a book is a collec-tion of InDesign documents on your disk or network that are loosely connected with each other via the Book panel In other words, just because it’s called a “book” doesn’t mean it’s not relevant for maga-zines, catalogs, or any other set of documents
There are five benefits to using the Book panel
▶ It’s a good way to organize the documents in a project, and it’s faster to open them using the Book panel than with File > Open
▶ If you use automatic page numbering in your document (see
“Numbering Pages” in Chapter 2, “Page Layout”), InDesign can manage the page numbering throughout the entire book
▶ You can print, package, or export one or more documents from the Book panel using the same settings without even having the documents open
▶ The Synchronize feature helps you ensure that styles, colors, and other settings are consistent among the documents
▶ By associating files together as a book, you can mix page sizes and page orientations in a publication—which you can’t do in a single InDesign document (without a third-party plug-in)
The more documents there are in your project, and the more pages, styles, colors, and whatnot are used in each document, the more useful the Book feature will be to you Even if you’re juggling two or three documents, it may be worth the minor inconvenience it takes to build a book
menu At this point, InDesign displays the New Book dialog box Tell the program where to save your new book file (you can put it anywhere you want on your hard drive or network, but you should put it somewhere easy to find—because you’ll be using it a lot)
Trang 8Book files appear in InDesign as panels When you’ve saved your new book, InDesign displays a new Book panel.
Adding and Removing
Book Documents
To add a document to your Book panel, click the Add Document button in the panel and choose a document from your disk or net-work (see Figure 8-1) If no documents on the panel are selected when you add a new document, the new document is added at the end of the list If you select a document first, the new document is added after the selected document You can also drag files directly from Windows Explorer or from the Mac OS X Finder windows into
a book panel; this is often the fastest way to get a folder full of files into a book
To add a document
to an empty book panel, click the Add button.
Synchronize
Save Print Add
Delete
Figure 8-1 Adding a Book Document
Select the file you want to add.
InDesign adds the document to the book.
If you accidentally insert a document in the wrong place in a Book panel, don’t worry—you can move a document up and down
on the list To do this, select the book document and drag it to a new location in the list (see Figure 8-2)
Although Adobe’s documentation points out that you can copy a document from one book panel to another by Option-dragging/Alt-dragging, we don’t recommend this in most cases Having the same document in more than one book can cause pagination problems and general confusion
Trang 9Figure 8-2 Moving a Book Document
Drop the document, and InDesign moves the document to a new position in the list.
…and drag it up or down in the list
To change the position
of a book document in the book list, select the document…
To remove a document from a Book panel, select the document and click the Remove Document button If you want to remove more than one document, select the documents (use Shift for contiguous selections, or Command/Ctrl for discontinuous selections on the list) and then click the Remove Document button Note that deleting
a document from the Book panel does not delete the file from disk; it
simply removes it from the list
To replace a book document, select the document in the Book panel and choose Replace Document from the Book panel menu InDesign displays the Replace Document dialog box Locate and select the file you want to replace the document with, then click the
OK button to close the dialog box and replace the document
Converting Books
from Past Versions
InDesign CS4 can open and convert books saved in previous sions of InDesign It’s pretty straightforward—just open the book There are, however, a couple of options that can help you—or hurt you—during the process of converting the book and the documents
ver-in the book
▶ If, after opening the book, you choose Save Book from the Book panel menu, InDesign will over write the InDesign book file with the converted book Unless you have a backup copy of the book file, we think that you should save the converted book to
a new book file by choosing Save Book As Our experience is that every time we save over a previous version file—in any program—we end up regretting it at some point
▶ After you’ve opened and converted a book from an earlier sion of InDesign, you can select the Automatic Document Con-version option from the Book panel menu While this sounds like a great idea, it will over write every InDesign document in
Trang 10ver-the book with an InDesign CS4 version of ver-the document Again, unless you have a backup of the previous version files, we think you should avoid this option If you do not use this option, however, you’ll need to save each document in the book to a new file, which can be tedious if your book contains a large number
of documents
Using a Book As a Navigational Tool
Because there is only a very loose connection among the various documents in the Book panel, you could use this feature as an infor-mal database of documents For instance, let’s say you’ve built 15 different product data sheets and three small brochures for a client, and the client is forever updating them Even though the documents may each use very different colors, styles, and so on, you could put them all on one Book panel and save this collection under the client’s name Next time the client calls for a quick fix, you don’t have to go searching for a document; just open the Book panel and double-click the document name to open it
However, if you do this, you probably first want to turn off the book panel’s autorenumbering feature (see “Page Numbering and Sections,” later in this chapter)
your regular routine of editing and preparing the documents There are, as usual, a few things you should keep in mind
▶ Whenever possible, you should open your book’s documents while the Book panel is open (The fastest way to open a docu-ment is to double-click the document name in the Book panel.) When you open and modify a document while the panel is not open, the panel isn’t smart enough to update itself (see “File Status,” below) If InDesign can’t find your document (perhaps it’s on a server that is not mounted), it’ll ask you where it is
▶ In general, if you’re going to use automatic page numbering, you should let the Book panel handle your page numbering for you (see “Page Numbering and Sections,” later in this section)
▶ Each time we use Save As, we change the name slightly ument1,” “mydocument2,” and so on), so we can always go back
(“mydoc-to an earlier version if necessary However, note that the Book panel doesn’t catch on to what you’re doing; it just lists and keeps track of the original document So every time you use Save As, you have to select the original file and select Replace Document from the Book panel’s menu
Trang 11Note that you cannot Undo or use Revert to Saved for changes
in the Book panels, so be careful what you do in these beasts Also, the changes you make to your Book panel, including adding, remov-ing, and reordering documents, aren’t saved until you close the panel, quit InDesign, or select Save Book from the panel’s menu
displays the status of each document in the book There are five sible icons in the Status column of the panel: Available, Open, Modi-fied, Missing, or In Use (see Figure 8-3)
pos-▶ Available The normal status of a document is Available (no
icon) This means that no one has the document open for editing and that the document has not changed since the last time it was open on the computer you’re using
▶ Open When you have a document open on your system, the
status of that file is listed as Open (an open book icon)
▶ Modified When you or anyone else who has access to the file
opens and changes a document while the Book panel is not open, the status will be listed as Modified in the Book panel (triangle icon) It’s easy to change the status back to Available: open the file while the Book panel is open, then close the document again
Or, even easier: select Update Numbering from the panel’s menu
▶ Missing If you move a document after adding it to the Book
panel, InDesign won’t be able to find it, and the status is listed
as Missing (red stop sign icon) To “find” a file again, click the chapter name in the Book panel; InDesign displays the Replace Document dialog box in which you can tell it where the document now resides
double-▶ In Use If someone else on your network opens one of the
docu-ments in your book via the Book panel, the Status field of the Book panel lists that chapter as in use (padlock icon)
It’s important to pay attention to the Status column readings, because documents must be either Available or Open in order to synchronize, print, or renumber properly
individually Adobe anticipated this, and if you put your book file and documents on a server, more than one person can open the panel at the same time (Only one person can open an InDesign document at a time, however.) While this isn’t nearly as powerful as
Trang 12a full-blown document management system, it’s certainly useful if a group of people have to work on different documents in the book at the same time.
We don’t like working on documents when they’re on a server It makes us nervous, and it’s also really slow Instead, we prefer to copy the file to our local hard drive, edit it at our leisure, and then return the file to the server when we’re done with it
There are two problems with this First, the Book panel doesn’t update properly Second, other people on your network might not realize that you’ve got the “live” file, so make it clear to them: hide the document on the server, or put it in another folder called “work
in progress” or something like that
Fortunately, the Synchronize Book button on the Book panel lets you ensure that all styles, color settings, variables, numbered lists, and master pages are consistent throughout the documents in a book Here’s how it works
The Master Document
One document on the Book panel is always marked as the master document (by default, it’s the first document you add to the panel; InDesign’s documentation refers to this document as the style source document) The master document—which has a cryptic little icon
to the left of it—is the document to which all the other documents will be synchronized That means that if you add a new color to the master document and click the Synchronize Book button, the color will be added to all of the other documents in the book If you add a new color to a document that is not the master document, the color won’t be added when you synchronize the documents
Figure 8-3 Book Panel
Open Available Missing
Trang 13You can always change which document is the master document
To do that, click in the left column of the Book panel next to the document you want to set as the master document
which files you want to synchronize in the Book panel; ber that you can Shift-click to select contiguous documents or use Command-click/Ctrl-click to select discontinuous documents Or, if you want to synchronize all the files, make sure that no documents (or all documents) are selected in the panel
remem-▶ A style, color swatch, variable, numbered list, or master page that
is defined in the master document but not in another document gets added to that other document
▶ If a setting is named the same in both the master document and another document, the definition for that setting in the master document overrides the one in the non-master document
▶ If a setting is not defined in the master document but exists in some other document, it’s left alone (This means you can have
“local” settings that exist in one document that don’t have to be copied into all the others.)
▶ By selecting Synchronize Options in the Book panel’s menu, you can choose which settings will be synchronized among the documents (see Figure 8-4) However, if the master docu-ment contains table of contents styles (which we talk about later in this chapter) and you turn on the TOC Styles check box
in the Synchronize Options dialog box, all the character and
Figure 8-4 Synchronization
Options
Choose Synchronize Options
from the Book panel menu.
Turn options on (to include them
in the synchronization) or off (to exclude them).
Trang 14paragraph styles are synchronized, even if you’ve turned off the Character Styles and Paragraph Styles check boxes Select Smart Match Style Groups if you have moved styles in or out of style groups (folders) and all your styles are uniquely named.
Synchronizing a document can be a time-consuming process—the more documents and the more settings, the longer it takes
Page Numbering and Sections
Perhaps the most helpful aspect of the Book feature is that it keeps track of your page numbering for you and updates the page numbers when you add pages to or delete them from a document, or if you add
a new document between two other documents in a book Of course, this only works if you’ve placed automatic page numbers on your document pages (see “Numbering Pages” in Chapter 2)
Let’s say you’ve got one 16-page document in your Book panel already When you add another document, InDesign automatically sets its first page number of the new document to 17 (provided you had not already specified the first page as a section start in the Num-bering and Section Options dialog box) If you later open the first document and add two pages, InDesign automatically renumbers the second document—the next time you open it, you’ll see that it starts on page 19
If, on the other hand, you use the Numbering and Section Options dialog box (you can jump to this feature quickly by double-clicking
on the page numbers in the Book panel) to create a section start, the Book panel respects that Any subsequent documents in the Book panel continue the page numbering from where the previous docu-ment’s page numbering left off
If you don’t use automatic page numbers, or you have manually specified page numbers for each document in your book, you will probably tire of watching InDesign repaginate your book Fortu-nately, you can turn this feature off by selecting Book Page Num-bering Options from the Book panel’s menu, and unchecking Automatically Update Page and Section Numbers (see Figure 8-5)
Odd Versus Even Page Numbers
When chapter 2 ends on page 45, what page number does InDesign assign to the first page of chapter 3? If you’re in the book business, you probably want chapter 3 to start on page 47, because it’s a right-hand page (Olav insists on editing and/or adjusting the layout to avoid
a blank left-hand page.) Catalog and magazine publishers would want the third file to begin on page 46, even though it’s a left-hand page You can specify what you want InDesign to do by choosing Book Page Numbering Options from the Book panel’s menu You’ve
Trang 15got three choices: Continue from Previous Document, Continue on Next Odd Page, and Continue on Next Even Page.
When you turn on the Insert blank page option, InDesign adds
a page to fill any gaps between chapters For example, if chapter 2 ends on page 45 and you turn on the Continue on Next Odd Page, then InDesign adds a blank page at the end of chapter 2 This page is truly blank—it’s not based on any master page If you want a running head on that page, you’ll have to apply the master page yourself (By the way, David once almost drove himself mad trying to figure out why he couldn’t delete the last page from a document The answer, of course, was that he had forgotten this feature was on.)
InDesign handle the numbering for you using chapter numbers To set up chapter numbering, select the first page in the document, then choose Numbering & Section Options from the Layout menu (or from the Pages panel menu) In the Document Chapter Numbering section of the dialog box (see Figure 8-6), choose a numbering Style (such as regular numerals, roman numerals, or letters) Then choose whether you want to specify a chapter number for this book or base the number off the chapter number of the previous document in the book panel Note that even though a single document can have mul-tiple sections, it can have only one chapter number
Once you have set up the Numbering & Section Options dialog box, you can “type” the chapter number in a text frame by inserting
a chapter number text variable For more information on text ables, see Chapter 3, “Text.”
vari-Note that when your chapter numbering changes (for example,
if you rearrange the order of the documents in the book panel), the chapter numbers in your documents are not updated until you choose
Figure 8-5 Book Page Numbering Options
Choose Book Page Numbering Options from
the Book panel menu.
Select page numbering options
in the Book Page Numbering Options dialog box.