Writer Guide

Chapter 13
Working with Master
Documents

CopyrightThis document is Copyright © 2011 by its contributors as listed below. You may distribute it and/or
modify it under the terms of either the GNU General Public License(http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution
License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.
All trademarks within this guide belong to their legitimate owners.

Contributors
Ron Faile Jr.
Barbara Duprey

Feedback
Please direct any comments or suggestions about this document to:
documentation@libreoffice.org

Acknowledgments
This chapter is based on Chapter 13 of the Writer Guide for OpenOffice.org. The contributors tothat chapter are:
Jean Hollis Weber
Ian Laurenson
Sharon Whiston

Michele Zarri
Scott Rhoades

Daniel Carrera
Janet M. Swisher

Publication date and software version
Published 18 February 2011. Based on LibreOffice 3.3.

Note for Mac users
Some keystrokes and menu items are different on a Mac from those used in Windows and Linux.
The table below gives some common substitutions for the instructions in this chapter. For a moredetailed list, see the application Help.
Windows/LinuxMac equivalent

EffectTools → Options menu
selection

LibreOffice → Preferences

Access setup options

Right-click

Control+click

Open context menu

Ctrl (Control)z (Command)

Used with other keys

F5

Shift+z+F5

Open the Navigator

F11

z+T

Open Styles & Formatting window

Documentation for LibreOffice is available at www.libreoffice.org

Contents
Copyright......................................................................................................................................... 2
Note for Mac users........................................................................................................................... 2
Why use a master document?..........................................................................................................4
Styles in master documents and subdocuments..............................................................................4
Creating a master document: scenarios...........................................................................................5
Splitting a document into master and subdocuments.......................................................................5
Combining several documents into a master document...................................................................6
Starting with no existing documents.................................................................................................7
Step 1. Plan the project............................................................................................................... 7
Step 2. Create a template............................................................................................................ 8
Step 3. Create the master document...........................................................................................8
Step 4. Create subdocuments.....................................................................................................8
Step 5. Add some pages to the master document.......................................................................9
Step 6. Insert the subdocuments into the master document......................................................10
Step 7. Add table of contents, bibliography, index......................................................................11
Restarting page numbering............................................................................................................ 12
Editing a master document............................................................................................................13
Changing the appearance of the master document...................................................................13
Editing subdocuments............................................................................................................... 14
Adding, deleting, or renaming subdocuments............................................................................14
Cross-referencing between subdocuments....................................................................................14
Preparing items as targets for cross-referencing.......................................................................14
Using bookmarks..................................................................................................................15
Setting references.................................................................................................................15
Inserting the cross-references...................................................................................................15
Using the Navigator........................................................................................................................ 17
Creating one file from a master document and its subdocuments..................................................18
Problem solving............................................................................................................................. 20
Anchoring pictures to a page.....................................................................................................20
Restarting list numbering when using custom styles.................................................................21

Working with Master Documents3

Why use a master document?
Master documents are typically used for producing long documents such as a book, a thesis, or along report. A master document (*.ODM) joins separate text documents (*.ODT) into one larger
document, and unifies the formatting, table of contents (TOC), bibliography, index, and other tables
or lists.
A master document is especially useful in these situations:• When graphics, spreadsheets, or other material cause the file size or number of pages tobecome quite large; writing, reviewing, and editing may be easier when done on subsets ofthe full document.
When different people are writing different chapters or other parts of the full document.

•• When files will be published as stand-alone documents as well as becoming part of a larger•

document. The chapters of this Writer Guide are an example of this.
When subdocuments are used in more than one final document.

You can use several methods to create master documents. Each method has its advantages anddisadvantages. Which method you choose depends on what you are trying to accomplish. The
different methods are described in this chapter, along with suggestions on when to use each one.

Tip

A master document is not always the best method to use in any of the situations
given above. You may find that an ordinary document (.ODT) containing sections
linked to other files may do the job just as well. For more about using sections to
combine files, see Chapter 4, Formatting Pages.

Styles in master documents and subdocuments
A subdocument can be used in several master documents. Each master document may havedifferent style definitions (font, type size, color, page size, margins, and so on), which affect theappearance of the final document, but the individual subdocuments retain their original
characteristics.
The relationship between styles in a master document (*.ODM) and its subdocuments (*.ODT) is
as follows:• Custom styles used in subdocuments, such as paragraph styles, are automatically
•
•
•

4

imported into the master document.
If more than one subdocument uses a custom style with the same name (for example,
myBodyText), then only the one in the first subdocument is imported into the masterdocument.
If a style with the same name exists in the master document and in the subdocuments (forexample, Default), then the style is applied as defined in the master document.
The styles in the subdocuments are only changed in the master document, so when asubdocument is opened for editing the original styles are not affected.

Working with Master Documents

Tip

If you use the same document template for the master document and its
subdocuments, the subdocuments will look the same when they are loaded into
the master document as they do when viewed as individual files. When you modify
or create a style, make the change in the template (not in the master document or
any of the subdocuments). Then when you reopen the master document or a
subdocument, the styles will update from the template.
For subdocuments used in several master documents with different templates, thistip is not so relevant.

Creating a master document: scenarios
The three most common scenarios for creating a master document depend on the current state ofyour document:• You have one existing document (a book) that you want to split into several subdocuments••(chapters) that will be controlled by the master document.
You have several existing documents (chapters) by one or more authors that you want to
combine into one book, controlled by the master document.
You have no existing documents but intend to write a long book containing several
chapters, possibly by multiple authors.

We will look at each of these scenarios in turn.

Splitting a document into master and subdocuments
When you have one existing document that you want to split into a master document and several
subdocuments, you can have Writer split the document automatically at headings with an outline
level of your choice.
Although this method is quick and easy, some cleanup work may be necessary:• The page style of the first page (and possibly all pages) in each subdocument reverts to••

Default. If you are using custom page styles and you want the subdocuments to use thesame page layout, whether part of the master document or standalone, you will need toreapply at least the first page style.
The automatically generated file names for the subdocuments are maindocnameX.odt,
where X is 1, 2, 3, and so on. If you have a Preface or other “chapter” starting with a
Heading 1 before Chapter 1, the file names will not directly correspond to the chapter
numbers. You may wish to rename the subdocuments; see “Adding, deleting, or renaming
subdocuments” on page 14.
If the original document is associated with a template, the .ODM file will also be associatedwith that template, but the subdocuments will not. The subdocuments will inherit the styles
in the original document, but their association with the template will be lost. You may wish
to use the Template Changer extension to reassociate the template with each of the
subdocuments.

How to do it:1) Open the document and choose File → Send → Create Master Document.
2) On the Name and Path of Master Document dialog box (Figure 1):a) Navigate to the folder where you want to save the master document and its
subdocuments (or create a new folder).
b) Type a name for the master document in the File name box.
Splitting a document into master and subdocuments

