Chapter 4. Headers and Footers

CONTENTS
  •  Practical Uses
  •  The Home of Headers and Footers
  •  What Headers and Footers Are Made Of
  •  Starting with the Easy Stuff
  •  Working with Fixed Headers and Footers That Rarely Change
  •  Working with Varying Headers and Footers
  •  Using Abbreviated Headings
  •  Summary

You see them in books, magazines, manuals, and guides. Just about everything you read contains those useful bits of information that appear at the top and bottom of each page. Headers and footers, the great navigation tools of any document, provide information about where you are in a document and about the document itself.

You might be creating FrameMaker document headers and footers or simply modifying existing ones. You might just be the end user of a FrameMaker template with headers and footers already built in. Whatever your role, this chapter is for you.

This chapter covers the practical uses of headers and footers, what they're made of, and how they work together with FrameMaker's interrelated parts. This chapter also examines the specifics of building, modifying, and using headers and footers to achieve complex tasks. It finally describes some of the pitfalls and tricks in dealing with them.

You might have discovered that some header and footer types in FrameMaker can be complicated or confusing. By reading this chapter, you gain important inside information that enables you to implement these concepts into your everyday tasks with ease. You might even have some fun.

Practical Uses

Typically, headers and footers are displayed on every page throughout a document to facilitate navigation or provide other information about a document. Although you can display just about any type of text or graphics in headers and footers, you should keep every reader's task in focus as you decide what to include. The following helpful items are commonly placed in headers and footers:

  • Page number

  • Chapter number and title

  • Section number and title

  • Document title

  • Revision date or number

  • Company or author information

The Home of Headers and Footers

Although you can construct headers and footers in many different ways, there is only one location in which they reside.

Headers and footers only live on FrameMaker's master pages. Simply put, the job of a master page is to provide the page layout and any background information that you want to appear on each page. That background information includes headers and footers. As you create and work with headers and footers in FrameMaker documents, you will probably spend most of your time with the master pages.

Back to Basics

Use View > Master Pages to access headers and footers.

What Headers and Footers Are Made Of

The more you understand about what headers and footers are made of, and how they work within FrameMaker, the easier it is for you to accomplish tasks that utilize these features. It's important to take a quick tour of what's inside FrameMaker's headers and footers before moving on to more in-depth explanations and real-world examples.

Headers and footers can comprise any combination of hard-typed text, graphics, and FrameMaker variables. These elements are discussed in more detail in the following subsections.

Hard-Typed Text

A simple way to display information in headers or footers is just to type text directly into the header or footer of your document. However, this method neglects FrameMaker's powerful global-updating features. For example, if you type the document title in the header of several master pages in your document, and you need to make a change later, you have to edit all the occurrences of that document title on each master page.

Although this method does not work well for long, complicated documents, you should consider using it for short, one-page memos that use one master page. You can also use this method in parts of the header and footer that do not change, such as the word "Chapter" in "Chapter 3".

Graphics

Back to Basics

Graphics imported by reference update automatically based on the source graphic.

You can import or create graphics (such as a company logo) in headers and footers by using the same methods as in other parts of your document. If you place graphics into headers and footers, these graphics will be displayed on all body pages in your document that correspond to the particular master pages that contain the graphics. Again, keep in mind that, if you want to make a change, you must change each occurrence of the graphic on master pages.

Simple System Variables

FrameMaker provides system variables for use in headers and footers. System variables perform a variety of functions, and they update themselves based on information generated by the system. These type of system variables include the following:

  • Page number and page count

  • Current date, creation date, and revision date

  • Filename (short) and filename (long) (the full path)

Back to Basics

From a master page background text frame, use Format > Headers & Footers > Insert Page #.

These system variables are easy to include in a document.

Let's look at how a simple system variable, such as a page number, works. You can implement this clever feature in your document by viewing the master page and selecting the page number variable from a menu to insert it into the header or footer. When viewed on the master page, the page number has no fixed quantitative value and is represented by a pound sign (#). When viewed on body pages, the page number reveals its quantitative value, automatically incrementing by 1 from page to page.

That's all there is to it. Simple system variables are easy to use because you don't have to think about them that much. You can read more on this topic in the section "Starting with the Easy Stuff" on page 82.

Medium-Strength System Variables

FrameMaker user variables fall under the medium-strength variety. They require a bit more effort than simple variables. User variables enable you to define fixed headers and footers that don't change often. For example, you can create a user variable to contain a document title. Then insert that variable in the header area on several master pages used in your document. The document title will be displayed in the header, both on the body pages and the corresponding master pages.

Tip

Learn how to use Volume Numbers to perform a similar task in "Tricks with Volume Numbers" on page 88.

Now suppose that you decide to change the document title. In contrast to hard-typed text, when you change information stored in a user variable, you can simply change the variable definition in one place, and all occurrences of that variable update automatically what a great time-saver.

For further exploration and some real-world examples of medium-strength variables, see the section "Working with Fixed Headers and Footers That Rarely Change" on page 84.

Industrial-Strength System Variables

FrameMaker provides more robust and powerful variables for use in headers and footers that vary from page to page in your document. Some of these include the following:

  • Chapter number and title

  • Subheading number and title

  • Dictionary-style headers

These industrial-strength variables are more complicated than the other varieties. To work correctly when viewed on document pages, they assume a value that relies on underlying detail elsewhere in the document. But what does that really mean?

These powerful variables are made up of "containers" that store references to particular paragraph tags. Information in paragraphs in your document that have the particular paragraph tags specified by the containers is automatically displayed in the header. Based on each occurrence of content with those paragraph tags, the header automatically changes from page to page.

If you can't wait to start using these powerful variables, skip to the section "Working with Varying Headers and Footers" on page 90. Otherwise, to learn more about using the simpler system variables, read the next section.

Starting with the Easy Stuff

