Using Sections to Create Multiple Versions of the Same Document

"-->

Using Sections to Create Multiple Versions of the Same Document

Note

If you want to visually compare documents with Writer's change tools, know that the program doesn't currently support comparing content that's in special regions , such as headers, footers, footnotes, frames , fields, and sections. So if you use sections, you won't be able to compare the content inside sections.


Sections, in their simplest form, are blocks of text that you name . They show up in your documents with borders around them, as shown in Figure 11-2.

Figure 11-2. Section and section setup window

graphics/11fig02.jpg

However, you have the following options that let you control:

  • Whether the sections can be deleted

  • Hiding and showing the sections

  • Hiding and showing the sections based on a condition

  • Basing the section on the content of another document, or on a section in another document

This opens up huge possibilities, including the following scenarios:

Single-source documentation

Sections let you create truly object-oriented technical or training documentation without a lot of cutting and pasting. Let's say you're doing training documentation on the widget, the womplet, and the wicket, as well as a big reference manual on it.

  • In the training documentation you present the information on each bit by bit to not overwhelm the students.

  • So on page 2 of the training documentation you insert a section linked to the Intro section of the widget. sxw document, the womplet.sxw document, and the wicket.sxw document, all of which are already in your completed reference document.

  • On page 26 you insert a section linked to the Why You Care About Widgets section of the widget.sxw document. And so on.

Note

Keep in mind that you can convert any Writer document to Word, and use the Word document with products such as RoboHelp.


One document for multiple audiences

If you're in HR and you're putting together information for the whole company on the impending reorg , you're probably going to want to put in information for managers or directors that the regular people don't get to see. Put all the sensitive information in sections, and hide or show it when you create the final versions, in Writer or PDF, to email to the rest of the company. Or if you're putting together a proposal to sell products for your small business, you probably want to target the Girl Scouts differently than Nike. Sections let you put all the text in one document, then just hide all the Nike stuff when you create the version for the Girl Scouts.

Legal documents

If you create a lot of legal contracts, you can create small, reusable sections, each of which can be inserted into a new contract document, and linked so that when the individual sections change, they're updated in the long contract document automatically.

This part of the chapter shows you how to create a section, then hide it, and show it again.

Creating and Formatting Basic Sections

Note

To use the more advanced features, links and conditional hiding, see Linking to a Section in Another Document on page 416 or Hiding a Section With or Without a Condition on page 415.


  1. Select the text you want to make a section. You don't have to select the last paragraph return in order to include the whole line in the section; if you select as shown in Figure 11-3, both full lines will be included in the section.

    Figure 11-3. How to select text you want to make into a section

    graphics/11fig03.gif

  2. Choose Insert > Section.

  3. In the Insert Section window (Figure 11-4), type a meaningful name for the section in the New Section box.

    Figure 11-4. Creating a basic section

    graphics/11fig04.jpg

  4. Click the Columns tab if you want the section to have more than one column, and make the appropriate entries; the window is shown in Figure 11-5. For more information on columns , see Figure 7-45 on page 237.

    Figure 11-5. Specifying column setup for the section

    graphics/11fig05.jpg

  5. Click the Background tab if you want the section to have a colored or graphical background and make the appropriate entries; the window is shown in Figure 11-6. For more information on backgrounds, see Figure 7-44 on page 236.

    Figure 11-6. Selecting a background for the section

    graphics/11fig06.jpg

  6. Click the Footnotes/Endnotes tab and specify how you want footnotes and endnotes to be managed for the section; the window is shown in Figure 11-7. For more information on footnotes, see Figure 7-37 on page 228.

    Figure 11-7. Determining how footnotes and endnotes for the section should be managed.

    graphics/11fig07.jpg

  7. Click Insert. The text you designated as a section will appear in the document.

    graphics/11inf01.gif