5c)

In the separated by: list, choose the outline level where the file should be split into
subdocuments. Usually this is Outline: Level 1 for a chapter heading, but yourdocument may be structured differently. For more information about outline levels, see“Defining a hierarchy of headings” in Chapter 6, Introduction to Styles.
d) Leave the Automatic file name extension option selected, and click Save to split the
document into subdocuments and create the master document.
If you selected Outline: Level 1 and the paragraph style at that level is Heading 1, each of the
subdocuments begins with a Heading 1 paragraph.

Figure 1: Splitting a document into master and subdocuments

Combining several documents into a master document
When you have several existing documents, you can combine them into one document controlled
by a master document.
This method works best when all of the documents were created from the same template, but you
can also use it when the documents have been created from different templates. This method is
especially useful when the subdocuments are created or maintained by multiple writers. For
example, you might be creating an anthology of short stories or a book of symposium papers.
How to do it:
Use one of the techniques described in “Starting with no existing documents” below to create a
blank master document and insert the other documents as subdocuments of the master document.

6

Working with Master Documents

Starting with no existing documents
When you start with no existing documents, you can set up everything the way you want from the
beginning. Follow these steps, in the order given. Each step is explained in detail in the following
subsections.
Step 1. Plan the project
Step 2. Create a template
Step 3. Create the master document
Step 4. Create subdocuments
Step 5. Add some pages to the master document
Step 6. Insert the subdocuments into the master document
Step 7. Add table of contents, bibliography, index

