HTML conversion macros

Learn how to use HTML conversion macros in Adobe FrameMaker

In this topic

Introduction

You can use the following tables on the HTML reference page to define HTML conversion macros:

Note: You cannot alter the System or General HTML macros in the HTML Setup dialog box.

After a macro is defined, you can use it by name in other macros, or you can map to it in the HTML Mapping table. The macro name appears in the To drop-down list in the HTML Setup dialog box, so you can map a format to it without editing the Mapping table directly.

For examples of HTML conversion macros, see the reference pages of the templates that are included with FrameMaker.

Create or edit an HTML conversion macro

  1. Choose View > Reference Pages to display the HTML page.

  2. Edit a macro in a table, or create a row (by pressing Ctrl+ Return) and enter a new macro starting with a macro name. (You cannot add macros to the HTML System Macros table; you can only edit their replacement text.)

Replacement text can contain any mixture of text, HTML codes, and FrameMaker building blocks. Be sure that you enter valid HTML code; FrameMaker does not check the HTML syntax.

Use building blocks in HTML conversion macros

You can use the following building blocks in HTML conversion macros to include special types of text.

Building block

Description

<$paratext>

<$paratag>

<$paranum>

<$paranumonly>

See “Including source information in cross references” and “Including character styles in cross-references” for details.

<$variable[varname]>

Contains the text of the variable

<$defaulttitle>

Contains the text of the first heading that appears in the current document

<$nextsubdoc>

Contains the URL of the next HTML subdocument

<$prevsubdoc>

Contains the URL of the previous HTML subdocument

<$parentdoc>

Contains the URL of the parent HTML document

Building blocks are enclosed in angle brackets (< >) and begin with a dollar sign ($). Enter these building blocks in all lowercase letters.

Note: The General Macros table has a column labeled “Head.” Use this column to define a title or to include special, advanced information about the HTML document (such as keywords that a search engine might use). To fill in this column, you need to know the HTML elements that are permitted in the HEAD section of an HTML document.

Redefining HTML system macros

HTML system macros are a special case because you can redefine them, but you cannot add new ones.

These macros are especially useful when splitting up documents into separate HTML files. For example, you can define the StartOfSubDoc macro so that your company logo appears at the top of every new Web page.

In these descriptions, the parent document refers to the first Web page and subdocument refers to a document linked to the parent document.

System macro

Use

StartOfDoc

Inserts text at the top of the topmost Web page

EndOfDoc

Inserts text at the end of the topmost Web page

StartOfSubDoc

Inserts text at the top of each subdocument except the first and last

EndOfSubDoc

Inserts text at the end of each subdocument except the first and last

StartOfFirstSubDoc

Inserts text at the top of only the first subdocument created

EndOfFirstSubDoc

Inserts the replacement text at the end of only the first subdocument

StartOfLastSubDoc

Inserts the replacement text at the top of only the last subdocument created

EndOfLastSubDoc

Inserts the replacement text at the end of only the last subdocument