OOo Off the Wall: Master Documents
If you are an MS Word user, and we all have secret shames in our pasts, you may have fallen into the habit of avoiding master documents--and for good reason. Master documents in MS Word can crash and corrupt sub-documents unless they are used so carefully that there is hardly any reason to use them at all.
But if you have this habit of avoiding master documents, you can change it when you use OpenOffice.org Writer. Master documents in Writer are much more stable. They are not immune to crashes, but unless a master document's size exceeds the available RAM on your computer, you may never see one. This stability frees master documents in Writer to be what they were meant to be: a way to organize and write long documents more efficiently.
Master documents are documents that manage and organize other Writer documents. They consist of a series of links to individual sub-documents that can be opened only when needed. They offer a savings in overhead that is noticeable even on today's high-RAM machines.
When a master document is opened, sub-documents are added to it as sections. As each sub-document is opened, it is reformatted and repaginated using the master document's styles and other settings. In particular, any numbering sequences become continuous. For instance, if a paragraph style is numbered 4 in one sub-document and the next occurrence of the style is in the next sub-document, then the next occurrence is numbered 5 in the master document. This occurs even if that paragraph style originally was numbered 1. The sub-documents then can be printed or exported as a single document.
What makes master documents useful is these changes apply only within the master document. If you save the sub-documents as part of a master document and then open them again as separate documents, they revert to their original formats and page numberings.
Master documents are useful in several circumstances:
If your computer's memory is limited: Experiment to find the maximum document size that your computer can handle without grinding. Sub-divide your document into files equal to or smaller than the maximum size. Only assemble your documents into a master document when you are ready to print.
When material has to be used in different places: A file can be used in any number of master documents, so you can re-use it as needed. However, because the master document formatting takes precedence over sub-document formatting, either try to ensure that all the master documents using the same sub-document have the same formatting, or be careful not to save a file while more than one master document is open.
When a document is divided into chapters: You then can use the special master document view in Navigator to help move around and work with the shorter sub-documents instead of the long document. In other words, the master document becomes a floating window that stores the documents to which you are most likely to refer.
You want two or more documents that are similar except in some parts: You can add all the files for all the documents and then hide or un-hide individual sub-documents before printing or exporting.
Master documents are built from three sources:
Separate files, or sub-documents: Sub-documents are treated as sections of the master document and have the same options as sections within a normal document. Within the navigator, sub-documents are listed by their file names.
Text: Areas before, between or after the sections for sub-documents. Although anything can be added to text areas in a master document, putting a lot in them defeats the purpose of using a master document in the first place. In a well-planned document, you should generally not need to use extra text. Here's another reason to avoid them: text areas are listed in the master document view in the Navigator with the unhelpful title of "Text". The main use for text areas is spacers between separate files for pagination.
Indexes and tables: Inserted into text areas of the master document, indexes and tables such as Tables of Contents and Alphabetical Indexes can provide references to the contents of sub-documents.
Master documents simplify the management of long documents. However, using them to their full advantage still requires some organization. Here are some suggestions for working with master documents and getting the most from them:
To minimize the chances of formatting problems, use the same template to create the master document and all its sub-documents. If some documents are used in more than one master document, try to make sure that all of the master documents use the same template, too. If using the same template is not possible for some reason, consider adding the sub-document as an OLE Object instead, using Insert > Object > OLE Object to preserve its formatting.
Whenever possible, place each master document and all of its sub-documents in the same directory. A convenient strategy is to place the sub-documents in a sub-directory of the folder that holds the master document. Use another sub-directory for graphics. If some documents are used in more than one master document, create a sub-directory only for them.
Ordinarily, you probably want each part of a master document to start on a separate page. You can set up this format automatically by using the Breaks section on the Text Flow tab to start a new page after:
The Heading paragraph style for each index and table, for example, Contents Heading for a Table of Contents.
The first paragraph style used in each sub-document, probably Title, Heading 1 or possibly a created style called something like Chapter Number.
The convention is to start each new part of a long document on a right, odd-numbered page. Open a book, and you will see why: most readers' eyes fall on the right page first. Because the start of a new part is one of the main guides for finding information, you want it to be as prominent as possible. To ensure that the parts start on a right page, start at the beginning and go through the master document, adding manual page breaks in the Text areas wherever they are needed. Starting each part on a new page also minimizes reformatting.
Aside from tables, indexes and page breaks, minimize the content that is added to the master document directly. Add it to the sub-documents instead. The more content added directly to the master document, the less flexible it becomes.
Because of the kludges required to add some cross-references to a master document, place them in a paragraph of their own to prevent unexpected reformatting in the master document.
Use page styles and/or manual page breaks to use different numbering for different parts of the master document. For example, one common format is to use lowercase Roman numerals for front matter, such as copyright pages and tables of contents, and Arabic numbers for the main text. And often, numbering is restarted with the main text.
-- Bruce Byfield (nanday)
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- RSS Feeds
- Readers' Choice Awards
- Tech Tip: Really Simple HTTP Server with Python
2 hours 27 min ago
- Reply to comment | Linux Journal
3 hours 10 sec ago
- All the articles you talked
5 hours 23 min ago
- All the articles you talked
5 hours 26 min ago
- All the articles you talked
5 hours 28 min ago
9 hours 52 min ago
- Keeping track of IP address
11 hours 43 min ago
- Roll your own dynamic dns
16 hours 57 min ago
- Please correct the URL for Salt Stack's web site
20 hours 8 min ago
- Android is Linux -- why no better inter-operation
22 hours 24 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?