Step 1. Plan the project
Although you can make changes at most steps in this process, the more you can plan before you
start, the less work you will have to do to correct any problems later. Here are some things youneed to plan.
Parts of book or report required. What pages will be in the master document and what will be in
the subdocuments?
Consider as an example a book with the parts given in the table below.
Part
Title (cover) page

Location
In master document

Copyright page

In master document

Table of contents (TOC)In master document

Preface (Foreword)

Subdocument

Chapters 1 to 7

Subdocuments

Index

In master document

Page, paragraph, character, frame, and numbering styles. See Chapter 6, Introduction to
Styles, and Chapter 7, Working with Styles, for instructions on how to create or modify styles andexamples of the use of styles in book design. Pay particular attention to setting up headings using
styles, as described in “Defining a hierarchy of headings” in Chapter 6, Introduction to Styles.
Fields and AutoText entries, as required. See Chapter 3, Working with Text, and Chapter 14,
Working with Fields, for ideas.
One or more templates for master and subdocuments. If you are starting a new project, create
the master document and all the subdocuments from the same template. Not using the same
template can create style inconsistencies that could cause your document not to look like you
expect. For example, if two subdocuments have a style with the same name that is formatted
differently in each document, the master document will use the formatting from the first
subdocument that was added.
Page numbering. In our example, the pages are numbered sequentially from the title page. (Thetitle page style can be defined to not show the page number, but it will still count as page 1.)
Therefore the first chapter begins on a higher number page, for example page 5. To create a bookin which the page numbering restarts at 1 for the first chapter, you need to do some additional
work. See “Restarting page numbering” on page 12.
Starting with no existing documents

7

Step 2. Create a template
You can create your template from an existing document or template that contains some or all of
the page, paragraph, character, and other styles you want for this document, or you can create thetemplate from a blank document. For more about templates, see Chapter 10, Working with
Templates.
Be sure to use File → Templates → Save when creating the template.

Note

A master document (*.ODM) created from a template is associated with that
template, but the name of the template is not shown in the Document Properties
dialog (File → Properties) as it is for *.ODT files.

Step 3. Create the master document
It does not matter in what order you create the master and subdocuments, and you do not have tocreate all the subdocuments at the same time, when you are starting the project. You can add new
subdocuments at any time, as you need them.
Follow this process to create the master document.
1) Open a new document from the template you created in Step 2, by choosing File → New →Templates and Documents, then selecting the template you created. Be sure the firstpage of this new document is set to the page style you want for the first page of the final
document; if it is not, change it. In our example, the style for the first page is Title page.
2) If any text or page breaks came into this document from the template, delete the text. (The
TOC, index, and any fields in headers and footers can stay.)3) Click File → Send → Create Master Document. Save the master document in the folder forthis project. We will return to this master document later. For now, you can either leave it
open or close it.

Note

Using File → New → Master Document is not recommended, because the resulting
master document file (.ODM) is not associated with a template. However, you canlater apply a template using the Template Manager extension.

Step 4. Create subdocuments
A subdocument is no different from any other text document. It becomes a subdocument only when
it is linked into a master document and opened from within the master document. Some settings in
the master document will override the settings in a subdocument, but only when the document isbeing viewed, manipulated, or printed through the master document.
Create a subdocument in the same way as you create any ordinary document:
1) Open a blank document based on the project template (very important) by choosing File →New → Templates and Documents, then selecting the required template.
2) Delete any unwanted text or other material, and set the first page to the page style you
specified for the first page of a chapter.
3) Click File → Save As. Give the document a suitable name and save it in the folder for thisproject.

8

Working with Master Documents

If you already have some of the chapters written, the files are probably not based on the template
you just created for this project. You will need to change the template attached to the existing files.
You can do this manually, or by using the Template Changer extension to LibreOffice; bothmethods are described in Chapter 10, Working with Templates.

