Brush up on FrameMaker template components, including the Paragraph and Character Designer, and then dive into details on how to create your own custom template (from the book XML and FrameMaker by Kay Ethier, ISBN: 159059276X, Apress).
Understanding and Creating FrameMaker Templates - Cross-Reference Formats, Conditional Text and Creating a Simple Template (Page 9 of 14 )
FrameMaker cross-references are created through a dialog box. In any open document, you can select Special>Cross-Reference and FrameMaker will let you point to any part of a document. You can then create a link to it. The cross-reference text appears. It also updates as you edit the document, ensuring the correct reference text appears in your printed documents regardless of how many times you revise the document.
All cross-references become links when you output to HTML, PDF, and other formats. Cross-references also retain their linked information in XML as attributes.
Conditional Text Settings
FrameMaker’s conditional text feature allows you to set up a document so that some content may be shown or hidden, allowing you to print multiple documents from a single file or book.
Conditions are not always needed in a template. The purpose of conditions is to allow you to produce multiple documents from a single file or book. To make this work, you mark text with named conditions. Then, when you want to view a document, you Show text that is needed and Hide text that is not. For example, a book might be published in US English and UK English. Because there are subtle changes in spelling, terms, and phrases, the content is almost the same between the two versions of the book. You could mark certain characters and words with conditions, then use the Show/Hide to view the document content in each language. The end result is one set of files that produces two books. The savings in terms of writing, comparing, and editing can be significant.
Conditions work to a certain degree in FrameMaker 7.0, but only in the structured FrameMaker document and not in the XML. FrameMaker 7.1, however, has the ability to retain conditions on export to XML through process instructions.
Creating a Simple Template
In this section, you can follow the instructions to make a template for a cookbook—at least the important parts of one. Refer to earlier descriptions in this chapter if you are not sure what parts make up a template.
To begin this new template, use the following instructions to start a new document:
When the New dialog box appears, select Portrait.
Save this file as mycookbook.fm in any folder.
Now that you have the beginnings of a document, follow the instructions in the upcoming sections. They will help you to create a simple, custom template. When you finish the instructions provided here, your finished template will produce documents that look something like Figure 3–17.
Figure 3–17. A recipe document with page layout and Paragraph Catalog showing.
Modifying, Creating, and Deleting Paragraph Formats
Several paragraph formats are required to create the recipes displayed in the sample documents. This section shows you how to define the look of four paragraph formats: Heading1, Numbered1, Numbered, and Body. It also walks you through the creation of an Ingredients paragraph format.
NOTE The additional paragraphs in the template are there to provide options for formatting other portions of the cookbook. The exercises focus on the formatting needed by the recipe.
When you build your own templates, do not create more formats than you need.
FrameMaker starts with a short list of paragraph formats in the document that we used. This list is shown in Figure 3–18.
Figure 3–18. A new document exhibits its default Paragraph Catalog entries.
Before creating formats, you should delete any unwanted formats from the catalog. Leave the Body, Heading1, Numbered1, and Numbered paragraphs and delete the rest. To delete formats,
Open the paragraph catalog by clicking the Paragraph Catalog button ( ) in the upper right corner of your document window.
When the catalog opens, click the Delete button at the bottom.
The following Delete Formats from Catalog dialog box appears.
Select the first tag that you want to delete (for example, Bulleted), and click Delete.
Repeat for all the tags except those you were instructed to keep. These four are shown in the following graphic.
After deleting the unwanted formats, click Done.
The Paragraph Catalog now shows only the four necessary formats, as seen in the following graphic.
Save your template file.
Now that you have the Paragraph Catalog pared down, you need to add the new format called Ingredients. Before creating a new paragraph format, put your insertion point in a paragraph that has an appearance (definition) similar to what you want. This allows you to have those settings automatically used in the new format, which should save you time in redefining them.
In the document that you created, there is not yet any text. Type the word Ingredients as a placeholder on the first line and make sure that the text is tagged with the Body paragraph format. Since Body is similar to Ingredients, you can use Body as a starting point in creating your new paragraph format. To accomplish this, follow these steps:
Open the Paragraph Designer ( Format>Paragraphs>Designer).
From the Commands menu, select New Format.
Type Ingredients in the Tag text box, and check Store in Catalog and Apply To Selection.
In the Paragraph Designer, go to the Default Font properties sheets and change the Weight to Bold.
Click Update All to make that change and lock in the Ingredients paragraph definition.
That is the only change to be made in this example. Feel free to experiment with the properties and adjust the look and behavior of Ingredients.
You now have the minimum paragraph formats to proceed with your document. Using the paragraph tags you have created, type some sample recipe text similar to that shown in Figure 3–19. You need only enter the minimum text to test your paragraph formats.
Figure 3–19. Here is some sample text to type in your recipe template.
For now, leave these paragraphs looking the way that they do. Once you complete the exercises, you might go back and play with the paragraph formats a bit to make them look better and adjust spacing.
This chapter is fromXML and FrameMaker, by Kay Ethier (Apress, 2004, ISBN: 159059276X). Check it out at your favorite bookstore today. Buy this book now.