Before getting into the ins and outs of the more-complicated headers and footers, some of the techniques that you can use for the simplest headers and footers, such as hard-typed text, graphics, and simple system variables, must be discussed.

You already know how to type text or import graphics in FrameMaker. These operations are done in the exact same way on the master pages in background text frames. The only difference is the location.

Before getting to that, an important "gotcha" must be mentioned. Have you ever typed in a header or footer text frame and seen a large chunk of your definition "disappear" as the text wraps around to a second line? If so, this just means that the text frame does not have enough room to contain that information. Just Control-click on the text frame, grab the bottom anchor, and make the text frame longer. The text reappears, and you can adjust your frame accordingly.

Simple system variables, such as page numbers, dates, and filenames, are just as easy to include in your document header as regular text. Use the following steps to insert any of these variables in a master page header or footer background text frame:

  1. Select Special > Variable.

    The Variable window appears.

  2. Click once on the desired variable from the scrolling list to select it; click on Insert.

    The selected variable is inserted in the header or footer background text frame. This information is displayed on all body pages that utilize this particular master page.

Back to Basics

Another method to insert variables in background text frames is to select Format > Headers & Footers.

Page Number Combos

Now that you know the basics of simple variables, you can now explore how to make page numbering more interesting. You can include the page count, the chapter number, or just a word such as "page" along with the page number by using simple methods that are not time-consuming.

Including the Page Number

You can easily include the page number in your document by following these steps:

  1. If you're presently looking at the body pages, select View > Master Pages. Click inside the header or footer frame in which you want to insert the page number.

  2. Include the page number, either through the Special menu by selecting Special > Variable > Current Page #, or through the Format menu by selecting Format > Headers & Footers > Insert Page #.

Back to Basics

Include the page number by using keyboard commands Alt-S v Home Enter or Alt-o h i, respectively.

As previously noted, the page number appears as only a pound sign "#" on the master pages but appears correctly on the body pages.

Including the Word "Page"

After you insert the page number variable in the header or footer background text frame, you can preface the number with the word "page", if you'd like. To do this, type the word Page followed by a space directly before the page number variable (see Figure 4.1). On a body page (say, page 9), this header is displayed as "Page 9".

Figure 4.1. You can easily add the word "Page" to your header or footer.

graphics/04fig01.gif

Including the Total Page Count

To include the total page count of your document in the header or footer, place the cursor after the page number variable, type a space followed by the word "of" and another space. Then insert the Page Count variable by selecting Special > Variable > Page Count (or by selecting Format > Headers & Footers > Insert Page Count). Notice that, unlike the page number variable, the page count variable reveals its quantitative value on master pages (see Figure 4.2). The reason for this difference is that the page count, unlike the page number, does not vary depending on where the user is in the document. On body pages, this header will display as "Page 9 of 23".

Figure 4.2. Including the total page count of your document in the header of footer.

graphics/04fig02.gif

Including the Chapter Number

If you use chapter-based page numbering, you might want to include the Chapter Number variable along with the page number in a header.

Back to Basics

You can set the chapter number by using Format > Document > Numbering > Chapter.

After you insert the page number variable in the header background text frame, you can add the Chapter Number variable by inserting the variable Chapter Number directly before the page number variable, followed by a hyphen (see Figure 4.3). Like the page count, the Chapter Number variable appears as a number on master pages. On a body page, such as page 9 in Chapter 2, this header will display as "2-9".

Figure 4.3. Adding the Chapter Number variable displays the chapter and the current page number in the header or footer.

graphics/04fig03.gif

Working with Fixed Headers and Footers That Rarely Change

If you plan to use headers or footers in your document that might change, but you don't need to change them often, user variables are the perfect solution. These variables fall under the category of medium-strength variables. You might have already had an encounter with these odd blocks of text and are not sure what to do with them, or you might just be getting ready to create one. Whatever the case, user variables save you time if you work with multiple-master page documents or if you are using one FrameMaker template for different documents.

The idea behind user variables is to create text that will be used in several locations of your document. Locations can include, but are not limited to, headers and footers. After a user variable is defined and inserted in several places, if you then change the user variable definition, all occurrences of that user variable automatically update to include and display the new information.

This is an excellent solution for document titles that are displayed in headers. When you use the same template for a new document set, just change the user variable to a new document title. That's it!

To get a better idea of how to work with user variables, you need to take a deeper look into them.

Planning for User Variables

A user variable consists of two major components, which you have to keep in mind when you plan for this type of variable:

  • The name of the variable. This name will show up in the list of variables in the Variable window. Appropriate names for user variables are helpful for others who might use the same template. For example, if you create a user variable to display a document title, "doctitle" is a good name because the name indicates its purpose.

  • The definition of the variable. This is what will actually be displayed in the header (or another location) in the document where user variables are inserted.

After you decide on the name and definition, you need to create a user variable. Unlike other types of variables, you do not have to be on a master page to create a user variable. You can use this variable in other places in your document, as well as in headers and footers; for this example, I focus on headers and footers.

Creating a User Variable

Let's create a user variable with the name "doctitle" for use in the document header. The definition of doctitle is "Technical Bulletin No. 1086", the name of the document.

Back to Basics

If the insertion cursor is not in the text, the Variable menu command is gray and inaccessible.

  1. Place your insertion cursor in the header text frame on a master page.

    This is where the document title is displayed.

  2. Select Special > Variable.

    The Variable window appears.

  3. Click on the Create Variable button.

    The Edit User Variable window appears.

  4. Type "doctitle" in the Name field.

    The name "doctitle" for this variable displays in the Variables list window after you finish creating the variable.

  5. Type "Technical Bulletin No. 1086" in the Definition field, as shown in Figure 4.4.

    Figure 4.4. The Edit User Variable Window.

    graphics/04fig04.gif

    This is the actual information that is displayed in the header.