Step 5. Add some pages to the master document
To assist you, do the following:• Make sure paragraph marks are showing. You can set them in Tools → Options →•LibreOffice Writer → Formatting Aids, or click the Nonprinting Characters iconon the Standard toolbar.
Show text boundaries, table boundaries, and section boundaries (Tools → Options →LibreOffice → Appearance).

If your master document does not contain any required “front matter” such as a title page, copyrightpage, or TOC page, add them now. The example in this section uses the sequence of page styles
given in “Step 1. Plan the project” on page 7.
1) Type the contents of the title page (or leave placeholders and fill in later). With the insertion
point in the last blank paragraph on the page, click Insert → Manual Break. On the Insert
Break dialog box, select Page break and the page style for the second page (Copyrightpage in our example), and leave the Change page number option deselected. Click OK.

Figure 2: Inserting a page break between the title page
and the copyright page2) Type the contents of the copyright page (or leave placeholders). With the insertion point in
the last blank paragraph on the page, insert another manual page break, this time setting
the page style to Table of Contents page.
3) On the Table of Contents page, leave a blank paragraph or two or insert a TOC (Insert →Indexes and Tables → Indexes and Tables). The TOC will not have any contents until you
add the subdocuments, but you should see a grey mark or box indicating its location. For
more about inserting and formatting TOCs, see Chapter 12, Tables of Contents, Indexes,
and Bibliographies.

Note

Depending on the style definitions for the first paragraph (usually a heading) on the
Copyright and TOC pages, you may not need to insert manual page breaks.

Starting with no existing documents

9Step 6. Insert the subdocuments into the master document
Now we are ready to add the subdocuments.

Tip

Subdocuments are inserted into a master document before the item highlighted in
the Navigator. If you insert the last subdocument first, and then insert the othersubdocuments before the last one, they will end up in the correct sequence without
the necessity of moving them up or down in the list.

1) Display the Navigator (click View → Navigator, or press F5, or click the Navigator icon.
2) Be sure the Navigator is showing the master view (see “Using the Navigator” on page 17).
Click on the Toggle icon at the upper left to toggle between regular and master views.
3) On the Navigator, select Text, then click and hold on the Insert icon, move the mousepointer down, and click File.

Figure 3: Inserting a subdocument into a masterdocument using the Navigator
A standard File Open dialog box appears. Select the required file (which you created in
Step 3) and click OK. This example uses 7 chapters and a preface; we will load Chapter 7
first, as suggested in the Tip above.
The inserted file is listed in the Navigator before the Text item, as shown in Figure 4.

Figure 4: Navigator after inserting one subdocument
4) Because the Text section contains the title page and other material, highlight it and click theMove Up icon to move it to the top of the list.
5) Highlight the subdocument you just inserted (Chapter 7), then click and hold on the Insert
icon, move the mouse pointer, and click File to insert the first subdocument; in thisexample, Preface. Chapter 7 remains highlighted. Repeat with Chapter 1, Chapter 2, andso on until all the subdocuments have been added to the list. The Navigator will now looksomething like Figure 5.
6) Save the master document again.

10

Working with Master Documents

Figure 5. The Navigator showing a series offiles in a master document

Step 7. Add table of contents, bibliography, index
You can generate a table of contents, bibliography, or index for the book, using the masterdocument. You must insert these items into a text section in the master document. For more about
these document elements, see Chapter 12, Creating Tables of Contents, Indexes, andBibliographies.
Put the insertion point on the page in the first text section where the table of contents is to go andchoose Insert → Indexes and Tables → Indexes and Tables to create the table of contents.
If you do not have a Text section at the end of the master document, insert one before the last
subdocument, then move it down so it is after the last subdocument. Now, if you have included
bibliographic entries in your subdocuments, you can put the insertion point on the page in this lasttext section where the bibliography is to go and create the bibliography.
If you have included index entries in your subdocuments, put the insertion point on the page in thelast text section where the index is to go and create the index.
Figure 6 shows the Navigator after addition of a TOC and index.

