The idea here is quite simple. When writing a document I might want a main title to appear in a header throughout the document like this:
Book Title
Chapter Title
It's easy to get the "Book Title" in and have it remain constant in the header. But how about that Chapter Title?
The following is a brief tutorial on how to do just that.
Note: feel free to apply formatting to the Header area. I just left it raw and unadorned for the sake of the tutorial.
---------------------------------------
In OpenOffice Writer, create a header like this:
From the menus:
- Insert -> Header -> Default
Inside the Header area, I will write the text that I want to appear on each page: Book Title.
For my purposes, I'll hit Enter to provide space under "Book Title".
NOTE: There's no need to include text that remains the same throughout the document.
So far: The second line in our header will be "dynamic", meaning, it changes from section to section (in this case, it's the Chapter Title).
Creating our "SubHeader" (Chapter Title)
Scroll through your document until you find the first heading you wish to use as your Sub-Header. Click to the left of the text as illustrated below.
important
You might notice that your SubHeader (the Chapter Title) may not show up on the first page. (I'll explain that more fully in an additional post.) That is because the code we are about to create isn't the very first thing on the page. To have a Subheader appear on the very first page, make sure the code (that we'll look at below) is the first thing on the page.
AGAIN: The way I've placed my cursor, the SUB-HEADING (Chapter Title) will NOT appear on the first page. This is DELIBERATE.
Adding our Sub-Heading (Chapter Title)
From the menus:
- Insert -> Fields -> Other (or, from the keyboard, press Ctrl+F2)
- click the Variables tab
- click Set variable
- click Text
- In the Name field, I will type SubHeading (no spaces)
- In the Value field, type what will appear as your sub-title (that is, our Chapter Title for this tutorial). In this case I'll use The Quick Brown Fox.
- Click the [x] Invisible check-box.
- Then click the Insert button.
- Then click the Close button.
Let's expose the new code!
From the menus:
- View -> Field Names (or, from the keyboard, press Ctrl+F9)
Adding our Sub-Title to the header
Click in the Header and place the cursor where you want the sub-header to be: Adding the sub-header will resemble creating it. From the menus:
- Insert -> Fields -> Other (or, from the keyboard, press Ctrl+F2)
When the "Fields" box appears:
- click the Variables tab (should be selected)
- click Show variable
- click Insert.
- click Close.
Changing the Sub-Heading mid-document
Now we come to the point where we change the text that appears as our Sub-Heading. In my document I want to make this change on page 3, and I want to change the sub-heading from "The Quick Brown Fox" to "Concerning Jumping".
My heading within the document happens to be at the top of Page 3. And you can clearly see the sub-heading "The Quick Brown Fox". Now I will change it to the new sub-heading.
From the menus:
- Insert -> Fields -> Other (or, from the keyboard, press Ctrl+F2)
- click the Variable tab (if not already selected)
- click Set variable under "Type"
- click SubHeading under "Selection"
- click Text under "Format"
- in the "Value" field, add the new sub-heading (Chapter Title -- in my case, "concerning jumping").
- click [x] Invisible
- click Insert.
- click Close.
Changing a Sub-Heading (Chapter Title) that's already created
Well, there you go. You've gone and done it. You created a subheading and now you don't like what it's called. How do we go about changing it?
Simple:
- Press Ctrl + F9 until the code is revealed in the body of the text.
- Double-click the code.
- The "Edit Fields: Variables" box will appear.
- Make your changes there in the Values field.
- Click OK to complete the change.