Back to Basics

Split user variables into two separate lines by inserting \h in the user variable definition. The code \h means "soft return."

  1. Click on Done.

    You return to the Variable window. Notice that the name of the variable you just created is displayed and highlighted in the Variables list, and the variable definition is displayed directly below the variable list (see Figure 4.5).

    Figure 4.5. The Variable Name and Definition is displayed.

    graphics/04fig05.gif

  2. Click on Insert.

    The document title variable is inserted into the header.

Making Changes in a User Variable

After you have user variables in FrameMaker documents, making changes is relatively easy. You'll really appreciate this feature when you use the same template for another set of documents with a new document title.

Here's how it works: Suppose that you take an existing FrameMaker document with a user variable, doctitle, for the document title and use that document as the template for a new document with a new title. You can instantly change the document title name that's already been inserted as doctitle in one or more header or footer locations in two ways: either from a master page or a body page.

Changing a User Variable from a Master Page

To change a user variable from a master page, follow these steps:

  1. Double-click on the document title.

    The Variable window appears with the variable doctitle selected.

  2. Click on Edit Definition.

    The Edit User Variable window appears.

  3. Edit the text in the Definition field. After you finish, click on Done.

    You return to the Variable window. The new document title appears below the variable list when doctitle is selected in the list.

  4. Click on Done.

    All occurrences of this variable automatically update and display the new information. You do not have to click on Replace, because that simply replaces the current user variable with itself.

Changing a User Variable from a Body Page

You can change a user variable from a body page by following these steps:

  1. Select Special > Variable.

    The Variable window appears.

  2. Select doctitle from the Variables list. Click on Edit Definition.

    The Edit User Variable window appears.

  3. To complete this exercise, continue with Step 3 of the previous list to change a user variable from a master page.

Note

The insertion cursor must be in any text frame or some menu selections will not be accessible.

Tricks with Volume Numbers

Instead of a user variable, you can also use the volume number variable in FrameMaker to implement a fixed header or footer.

Typically, volume numbers in FrameMaker are used to create automatic multi-level numbering. This is especially handy when you work with book files. Then each file in the book can be specified either to have the same volume number as the file that precedes it in the book, or to have the next incremental number.

Note

For information on using a volume number in cross-references, see Chapter 5.

However, you can also use the volume number function to insert a document title or some other textual information that you want to display in the header or footer on each page of your document. (You cannot use this particular method if you plan to use the Volume Number function for an actual volume number in your FrameMaker documents.)

Setting Up Volume Number Text

Using the previous example in this section for a user variable, here's how to set up a volume number to use as header text:

  1. Select Format > Document > Numbering.

    The Numbering Properties window appears.

  2. Click on the Volume tab or select Volume from the drop-down list.

    The Volume numbering properties appears.

  3. From the Format drop-down list, select Text.

    This allows for text entry into the Volume # field. If you do not select Text from the format menu, you can still enter text in the Volume # field, but you get an error message when you click on the Set button.

  4. Type "Technical Bulletin No. 1086" in the Volume # text field. Click on the Set button after you finish.

    You have completed the setup of the text field for the Volume Number (see Figure 4.6). The volume number is not yet displayed in any header or footer.

    Figure 4.6. The Volume Numbering properties is switched to Text.

    graphics/04fig06.gif

Now that you have set up the volume number to display text, you can now move on to inserting its special variable into the header of the document.

Inserting the Volume Number Variable

The following steps start on the master page, with the insertion cursor in the background text frame for the header:

  1. Select Special > Variable.

    The Variable window appears.

  2. Click one time on Volume Number in the variable list to select it.

    The variable for Volume Number displays directly below the Variables list, as shown in Figure 4.7.

    Figure 4.7. The Volume Number in the Variable list.

    graphics/04fig07.gif

  3. Click on the Insert button.

    The Volume Number variable is inserted at the insertion cursor location. The text that you previously set up in the Numbering Properties for Volume # is displayed.

    To edit the text, follow the steps in the section "Setting Up Volume Number Text" on page 88.

The headers and footers that you learned about so far represent some powerful yet basic types in FrameMaker. Coming up next: some more complex types that are commonly used in real-world documents.

Working with Varying Headers and Footers

The power of varying headers and footers to work their magic within FrameMaker documents can be a source of lasting amazement.

Varying headers and footers do just what the name indicates. They vary, or change, from page to page in your document, based on page content. In FrameMaker, they are also known as Running H/F variables. When they are inserted into a master page, they appear to have no fixed value and are displayed according to their name. When viewed from body pages, they assume a value based on content in your document that is tagged with particular paragraph tags.

Here's a simple example: Say that your document must have a chapter title and you want to display that chapter title on each page in the header of your document. You can define the special Running H/F variable to refer to the chapter title in your document, and insert that variable in your document header. Then that header will always display the content as the chapter title of your document. If you edit the chapter title, the document header automatically changes based on the new information contained in the chapter title.