Figure 6: Navigator showing subdocuments, table ofcontents, and index in a master document
Starting with no existing documents

11Restarting page numbering
The example in the previous section showed a very basic collection of files with sequential page
numbering. This is useful for many documents, including e-books, but a typical “printed book” has
the following sequence of page numbers:

•
•
•
•

No page numbers on cover page or copyright page
Lower-case roman numerals in the front matter, starting with i
Arabic numerals in the body of the document, starting with 1
Page numbering sequential through the rest of the bookTo set up a master document to produce such a book, you need to define a different paragraphstyle for the heading of the first chapter and assign two special characteristics to it.
ExampleEach chapter may start with a Heading 1 paragraph, set up on the Text Flow tab of the Paragraph
Style dialog box to start on a new page (Figure 7). The Page number is set to 0, with the effect that
numbering continues from the number of the previous page.

Figure 7: Text Flow tab of Paragraph Style dialog box for Heading 1
Look on the Outline & Numbering tab (Figure 8) of this dialog box to see what outline level
Heading 1 is assigned to. Usually this will be Outline Level 1. The level cannot be changed here
because it has been set in Tools → Outline Numbering.

Figure 8: Outline & Numbering tab of Paragraph Style dialog box for Heading 1

12

Working with Master Documents

Only one paragraph style can be assigned to Outline Level 1 through Tools → Outline Numbering.
However, you can assign additional paragraph styles to any outline level by using the Outline &Numbering tab on the Paragraph Style dialog box.
Therefore, you want to define a style called Heading 1 Chapter 1 that is identical in appearance to
Heading 1 but has one essential difference: on the Text Flow tab, set the Page number to 1 (Figure9). Then, on the Outline & Numbering tab, set the Outline level to Level 1 (Figure 10). This ensuresthat the heading will appear in the Table of Contents along with the other chapter headings. (The
Numbering Style for this heading is None, as it was not assigned an outline level through the
Outline Numbering dialog box.
Now, assign the new style to the first paragraph of Chapter 1, and you’re done.

Figure 9: Set the page number to restart at 1 for this heading style

Figure 10: Assign the style to outline level

Editing a master document
After creating a master document, you may want to change its appearance or contents.

Changing the appearance of the master document
You can change the styles in the template as your project develops. Do not make changes tostyles in the master document or in any of the subdocuments—make those changes in thetemplate.

Editing a master document

13

To update the master document (and all of the subdocuments) with changes to the template, justopen the master document. You will get two messages: first, to ask if you want to update all links;
and second, if you want to apply the changed styles. Answer Yes to both of these messages.

Editing subdocuments
You cannot save edits made to a subdocument from within the master document. Instead, youmust open the subdocument, either by double-clicking on it in the master document’s Navigator, orby opening it from outside the master document. Then you can edit it just as you would edit anyother document.
If, while editing a subdocument, you make any changes to the styles that you want to apply to themaster document, you must copy those changed styles to the master document or to its template.
A better strategy is to make the changes directly in the master document or its template.
If you change the contents of any subdocument, you need to manually update the table ofcontents, bibliography, and index from within the master document.

Adding, deleting, or renaming subdocuments
To add a subdocument, follow the method described in “Step 6. Insert the subdocuments into themaster document“ on page 10.
To delete a subdocument, right-click on its filename in the Navigator and choose Delete.
If you rename a subdocument by changing its filename, the next time you update links in themaster document, that subdocument will show up as a broken link (shown in red). You can fix thisby right-clicking on it in the Navigator, choosing Edit Link, and selecting the renamed file; however,the file name shown in the Navigator does not change (only the link changes). This can be quite
confusing, so a better strategy is to delete the subdocument from the Navigator and then add therenamed file.

Cross-referencing between subdocuments
The methods described earlier in this chapter are all most writers will need when using masterdocuments. However, you might want to include automatically updated cross-references between
subdocuments. This section describes how to do this.
The process to create cross-references between subdocuments is time consuming, but it works.

Preparing items as targets for cross-referencing
Before you can insert a cross-reference to anything that is not automatically shown on the
References tab, such as a heading, you must prepare or “set” that heading as an item to bereferenced. To do this, you can either use bookmarks or set references.
When you set references, be sure to select the entire text you want to use as the reference, suchas a heading or figure number. Keep a list of what you have named the reference fields, and be
sure every name is unique. One way to keep track of this information is by putting it in a separate
text file or a spreadsheet.
The field names are case-sensitive. You can check the field name by holding the cursor over thereferenced item. In our example (Figure 11), the heading has the field name word count.

14

Working with Master Documents

Figure 11: Finding the field name for a heading

Using bookmarks
Bookmarks are listed in the Navigator and can be accessed directly from there with a single mouseclick. To insert a bookmark:1) Select the text you want to bookmark. Click Insert → Bookmark.
2) On the Insert Bookmark dialog box, the larger box lists any previously defined bookmarks.
Type a name for the new bookmark in the top box. Click OK.