Protecting or Hiding Text Using a Section

  1. Select the text you want to make a section.

  2. Choose Insert > Section.

  3. In the Insert Section window (Figure 11-8), type a meaningful name for the section in the New Section box.

    Figure 11-8. Creating a protected section

    graphics/11fig08.jpg

  4. Select the Protected option to make the section read-only and enter a password if you want. (It's a good idea to do so; it gives you more flexibility later on for editing.)

  5. Select the Hidden option to hide the section in the document.

    Note

    If you hide the section, it'll be hard to find again. There's no hidden section character or other flag for you to use to track it down. You might want to insert icons, horizontal lines, use a frame, or some other breadcrumb system to make sure you can find it again.

  6. Click Insert.

When someone attempts to edit a protected section that has no password, the message at right will appear.

graphics/11inf02.jpg

Anyone with the rights to change the section with a password should select the section, choose Edit > Sections, and make the appropriate changes. They'll be prompted to enter a password, as shown in Figure 11-9.

Figure 11-9. Being prompted to enter a password, in order to change a password-protected section

graphics/11fig09.jpg

Hiding a Section With or Without a Condition

  1. Select the text you want to make a section.

  2. Choose Insert > Section.

  3. In the Insert Section window (Figure 11-10), type a meaningful name for the section in the New Section box.

    Figure 11-10. Creating a conditional section

    graphics/11fig10.jpg

  4. Select the Hide option and enter the condition.

    Enter the condition under which the section is to be hidden. If the condition is TRUE, the section will be hidden. Conditions are logical expressions, such as "SALUTATION EQ Mr.". Using the mail merge form letter function, for example, if you have defined a database field "Salutation", containing either "Mr.", "Ms." or "Sir or Madam", you can specify that a section only be printed if the salutation is "Mr.".

    As another example, you can define the field variable "x" and set the value to 1. Then specify the condition for hiding the field: "x eq 1". The defined section will only be displayed if the field variable "x" is assigned a different value.

  5. Click Insert.

More Information
More on condition syntax

To learn the syntax for condition writing, see the online help.

More on creating fields to base conditions on

See Creating and Inserting Predefined Information Using Fields on page 284, as well as the online help.

Linking to a Section in Another Document

You can insert a section from another document as a link, which means when the section in the source document changes, all the other documents that link to it get updated, as well.

The source document must have sections defined in order for this procedure to work.

  1. Position the cursor where you want to insert the section, and choose Insert > Section.

  2. In the Insert Section window, select the Link option.

  3. Click the Browse button.

  4. In the Insert window, select the document containing the sections you want to link to, and click Insert. The document is added to the File name field. The window is shown in Figure 11-11.

    Figure 11-11. Creating a section based on a link to a section in another document

    graphics/11fig11.jpg

  5. In the Section field, select the section in the source document, if any, that you want to link to.

  6. In the New section field, name the section as you want it to be labeled in the current document.

  7. Click OK.

Note

Refer to Creating and Formatting Basic Sections on page 411 for details on setting values in the Columns, Background, and Footnotes and Endnotes tabs.


You can also insert a link as a DDE link. For more information, select the DDE option and click the Help button.

If a document uses links, make sure you update it in case the source files have changed. Update the links by choosing Tools > Update > Links. You can also determine how links are updated in the Options window by choosing Tools > Options > Text document > Other. If you choose the Always option in this window, links are updated automatically when you open the document. If you choose the On request option, you're prompted to update links every time you open the document. If you choose the Never option, links are not updated when you open the document. You must update them manually using Tools > Update > Links.

If you want to see where the source of a link is, choose Format > Sections, and in the Edit Sections window, select the section that is the link to view its details.

Modifying and Deleting Sections

There's always a second chance with sections.

Just Deleting a Section

If you delete a section that is a link, the text remains in the linking document (Documents B and C). However, the link to the source document is broken.

  1. First choose View > Nonprinting Characters so all the carriage return paragraph markers and other symbols appear.

  2. Select the section contents and paste them elsewhere if you just want to delete the fact that it's in a section, not the content itself.

  3. Select the paragraph marker immediately before the section, and all paragraph markers in the section; this is shown below in Figure 11-12. You have to select it like this or only any remaining text will be deleted (and sometimes not even that). However, as you also have probably noticed, you don't have to select the last carriage return in the section (though it does you no harm if you do).

    Figure 11-12. How to select a section for deletion

    graphics/11fig12.gif

  4. Press Delete.

Modifying a Section's Behavior

After you create sections, you can go back and change their behavior.

  1. Choose Format > Sections.

  2. In the Edit Sections window, select the section you want, as shown in Figure 11-13.

    Figure 11-13. Changing section options

    graphics/11fig13.jpg

  3. Select the options for the section. To rename the section, just type a new name in the top field of the Section area.

  4. Click OK.



OpenOffice. org 1.0 Resource Kit
OpenOffice.Org 1.0 Resource Kit
ISBN: 0131407457
EAN: 2147483647
Year: 2005
Pages: 407

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net