After Running H/F variables are set up in your document, you can focus on the real work of writing. (Remember the scary ol' days before features like this existed?)

This section looks at what makes Running H/F variables tick and how to create, edit, and maintain them. Throughout the exercises, you see how to avoid common problems, and you learn what to look for if you've already run into problems with existing Running H/F variables.

How Varying Headers and Footers Work

So far, you have seen that FrameMaker comes loaded with a vast array of variables to choose from, each one with its own function. Four of these have been specially designed for varying headers and footers. You might have seen them in the list of variables or viewed them on master pages of your document. They are formally known as

  • Running H/F 1

  • Running H/F 2

  • Running H/F 3

  • Running H/F 4

Back to Basics

Running H/F variables cannot be viewed in the Variables list from body pages and must be viewed from master pages.

Although most variables in FrameMaker have editable names, these variables do not. You cannot change the name of a Running H/F variable, but you can change its definition.

Earlier, in the section "Industrial-Strength System Variables" on page 81, you learned that Running H/F variables function as containers, which allows you to store references to particular paragraph tags that occur in your document.

Running H/F variables are inserted as background information on master pages and they don't reveal their content. When you view master pages, the variable name itself displays. For example, if you use the Running H/F 1 variable to construct your varying header, "Running H/F 1" is displayed on the master page, as seen in Figure 4.8.

Figure 4.8. The Running H/F variable on a master page.

graphics/04fig08.gif

When it's viewed from body pages, the variable reveals the actual content of the particular paragraph tag that is referenced in the variable. Figure 4.9 shows an example of a variable that references the chapter title paragraph tag and, therefore, displays its content in the document header.

Figure 4.9. An example of a Running H/F variable on a body page

graphics/04fig09.gif

The Paragraph Tag Connection

As previously mentioned, Running H/F variables are connected to paragraph tags. To illustrate, continue the example on how to include a chapter title in a header.

If you set up a specific paragraph tag, such as "Chapter Title", to contain the chapter title of your document, you can make the chapter title show up in a header (say, at the top of every left page) by setting up the Running H/F variable to store a reference to the Chapter Title paragraph tag.

After you set up a Running H/F variable to refer to paragraphs tagged Chapter Title and insert the Running H/F into a header on the master page, then, when you print the document or view body pages, the content of the most-recent paragraph tagged with the Chapter Title paragraph tag is displayed on each page where the selected header was placed.

What if more than one chapter title exists in a document (that is, more than one paragraph is tagged with Chapter Title)? In this case, the first chapter title remains in effect until the next occurrence of a paragraph tagged with Chapter Title. That next occurrence is in effect until another occurrence is found.

Some Things to Keep in Mind

Tip

If Running H/F variables are not working properly, check to make sure at least one paragraph is tagged with the referenced paragraph tag.

Whether you create, modify, or simply work with existing variables in headers or footers, this section is worth reading to avoid problems.

Because paragraph tags make Running H/F variables tick and are an integral part of how they function, you should be aware of a few things when you work with Running H/F variables. Now is a good time to review your document and note the following:

  • You need to type the names of paragraph tags when you introduce them into Running H/F variables. Therefore, make sure you know the exact spelling, including upper and lower case, of the paragraph tags you want to use in varying headers and footers. Running H/F variables do not work if the spelling is incorrect or if extra spaces are added to the paragraph tag name in the variable.

  • If the paragraph tags include autonumbering, be aware of how the autonumber is constructed. For example, if the autonumber includes text in the format, this text is included in the header along with the autonumber.

  • Avoid spaces when possible in paragraph tag names. This makes it easier to incorporate tags without errors, because extra spaces are sometimes difficult to detect in paragraph tag names.

  • Keep paragraph tag names short and simple. Running H/F variables have a length limitation of 255 characters. If you can choose whether the paragraph tag name for the first-level subheadings in your document will be H1 or HeadingOne, go with the short version. It saves you from potential problems later.

Tip

If empty paragraph returns are tagged with referenced paragraph tags, the headers and footers appear empty.

Whew! It sounds complicated. Try an example to clear up some of the mystique.

Creating a Simple Varying Header

Although I refer to "headers" in the following examples, in the real world you can use these concepts and exercises equally well for either headers or footers. It's up to you.

In this section, you are guided through the steps in working with a simple varying header, including planning, creating, editing, and adding autonumbers or character formatting.

Planning for Simple Varying Headers

In the first example, say that you have a FrameMaker document that includes a chapter title paragraph tag that is constructed to include the word "Chapter" followed by an automatic chapter number and typed title text. Table 4.1 illustrates the tag name, how content is displayed, and the paragraph tag autonumber format.

Table 4.1. Paragraph Tag Names for Chapter Title

Paragraph Tag Name

Description

Autonumber Format

ChapTitle

Chapter 2 The Great Unknown

C:Chapter <$chapnum>\t

Understanding the location and purpose of varying headers or footers is a good idea before creating them. Following is a description of each of these:

  • Location. Decide where information will be displayed whether in the header or in the footer, and whether on the left page, the right page, or both. If you haven't done so already, set up master pages to include background text frames for the headers and the footers.

  • Purpose. Determine the purpose of your varying running header and how it will be displayed in the header of your document. For instance, will your header include the word "Chapter" and the chapter number, or just the chapter title?

Back to Basics

On master pages, use the Text Frame tool in the Graphic toolbox to create background text frames.

For this exercise, start with a simple running header that includes the chapter title only. Then, build on what you've learned and move on to include the word "Chapter" and the chapter number. Finally, you add character formatting.

Creating a Running H/F Variable

To create a Running H/F variable, go directly to the master page of the document and click inside the header of your document. This is the location where the Running H/F variable will be inserted.

When you work with variables on the master page, you must have the insertion cursor inside a background text frame. If your cursor is not in a background text frame, either you won't be able to select Variable from the Special menu or you are prompted that you cannot perform this function.

In this exercise, you create a new definition for a Running H/F variable. Here's how to do it, beginning with the insertion cursor inside the background text frame for a header:

  1. Select Variable from the Special menu.

    A list of variables appear. Some items in the list are included with FrameMaker's default variables, whereas others might have been defined by coworkers or past template creators.

  2. Select Running H/F 1.

    The definition of this variable is displayed directly below the list of variables, as shown in Figure 4.10. This helpful information provides an instant view of the current construction of that variable.

    Figure 4.10. Variable Window with Running H/F 1 Definition displayed.

    graphics/04fig10.gif

  3. Click once on Edit Definition.

    The Edit System Variable window appears with the Definition text already selected. This window includes the Definition text field and a list of Building Blocks (see Figure 4.11). Building Blocks are the containers that define the information that is referenced and displayed in your running header.

    Figure 4.11. The Edit Variable Definition window.

    graphics/04fig11.gif

  4. Delete the current information in the Definition text field.

    Delete that material so that you can start from scratch in this exercise.

Back to Basics

To delete text in the Definition text field, select the text and press the Backspace or Delete key.

  1. Click once on <$paratext[paratag]> in the Building Blocks list.

    The Building Block <$paratext[paratag]> is inserted in the Definition text field. In this Building Block name, "$paratext" means that the text is inserted from a selected paragraph in your document, and "paratag" is a placeholder for the actual tag of the paragraph that you want to reference.

  2. Select the word "paratag" in the Building Block you just inserted. Replace this word by typing ChapTitle.

    Don't delete any angle brackets < > or the dollar sign $. The Building Block now reads <$paratext[ChapTitle]>. This Building Block means that any paragraph tagged with ChapTitle is referenced in this running header. ChapTitle is the paragraph tag name for chapter titles in the example document, so the Building Block inserts the text of the chapter title.

Note

Running H/F variables do not work correctly if the referenced paragraph tag name is not exactly as it appears in the Paragraph Catalog.

  1. Click on the Edit button.

    You return to the Variable window. Notice that, in Figure 4.12, the variable you just edited is selected in the list, and its definition is displayed directly below it.

    Figure 4.12. The Variable window with Running H/F 1 selected.

    graphics/04fig12.gif

  2. Click on Insert.

    The Running H/F 1 variable is inserted and displayed in the master page header of the document. As shown in Figure 4.13, the name of the variable is displayed and not the referenced information.

    Figure 4.13. The Running H/F variable is displayed on the master page.

    graphics/04fig13.gif

Inserting the Running H/F Variable in Another Location

After you create a Running H/F variable to use in your document, you can insert it into any master page background text frame. You might want to do this if you plan to display the chapter title text on both the left and right headers in your document or if you use several other types of master pages.

Back to Basics

FrameMaker documents can contain up to 100 master pages.

Insert the Running H/F 1 that you just created into another master page in the document:

  1. Place the insertion cursor in the background text location on a different master page.

  2. Select Special > Variable.

    The Variable window appears with a scroll list of available variables.

  3. Click one time on Running H/F 1 in the Variables list.

    The definition of this variable is displayed directly below the list.

  4. Click on the Insert button.

    The Running H/F 1 variable is inserted and displayed in the new location.

Viewing and Testing a Running Header

Tip

Use Esc v Shift-b to go from a master page to a body page, and Esc v Shift-M to go from a body page to a master page.

Running H/F variables do not reveal themselves on master pages and are displayed with their actual name in that location. When creating or editing these type of variables, you will find yourself going back and forth between master and body pages to check whether they are working properly. That's to be expected.

In this example, you reference the ChapTitle paragraph tag in the document. Make sure that at least one paragraph in your document is tagged with this paragraph tag in order to test it. If not, the running header variable doesn't have text to reference and displays nothing.

  1. View the running header from a body page of your document. The header text should be identical to the chapter title text in your document. This does not include the chapter number or the word "Chapter".

    If your running header correctly displays the chapter title, save your file. In a subsequent exercise in this section, you add the word "Chapter" and the chapter number to the header.

  2. Edit the chapter title text by replacing the current chapter title with new information. Type whatever you want as replacement text.

    The running header automatically updates with the new information.

Tip

Use Window > Refresh if the information does not instantly update itself.

Editing a Running H/F Variable

Now that you know how to create a simple running header, editing the Running H/F variable definition is a breeze! For example, maybe you want subheading content to be displayed in the header rather than chapter-title content.

For this exercise, you replace the referenced paragraph tag, ChapTitle, with H1, the paragraph tag for level 1 subheading text.

Tip

Double-click on any variable for quick access to the Variable window.

  1. From the master page, double-click on Running H/F 1.

    Notice that it is a block of text rather than separate characters. The Variable window is displayed with Running H/F 1 already selected in the list of variables.

  2. Click on Edit Definition.

    The Edit System Variable window appears. Beware of your fast-typing fingers (and mouse fingers) on this one! The definition text is automatically selected when the window appears. If you hit any key, it's deleted. Likewise, if you click on the Building Blocks list, the Building Block on which you happen to click replaces the entire definition. If you make either mistake, you can recover it as long as you don't press Enter or click any button onscreen. Just click on Cancel or press Esc.

  3. Select ChapTitle in the variable definition. Replace this by typing H1 in its place.

    H1 is the name of the paragraph tag used for level 1 subheads. The Definition text field displays <$paratext[H1]>.

  4. Click on the Edit button.

    You return to the Variable window.

  5. Click on Done.

All occurrences of this variable in this document automatically update with the new information. This means that the most recently encountered level 1 subheading text and not the chapter title text is displayed in the header of each page.

Note

To test this header, make sure at least one paragraph in the document is tagged with H1.

Adding Autonumber Formats

So far, you created a running header that displays the chapter-title text. Take this exercise one step further and add the word "Chapter" and the chapter number to the header. Going back to the document that you saved earlier in Step 1 of the section "Viewing and Testing a Running Header" on page 97, which showed the chapter title, the current header reads

The Great Unknown

You want the resulting header to read

Chapter 2 The Great Unknown

  1. From the Master page, double-click on Running H/F 1.

    The Variable window appears with Running H/F 1 already selected in the list of variables.

  2. Click on Edit Definition.

    The Edit System Variable window appears. Leave the current definition as is. You need to include it in the new definition.

  3. Place the insertion cursor immediately before the current definition.

    This is where you add the new Building Block that will reference the autonumber format of the chapter title. Information that is added at the beginning of the definition is displayed at the beginning of the header when it's viewed from the body page.

  4. Click once on <$paranum[paratag]> in the Building Block list.

    The Building Block <$paranum[paratag]> is inserted in the Definition text field. Just as "$paratext" specifies a Building Block that incorporates the text of a paragraph, "$paranum" specifies a Building Block that refers to the autonumbering of a particular paragraph, including any text that is part of the autonumber format. As before, "paratag" is a placeholder that you will replace with the actual paragraph tag that you want to reference in your document.

  5. Select paratag. Replace this by typing ChapTitle.

    The Building Block now reads <$paranum[ChapTitle]><$paratext[ChapTitle]>, as seen in Figure 4.14. Any paragraph tagged with ChapTitle will be referenced in this running header for both the autonumber and text.

    Figure 4.14. The edited Building Block.

    graphics/04fig14.gif

  6. Click on the Edit button.

    You will be returned to the Variable window. Notice that the variable you just edited is selected in the list, and its definition is displayed directly below the list.

  7. Click on Done.

    All occurrences of this Running H/F 1 variable update and are displayed in the header of the document.

Tip

If you cannot see all characters in the definition text field, use Ctrl-left or right arrow key to scroll left and right.

Switch to the body pages and check that the running header is working correctly. Look in the header. You see good news and bad news:

Chapter 2 The Great Unknown

The good news is that the header already includes the word "Chapter" because the autonumber format for the chapter number already contains the word "Chapter" (refer to Table 4.1).

Now the bad news: Notice that no space exists between the number 2 and the word "The" at the beginning of the chapter title.

Don't panic; everything can be fixed. Try some detective work to find out why this happened. Is the source of the problem in the paragraph content itself? No, because you do not want the chapter title to have a space in front of it. Therefore, you need to return to the Running H/F 1 variable to see what happened.

Tip

If referenced paragraph tag names are not identical in both Building Blocks, the heading will not read correctly (text with no autonumber or vice versa).

Switch back to the master page and double-click on the Running H/F 1 variable. Look at the definition displayed below theVariables list. The two Building Blocks have no space between them. That problem can easily be fixed. Click on Edit Definition, click in the definition between the two Building Blocks, and insert a space so that the definition reads as follows:

<$paranum[ChapTitle]> <$paratext[ChapTitle]>

Update this variable by clicking Edit and Done. The problem is fixed. Confirm this fact by switching to a body page.

Save the document. In a subsequent example, you'll add character formats to change the appearance of the header.

More on Autonumber Formats

You might not want the word "Chapter" included in your real-world document header. Perhaps your document design calls for just the chapter number itself and accompanying text.

The problem which was an advantage with the word "Chapter" is that paragraph tags are sometimes constructed with words such as "Chapter" as part of the autonumber format (refer to Table 3.1 on page 46).

You can work around this difficulty in FrameMaker in a few ways. First, you can see how it's done by using a different Building Block. Then you review achieving the same result by adding a system variable in the header along with Running H/F 1. Either way works it's up to you.

Using Building Blocks with "only"

FrameMaker provides alternative Building Blocks that enable us to include just the autonumber itself in the header and exclude the word "Chapter" even if it is part of the autonumber format. The following steps begin with the Edit System Variable window for Running H/F 1:

  1. Select the Building Block <$paranum[ChapTitle]> and delete it.

    You replace this Building Block with a different one that includes the numeric part of the autonumber format only.

  2. Select <$paranumonly[paratag]> from the Building Blocks list.

    The Building Block <$paranumonly[paratag]> is inserted in the Definition text field immediately before <$paratext[ChapTitle]>. Whereas "$paranum" includes the entire autonumber format that is part of a tag, including any text that is built into the format, "paranumonly" incorporates only the autonumbers of the referenced paragraph tag and does not include any text that is part of that autonumber format.

  3. Select paratag. Replace this by typing ChapTitle.

    The definition now reads

    <$paranumonly[ChapTitle]> <$paratext[ChapTitle]>

    This definition is shown in Figure 4.15. This means that this running header contains the paragraph number only; no text is included in the autonumber format, and the text content of the most-recent paragraph tagged with ChapTitle. Don't forget to make sure a space exists between the Building Blocks.

    Figure 4.15. The Paranunonly Building Block in Running H/F 1 Definition.

    graphics/04fig15.gif

Using the Chapter Number System Variable

You can combine the method of this section with that of the section "Starting with the Easy Stuff" on page 82 to get a header containing the chapter number and chapter title. As noted previously, the system variable Chapter Number can be set up to contain the chapter number. This system variable can be put into the header along with the Running H/F variables. The following steps begin on the master page:

Note

For this method to work, the chapter number must be set in Format > Document > Numbering.

  1. Click in the header background text frame immediately to the left of the Running H/F 1 variable.

    Do not click on the Running H/F 1 variable itself.

  2. Select Special > Variable > Chapter Number. Click on Insert.

    The Chapter Number variable is inserted directly in front of the Running H/F 1 variable. The chapter number appears as a number on the master page and from body pages.

  3. Type a space.

    This space is needed to separate the chapter number from the Running H/F 1 variable that contains the title.

  4. Double-click on Running H/F 1.

    The Variable window appears with Running H/F 1 selected in the list.

  5. Click on Edit Definition.

    The Edit System Variable window appears with the definition selected.

  6. Select <$paranum[ChapTitle]> and delete it.

    You do not need Building Block <$paranum[ChapTitle]> because the chapter number is displayed from the Chapter Number variable inserted in the header in Step 2. Make sure no spaces are around the remaining Building Block. The necessary space between the chapter number and the chapter title was inserted at Step 3.

Tip

Watch fast-typing fingers here or the entire definition will be deleted.

When you return to the master page header, the completed header should look like Figure 4.16.

Figure 4.16. The final result of the Chapter Number variable with Running H/F 1.

graphics/04fig16.gif

Adding Character Formatting

Now that you have a varying header, you need to make it look fancier by putting the chapter number in bold.

Headers and footers take on the default formatting of whatever paragraph tag is initially applied to that header or footer. For example, if your header has a paragraph tag Header, and that header is formatted as Times, 12 Regular, that is how the header is displayed throughout the document.

By now, you probably noticed that the Running H/F variable behaves like a block of text. Although you can apply a character tag to the entire variable, you cannot use Format > Characters to apply a character tag to just a portion of this block of text. However, you can go back inside the definition of this variable to apply a character tag to a portion of this header.

In the example, the header now looks like this:

Chapter 2 The Great Unknown

It's time to add bold character formatting to the chapter number (but not the title), so that the header looks like this:

Chapter 2 The Great Unknown

Before you get started, it's a good idea to check your FrameMaker Character Catalog for a Bold character tag. If you do not have the tag that you want to use in the header (in this case, Bold), you have to create one. After the correct character tag exists in your FrameMaker template, you can use the following steps, beginning with the Edit System Variable window, to apply that tag to part of the header:

Back to Basics

Use Format > Characters > Designer > Commands > New Format to create new character tags. (Ctrl-D is the shortcut to the Designer window.)

  1. With the insertion cursor immediately before the first Building Block of the definition, <$paranum[ChapTitle]>, select <Bold> from the Building Blocks list.

    The <Bold> Building Block is inserted. This means that all content in the header variable to the right of this Building Block is formatted in accordance with the properties of the Bold character tag.

  2. Place the insertion cursor after the right angle bracket of the <$paranum[ChapTitle]> Building Block. Select <Default Font> from the Building Block list.

    The <Default Font> Building Block is inserted. This means that all text to the right is reset back to the normal default font of the paragraph and it's not bold. If you do not reset the font back to its normal state, everything in the header to the right of the <bold> Building Block also becomes bold.

  3. Click on Edit and Done to complete the process.

    The running header displays with bold character formatting for the chapter autonumber and regular character formatting for the remainder of the header.

Displaying Multiple-Level Headings in a Varying Header or Footer

Previously, you worked with a simple varying running header that referenced one heading level in your document: the chapter title. In this section, you explore more-complex varying running headers that have the ability to display any one of several subheading levels. For the example, say that your document has three levels of numbered subheadings. The tag name, how the subheading is displayed in the document, and the construction of the autonumber format for each subheading paragraph tag are shown in Table 4.2.

Table 4.2. Paragraph Tag Names for Chapter and Subheadings

Paragraph Tag Name

Description

Autonumber Format

H1

2.1 A Territory Divided

C:<$chapnum>.<n+>

H2

2.1.1

C:<$chapnum>.<n>.<n+>

H3

2.1.1.1

C:<$chapnum>.<n>.<n>.<n+>

The objective is to display the content of any one of these subheadings, as it occurs in the document. Technically speaking, the first paragraph with one of the referenced paragraph tags on any given page is displayed in the header of the document on that page. On the next page where any one of the subheadings is found in the document, the header displays that information.

For example, if a paragraph tagged with H2 is the first H1, H2, or H3 that occurs on page 5 of the document, the header displays the content of the paragraph tagged with H2. If a paragraph tagged with H3 appears on page 5 first, that paragraph's content is displayed in the header.

Creating a Multiple-Level Varying Header

For a refresher on creating a simply varying running header, see the section "Creating a Running H/F Variable" on page 94. You begin these steps from the Edit System Variable window and focus just on the multiple paragraph tag information, as previously outlined in Table 4.2.

In the first example, you create a multiple varying header that references the subheading text of any one of three subheadings in the document (H1, H2, H3). This example does not include the autonumber format. I cover that later in this chapter.

Make sure that some paragraphs in your document are already tagged with H1, H2, and H3 paragraph tags. Then, when you test this header, you'll know if it's working correctly.

Back to Basics

If no paragraphs in the document are tagged with H1, H2, or H3, nothing shows up in the header.

To create a multiple-level varying header, follow these steps:

  1. Delete the current information in the Definition text field.

    You must do this to start with a clean slate for this exercise.

  2. Click once on <$paratext[paratag]> in the Building Blocks list.

    The Building Block <$paratext[paratag]> is inserted into the Definition text field. As you learned, "$paratext" means that only the text of referenced paragraphs in your document is displayed in the header, and "paratag" is a placeholder for the actual paragraph tag that you want to reference.

  3. Select paratag in the definition. Replace it by typing H1,H2,H3.

    The Building Block now reads <$paratext[H1,H2,H3]>. The commas are part of the definition and are used to separate multiple referenced paragraph tags. This means that any paragraph tagged with either H1, H2, or H3 can be referenced and displayed in the header of your document. On any page, FrameMaker displays the first paragraph found tagged with any of the three paragraph tags.

Although no necessary limit exists to the number of paragraph tags that you can include in a Building Block, there is a limit as to how many characters can fit in the Definition text field. The magic number is 255. If you want to include many levels of subheadings in headers and footers, it's a good idea to keep paragraph tag names short, so you don't exceed the character limit of the Definition text field.

Back to Basics

You can create or rename paragraph tags with Format > Paragraphs > Designer > Commands.

In the next example, you see how the Definition text field can get crowded.

Adding Autonumber Formats

Now that you have a header that references the text of multiple levels of subheadings in your document, try adding some autonumbers to the header. For this exercise, you edit the Running H/F that you worked with in the previous example. Start from the Edit System Variable window:

  1. Place the insertion cursor immediately before the current definition.

    This is where you add the new Building Block that references the autonumber format of the three subheading levels in the document. The autonumber format, in this case, doesn't include text (refer to Table 4.2. )

  2. Click once on <$paranum[paratag]> in the Building Blocks list.

    The Building Block <$paranum[paratag]> is inserted into the Definition text field. This block means that the autonumber of a paragraph whose tag you type in place of "paratag" appears in the heading.

  3. Select paratag. Replace this by typing H1,H2,H3.

    The commas are part of the definition. Be sure to include them between paragraph tag names. The Building Block now reads <$paranum[H1,H2,H3]> <$paratext[H1,H2,H3]>, as shown in Figure 4.17. Any paragraph tagged with either H1, H2, or H3 is referenced in this running header for both the autonumber and text.

    Figure 4.17. The result of editing the Building Block.

    graphics/04fig17.gif

Tip

You might not see all characters in the Definition text field. Use Ctrl left or right arrow keys to scroll left and right.

Changing the Default Order of Running Headers

Whether you reference one paragraph tag in the header or several, the default order in which FrameMaker displays this referenced content in the header is the order in which it was found in the document. Using the example of multiple subheading levels, if three paragraphs on a page are tagged with any one of the three paragraph tags that are referenced in the header, the first one found on the page is displayed in that header.

In the real world, the default order might not work well for your document. If you prefer to have the last item found on a page displayed in the header, you can do this easily with one small change to the Running H/F building block. Just type a plus sign (+), followed by a comma (,) in front of the first referenced paragraph tag, as shown in Figure 4.18.

Figure 4.18. You can reverse the running headers' default order by typing a few keystrokes.

graphics/04fig18.gif

If you are referencing just one paragraph tag, the same method applies. For example, <$paratext[+,H1]> causes the text of the last level 1 subheading on a page to be displayed in the header.

For the example that shows the autonumber and text of any level 1, 2, or 3 subheading, make sure that if you make this small but powerful change to the <$paranum[H1,H2,H3]> Building Block, you also make the same change to the <$paratext[H1,H2,H3]> Building Block. If not, you end up with the autonumber from the last found item on a page, followed by the text of the first found item on a page.

Dictionary-Style Headers

Dictionary-style headers are the headers at the top of left pages that display the first-referenced content on those pages and the headers at the top of right pages that display the last-referenced information on those pages. Pretty clever.

These headers work great for dictionaries (obviously), glossaries, indexes, or other reference material that has an alphabetical, or some other, order to it. Readers can get a better grasp on where they are in documents laden with pages and pages of such reference material.

Setting up this type of header is no different from setting up varying headers. But, you must follow one critical procedure: On the left master page, set up a Running H/F variable (say, Running H/F1) to display referenced paragraph tags in the default order. Then set up a different variable (say, Running H/F 2) on the right master page exactly the same as the Running H/F 1, except that you must add the plus sign and comma (+,) before the first-referenced paragraph tag. Then, the right page header will show the last item on the page instead of the first.

Using Abbreviated Headings

Just when you thought you explored all FrameMaker's powerful header and footer features, one more slick feature dazzles and amazes you.

Previously, I focused on headers and footers that have the ability to display text from the content of documents automatically. Now, you explore headers and footers that can display text that is not really part of your document specifically, text that is hidden from view to begin with and not intended for viewing in the body of the document at all. Why would you want to do this? That's a good question.

Suppose that the document header must contain the number and text of level 1 subheadings. If those level 1 subheadings are wordy, they probably won't fit into the space available for the header. So, you need to abbreviate the header in order to make it fit. Thankfully, FrameMaker provides a method to produce abbreviated headers and footers.

Back to Basics

When you work with markers, keep text symbols turned on or you will not see the markers.

Here's how it works: If you have subheadings (or other referenced paragraphs) that are too long to be displayed in the header of your document, use Header/Footer markers instead of <$paratext[paratag]> Building Blocks in your Running H/F variables. You have two markers to choose from: Header/Footer $1 and Header/ Footer $2. The markers, rather than the actual subheadings, contain the text that you want to be displayed in the header. The marker is placed in the text at the location of the intended reference paragraph.

Let's go through the steps necessary to achieve this task. In this example, you set up a header that uses a marker instead of subheading level 1. The marker text and not the subhead level 1 text is displayed in the header of the document.

Begin by inserting a marker:

  1. With your insertion cursor at the beginning of a long subheading text, select Special > Marker > Header/Footer $1.

    The Marker window appears.

  2. Type text in the Marker text field.

    This text is what you want to display in the document header instead of the content of the referenced paragraph tag (see Figure 4.19).

    Figure 4.19. You must type the marker text that will be displayed in the header.

    graphics/04fig19.gif

Back to Basics

You can use Special > List Of > Markers to get a list of all marker text and associated page numbers.

  1. Click New Marker.

    The marker is inserted at the insertion cursor location.

Next, set up the running header to reference the marker text instead of subheading text. These steps begin and end at the Edit System Variable window:

  1. Select <$paratext[H1]> and delete it.

    Clear the existing header variable so that you can start anew.

  2. Select <$marker1> from the Building Blocks list.

    The Building Block <$marker1> is inserted in the Definition text field. The block <$marker1> corresponds to the marker Header/Footer $1, and <$marker2> corresponds to the marker Header/Footer $2.

If you decide to use this method to reference particular information, you cannot also use the referenced paragraph tag method. You must set a Header/Footer 1 marker for every level 1 subheading in the document. Otherwise, level 1 subheadings that do not have markers are not reflected in the headers.

Summary

This chapter was certainly a brainful! You learned that several ways exist not only to incorporate various headers and footers into FrameMaker documents, but to change the format as well.

These distinctive FrameMaker features add considerably to the part of the workload that you can shift to the computer. Of course, that's when everything is working properly. If it's not, this chapter gives you some ammunition to get in there and fix it.

CONTENTS


FrameMaker 6. Beyond the Basics
FrameMaker 6: Beyond the Basics
ISBN: B00008CM3V
EAN: N/A
Year: 2000
Pages: 15
Authors: Lisa Jahred

Similar book on Amazon

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