Figure 12: Inserting a bookmark

Setting references
1) Click Insert → Cross-reference.
2) On the Cross-references tab of the Fields dialog box (Figure 13), click Set Reference in
the Type list. The Selection list shows any references that have been defined. You canleave this page open while you set many headings as references.
3) Click in the document and highlight the text of the first heading to be used as a target for across-reference. Click on the Fields dialog box. The text of the heading will appear in the
Value box in the lower right of the dialog box. In the Name box, type some text by which
you can identify this heading.
4) Click Insert. The text you typed in the Name box now appears in the Selection list.
5) Repeat steps 3 and 4 as often as required.

Inserting the cross-references
1) Open the master document. In the Navigator, select a subdocument, right-click and choose
Edit from the context menu. The subdocument opens for editing.
2) In the subdocument, place the cursor where you want the cross-reference to appear. Click
Insert → Cross Reference.
3) On the Cross-references tab of the Fields dialog box (Figure 14), select Insert Referencein the Type list on the left hand side. The Selection list in the middle column shows only thereference field names for the subdocument you are using, so ignore that list and check thelist you created manually in step 1.

Cross-referencing between subdocuments

15

Figure 13: Setting text to be used as a target for a cross-reference

Figure 14. Fields dialog box showing manual entry of field name4) In the Name field in the lower right hand column, type the name of the reference you set in
the subdocument you are referring to. In our example, the reference is in Chapter 3, and its
name is word count.

16

Working with Master Documents

1) Click Insert, type any text you want to appear between the reference and page number(such as “on page”), and then insert another reference with the Page format. Nothing willappear in the subdocument except tiny gray bars indicating the fields. When you hover themouse pointer over one of these fields, you will see the field name.

Figure 15: Viewing the field name
(You can turn on the display of field codes by clicking View → Field Names. The two fields
shown as gray lines in Figure 15 now look like Figure 16.)

Figure 16. Displaying field codes
2) After you have inserted all the cross-references required in the subdocument, save andclose it and return to the master document window.
Within the master document, navigate to the page of the subdocument on which you inserted thecross-reference field. You should now see the text of the cross-reference appear in the spot where
you inserted it, because within the master document, the subdocument can find the target of thatfield reference.

Figure 17. Field contents visible
This technique also works if you open a subdocument directly in step 2 (that is, not from within themaster document) and insert a cross-reference field.

Using the Navigator
The Navigator is a very useful tool that helps you move quickly to specific parts of your document.
It also provides information about the content of the document and enables you to reorganize
some of the content. For example, if each chapter in your final book is a separate document, thenin the master document they can be reordered, and the references are renumbered automaticallyand the table of contents and index can be updated.
In Writer, the Navigator has two distinct forms. One form is used in ordinary text documents andthe other in master documents.
In an ordinary text document, the Navigator displays lists of the graphics, tables, index entries,
hyperlinks, references, and other items in the document, as shown on the left hand side of Figure
Using the Navigator1718. Click the indicator (+ sign or triangle) by any list to display the contents of the list. You candouble-click an entry in the Navigator and jump immediately to that place in the document.

Figure 18. The Navigator for a text document (left) and for a master document (right)
In a master document, you can toggle between the regular and master views by clicking on the
Toggle icon at the upper left. In the master view, the Navigator lists the subdocuments and text
sections, as shown on the right hand side of Figure 18. The use of the Navigator in a masterdocument is covered in more detail later in this chapter (see “Step 6. Insert the subdocuments into
the master document” on page 10 and “Cross-referencing between subdocuments” on page 14).

Creating one file from a master document and its
subdocuments
Master documents are .odm files containing linked subdocuments, which are in .odt format.
Although linked files are very useful when writing and editing a large document such as a book,sometimes you might need to have a copy of the entire book in one file.
To export a master document to a .odt file (without affecting the original .odm file):
1) Open the master document. Choose File → Export from the menu bar.
2) On the Export dialog (Figure 19), type a name for the exported .odt file and choose
OpenDocument Text (.odt) from the File format list. Click Export. This step changes
the .odm file into a .odt file, with each subdocument in a separate section.
3) Close the master document and open the new .odt file, updating all links.
4) Choose Edit → Links from the menu bar.

18

Working with Master Documents

Figure 19: Exporting a master document to an OpenDocument Text (.odt) fileTip

If the Links command is grayed-out, the cursor is probably in a write-protectedpart of the document (for example, in one of the linked documents). Move thecursor into a part of the document that is not write-protected; the Links commandthen becomes available.

5) The Edit Links dialog shows all the linked files. Select all the files in the Source file list andclick Break Link. This step embeds (includes) the contents of all the subdocuments into
one single file (but with each subdocument remaining in a separate section) and removes
the write protection on the sections.

Figure 20: Breaking links to include files in one document
6) After breaking the links, you may also wish to remove some or all of the sections. To dothis, go to Format → Sections, select the sections you wish to remove, and click Remove.
The contents of those sections remain in the document; only the section markers are
removed.

Tip

The Help does not mention steps 4 and 5 above, giving only the step for removing
the sections. If you have no hidden sections, that technique works fine and isfaster; however, if you want to break the links but retain some or all of the sections(particularly hidden sections), then the method described in this chapter is safer.

Creating one file from a master document and its subdocuments

19

Problem solving
Some combinations of choices do not work together, and some techniques that affect masterdocuments are not at all obvious. This section describes some problems and what to do about
them.

Anchoring pictures to a pageThe problem
A picture (graphic) anchored “to page” in a subdocument is not displayed in the master document
although it always appears correctly in the subdocument.
Because the master document reorganizes the page flow, page numbers, and cross-references
when it collates all the subdocuments together, the absolute reference to a page X in a
subdocument is lost in the master document. The picture loses its anchor reference and simply
disappears.
The solution
To avoid this problem but keep pictures positioned precisely on a particular page, anchor the
pictures as follows:
1) Right-click on the picture and choose Picture from the context menu.
2) On the Type tab of the Picture dialog box (Figure 21), set the anchor to To character or To
paragraph.
3) Under Position, choose suitable horizontal and vertical references to the page. Click OK tosave the changes.

Figure 21. Anchoring a graphic and setting its position on a page

20

Working with Master Documents

Restarting list numbering when using custom styles
The problem
When custom numbering styles are used for lists, the first item in the first list in a file continues
numbering from the last list in the previous chapter.
The solution
You need to explicitly set the first list item to restart numbering at 1. However, if you right-click on
the paragraph and choose Restart numbering, the setting is not saved when the file is saved.
(This works for other lists in a document, but not the first.)
Here is the secret:1) Right-click on the first list item in the first list in the document and choose Paragraph, not
Restart Numbering.
2) On the Paragraph dialog, go to the Outline & Numbering tab.
3) Under Numbering, choose Restart at this paragraph and 1 for Start with. Click OK tosave.
Note: If you do not explicitly choose 1 for Start with, the setting is not retained.
Unfortunately there seems to be no way to build it into a paragraph style.

Problem solving

21