Home arrow XML arrow Page 9 - Understanding and Creating FrameMaker Templates

Understanding and Creating FrameMaker Templates

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).

Author Info:
By: Kay Ethier
Rating: 5 stars5 stars5 stars5 stars5 stars / 18
July 20, 2004
  1. · Understanding and Creating FrameMaker Templates
  2. · Paragraph Formats
  3. · Pagination Properties and Numbering Properties
  4. · Advanced Properties of the Paragraph Designer
  5. · Designing Character Formats with the Character Designer
  6. · Master Page Layouts
  7. · Reference Pages
  8. · Table Formats
  9. · Cross-Reference Formats, Conditional Text and Creating a Simple Template
  10. · Creating Character Formats and Cross-Reference Formats
  11. · Modifying and Adding Master Pages
  12. · Creating a Double-sided Document
  13. · Adjusting Document Properties
  14. · Reviewing the Import Formats Feature

print this article

Understanding and Creating FrameMaker Templates - Cross-Reference Formats, Conditional Text and Creating a Simple Template
(Page 9 of 14 )

Cross-Reference Formats

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:

  1. Click File>New>Document.

  2. When the New dialog box appears, select Portrait.

  3. 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,

  1. Open the paragraph catalog by clicking the Paragraph Catalog button ( ) in the upper right corner of your document window.

  2. When the catalog opens, click the Delete button at the bottom.

    The following Delete Formats from Catalog dialog box appears.

  3. Select the first tag that you want to delete (for example, Bulleted), and click Delete.

  4. Repeat for all the tags except those you were instructed to keep. These four are shown in the following graphic.

  5. After deleting the unwanted formats, click Done.

    The Paragraph Catalog now shows only the four necessary formats, as seen in the following graphic.

  6. 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:

  1. Open the Paragraph Designer ( Format>Paragraphs>Designer).

  2. From the Commands menu, select New Format.

  3. Type Ingredients in the Tag text box, and check Store in Catalog and Apply To Selection.

  4. In the Paragraph Designer, go to the Default Font properties sheets and change the Weight to Bold.

  5. 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 from XML and FrameMaker, by Kay Ethier (Apress, 2004, ISBN: 159059276X). Check it out at your favorite bookstore today. Buy this book now.

blog comments powered by Disqus

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials