Creating user variables

Understand how to create user variables in Adobe FrameMaker.

Introduction

You create and add user variables to display custom information in a document. For example, you can create a variable, author_name, that specifies the name of the document author. Or, you can create a variable, product_name, to specify the name of the product.

To create a user variable:

  1. In the Variables panel, click Create New User Variable.

    The Add/Edit Variable dialog is displayed.

    Figure 1. Add Variable dialog
    Add/Edit Variable dialogin FrameMaker
  2. Enter a name for the variable: Product Name.

    Important: If you enter a name that is used by an existing variable (system or user), the definition of the existing variable is overwritten.
  3. Enter a definition for the variable.

    For example, you can enter the definition as FrameMaker for the variable Product Name.

  4. To create the variable, click Add.

    If you are changing the definition of an existing variable, click Edit.

After you create a user variable, you can insert the variable into your document.

You can also use paragraph style names or element names in the variable definition.

For example, <$paratext[ChapterTitle, SectionTitle, AppendixTitle]> retrieves the text of the most recent paragraph with the paragraph style ChapterTitle, SectionTitle, or AppendixTitle.

You can also specify a character style for the variable by preceding the variable definition with the character style name. It is recommended to close the formatting with the building block <Default ¶ Font>.

To apply a character style to a variable definition:

  1. Click a character style name (e.g., <strong>) in the list. The character style name is added to the variable definition.

  2. Follow the character style by the variable text value. You can end the formatting range by adding <Default ¶ Font> (short form: </>).

    For example:

    <Emphasis>Adobe<Default ¶ Font>

    You can also add multiple character styles to the different text in the variable definition. For example:

    <Emphasis>Adobe <strong>FrameMaker<Default ¶ Font>