HTML output

Know about the HTML output in FrameMaker.

FrameMaker allows you to save the book and FM files in multiple formats by using the multichannel publishing feature. You can define the conversion and pagination settings in FrameMaker, and then save the entire book or a document as HTML, and other supported formats. The HTML output created can be navigated through the links created from the source document.

If you are publishing the content authored into online Help formats other than HTML, such as EclipseHelp or Adobe AIR-based Help, you can use Adobe RoboHelp as the publishing tool. In addition, for enterprise-level publishing, you can use Adobe FrameMaker Publishing Server to publish content in multiple channels and on devices.

Preparing documents for conversion to HTML

Know about HTML documents and how to prepare documents for conversion to HTML, conversion of text and graphics in FrameMaker.

HTML provides a set of elements that describe how each part of a document is used. For example, the <p> (paragraph) element is a normal body paragraph; the <h1> element is a first-level heading.

HTML elements are conceptually similar to Adobe FrameMaker formats. For example, HTML documents contain body paragraph elements and heading elements, while FrameMaker documents contain paragraphs that use formats designed for body paragraphs and headings.

However, HTML elements differ from FrameMaker formats in the following ways:

HTML documents can contain hypertext links to locations in the same file, or to other files anywhere on the internet or on an intranet. Most of the FrameMaker hypertext commands are automatically converted to HTML hypertext commands when you save a document as HTML.

HTML conversion overview

HTML is an online format optimized only for certain kinds of presentation. For example, you cannot easily create a two-column layout in HTML. For this reason, do not expect your HTML documents to look identical to the FrameMaker originals. If design items in your documents have no acceptable equivalents in HTML, consider converting to PDF instead of HTML. For information, see Save as PDF.

What is converted

When you save a document as HTML, FrameMaker converts only the contents of the main text flow (the flow tagged A). Make sure the text in flow A is the one you want and that all of flow A is connected. (See Connect text frames.)

Tip: If your document has multiple flows that you want preserved, consider saving as PDF instead. (See PDF output.) When you save as PDF, each flow can be converted to an Acrobat article thread.

The contents of anchored frames in the flow are converted to graphics (including the text within anchored frames). Graphics and text not in the main flow whether they appear on master pages (such as headers and footers) or directly on body pages (such as graphics placed directly on the page) are not converted to HTML. If you want to duplicate the effect of headers so that text or graphics appear at the top of every HTML document (for example, text for a logo or navigation buttons), use macros.

Some FrameMaker hypertext commands convert to equivalent HTML links.

HTML export issues

When you export to HTML, note the following issues:

  • Vector graphics and text frames in anchored frames are converted to bitmaps. If the text in the converted graphic is greeked, you can change the Greek Text Smaller Than setting in the Preferences dialog box.

  • If you scale or crop GIF graphics that have been imported by reference, these settings will be lost when converted to HTML.

  • HTML files produced by FrameMaker do not display line breaks when opened in Windows Notepad. To view the HTML file correctly, use FrameMaker, an advanced text editor, or a browser that lets you view the source code.

  • If the document uses paragraph or character tag names that contain accented characters, you may have problems viewing the characters with some browsers. To avoid this problem, rename paragraph or character tags to use unaccented characters, or delete the cascading style sheet (.css) file that was created with the HTML file.

Using templates that map well to HTML

To minimize fine-tuning when you save documents as HTML, create your documents from one of the supplied FrameMaker templates. The formats of these templates map easily to HTML equivalents.

Sample chapter template before and after HTML conversion
Sample from one of the supplied FrameMaker chapter templates before and after HTML conversion.

Using web-safe colors

The Online color library provides 216 web-safe colors that have a consistent appearance on all platforms when viewed with a web browser.

Preserve the FrameMaker look by using style sheets

HTML was designed not as a formatting language but as a way of presenting the structure of a document (its semantics). In some cases, however, you may be concerned with the format of a document as well as its semantics. You may want to preserve the look of your FrameMaker document more than is possible with regular HTML elements alone.

For example, suppose you have a document that uses blue 20-point type for the first letter of a chapter. An HTML style sheet can preserve unique formatting of this kind.

An HTML cascading style sheet is created for you with the same name as the main HTML file but with an extension of .css. It is a standardized file format that many Web browsers can use and interpret. A .css style sheet contains formatting specifications that can duplicate the font, style, size, indents, spacing, and margins of the original document.

The HTML file contains a reference to a .css style sheet. If the browser finds the style sheet, it uses the information to format the Web page. If the browser does not support style sheets, it uses only the built-in formatting defined for each HTML element.

  1. Save your document as HTML. A .css file is automatically created in the same folder as the HTML file.

  2. Copy the HTML style sheet (.css file) to the web server in the same folder as your HTML files.

Note: Style sheets are sometimes called “cascading” because their format rules can overlap-and collide-with rules in other style sheets, such as a personal style sheet set up by someone viewing your converted document. The style sheet that FrameMaker creates takes precedence over other style sheets.

Format overrides

Changes tracked as format overrides

FrameMaker treats changes in text, character, and table properties that differ from the definitions as overrides. In addition, if the current document does not have a definition of the format, it is considered an override, such as when you copy and paste text from other documents.

The following cases are considered overrides:

  • When you apply formatting using the toolbar such as applying bold, underline, or italics.

  • When you edit the paragraph, character, or table format in the Designer and then applying only to the selection, without updating the format definition.

  • When you copy content from another document with a different template, the content copied retains the formatting, but the definitions are not present in the current document.

For example, consider a character format named Error, with text color as Red and Weight as As Is. If you change the text color from Red to Black, then it is an override. However, if Weight is change from Regular to Bold, it is not an override (no deviation from definition). However, if a format that had a property set as As Is is changed, it is not tracked as an override.

Note: If properties of table cells are changed from Table > Format > Custom Ruling and Shading, then it is not flagged as a table format override.

Managing format overrides for content conversion

Accurate conversion depends on the consistent use of formats in your FrameMaker documents. Results will not be as good if your documents use format overrides instead of defined formats stored in the catalogs. For example, a document that uses a Body format for both regular paragraphs and headings will not convert to HTML accurately. If your documents use overrides extensively, you should do one of the following:

Search and remove format overrides

You can search and remove paragraph, character, and table format overrides in a book or document.

  1. Select Edit > Find, and from the Find pop-up menu, select the format override type.

  2. In the Change pop-up menu, select Remove Override.

  3. Click Find, and then click Change for each instance of the format override.

Create and apply a new set of formats based on the overrides

You can let FrameMaker automatically analyze the document for format overrides, and create new formats. Any format used in the document but not stored in a catalog is added to the catalog. Also, if the document uses a format with a format override, a separate format based on the override is added to the catalog.

For example, if a document contains a Body paragraph with an override (for example, a left indent), that paragraph will be tagged Body1.

If another override is used for Body (for example, a default font change), any paragraph using that override will be tagged Body2. You may want to rename some formats to make them easier to interpret. For example, you could rename Body1 to BodyIndent.

  • Choose File > Utilities > Create And Apply Formats, and then click Continue.

Add links to URLs

A uniform resource locator (URL) is the location of a document anywhere on the Internet or on an intranet. You can embed a special marker in a FrameMaker document that becomes a link to a URL when the document is saved as HTML or PDF.

  1. Select the text you want to be linked to a URL and apply a character format to it. For example, you might apply an underline format to the words Click here for more information.

  2. Click in the formatted area, and choose Insert > Hypertext.

  3. Choose Message Client from the Command pop-up menu and enter the following in the Syntax text box:

     message URL url_name 

    Replace url_name with the URL you want to link to. For example, to link to the Adobe Systems home page, you would enter the following:

     message URL http://www.adobe.com 
  4. Click New Hypertext Marker. When the document is converted to HTML, XML, or PDF, clicking the formatted text displays the location specified by the URL.

Create links that simulate a TOC

You can convert a large file into a series of small HTML subdocuments that are linked to one parent document. The parent document can then function as a linked table of contents for the subdocuments.

FrameMaker document and the simulated TOC in a Web page
FrameMaker document and the simulated table of contents for the subdocuments

Subdocuments are automatically named sequentially. For example, when you save MyDoc to HTML, the parent document is called MyDoc.html, the first subdocument is MyDoc.1.html, the second one is MyDoc.2.html, and so on. Do not rename the files; otherwise, the links will become invalid.

The hierarchy of heading levels in the subdocuments is controlled by the Headings table.

  1. Adjust your document mappings so that a heading starts a new file. Do this by using the Start New, Linked Web Page option in the HTML Setup dialog box.

    Note: Look for a heading whose contents are neither too large nor too small. (Readers might get lost if they have to do too much scrolling or might be frustrated if the page they jump to has only one paragraph.) Also, you may want to make sure some text appears before the first instance of the heading you choose so that there is an introduction to the list of links.
  2. Give readers an easy way to return from the linked subdocuments to the parent document by defining the EndOfSubDoc or StartOfSubDoc system macro. The text or graphics defined by this macro will appear at the end or the start of each linked Web page as in the following example.

    Macro Name

    Replace With

    EndOfSubDoc

    <div>
    <p><a href="<$parentdoc>">Return to main page</a></p>
    <p><a href="<$prevsubdoc>">Go to previous page</a></p>
    <p><a href="<$nextsubdoc>">Go to next page</a></p>
    </div>
  3. Save the file or book as HTML. The parent document will contain the linked table of contents.

Setting up links for image maps

Image maps on a web page are graphics with areas defined as links. Image maps can add visual interest to otherwise plain text-only links to web pages.

When you convert a FrameMaker document to HTML or XML, graphics in the main text flow are automatically converted to image maps if you have set them up correctly. They convert in these cases:

  • When a graphic in an anchored frame has one or more text frames on top of the graphic, and these text frames have valid hypertext markers in them.

  • When a graphic in an anchored frame has a rectangular matrix of links over it.

Specifying graphics conversion

When you save documents as HTML, all graphic files imported by copying into anchored frames are converted to GIF format unless you specify that all the graphics be saved to another format. Each graphic is saved to a separate file. Text in anchored frames is also converted to GIF.

Graphic files imported by reference are left in their original locations unless you specify that copies should be made. In that case, the formats are inspected and converted as needed (preserving the dpi scaling of a graphic). The new files are created in the same folder as the HTML document.

Specify the file format for converted graphics

  1. Choose File > Utilities > HTML Setup and click Options.

    FrameMaker HTML Options dialog
  2. Specify the graphic file format you want. You can choose from the following formats:

    • GIF is best used for non-photographic images with no more than 256 colors.

    • JPEG format is best used for images with a wide range of color, such as a 24-bit photograph.

    • PNG format is a public-domain format that is becoming more widespread on the Web. Like GIF, it is best used for images with no more than 256 colors.

  3. Click OK.

Specify that graphics imported by reference be copied and converted

To specify that graphics imported by reference will be copied to the target destination:

  1. Choose File > Utilities > HTML Setup and click Options.

  2. Select Copy Files Imported by Reference.

Set up and adjust HTML mappings

Know how to modify and set up adjust HTML mappings, auto level mappings and mappings for formats in FrameMaker.

You can change the following HTML mappings:

After you save a document in HTML format, you may want to refine the mappings.

Note: A few mappings cannot be changed. For example, a FrameMaker table always converts to an HTML table, and an anchored frame always becomes an image with an IMG tag.

Set up or modify HTML mappings

  1. Choose File > Utilities > HTML Setup. The HTML Setup dialog is displayed.

    FrameMaker HTML Setup dialog

    FrameMaker either loads the current mappings into the HTML Setup dialog box or, if no mappings have been created yet, creates default mappings.

  2. From the Map pop-up menu, choose the type of formats to map (Character Formats, Paragraph Formats, or Cross-Reference Formats).

  3. Specify a mapping by choosing a FrameMaker format from the From: pop-up menu and an HTML element or macro from the To: pop-up menu.

    Tip: You can click in the document to select a format to adjust. The HTML Setup dialog box immediately shows the current mapping for the format you click.
  4. Choose from the following options:

    • If you are mapping paragraph formats and want to include the paragraph autonumber in the converted text, click Include Autonumber. (You do not have to include an autonumber for items in a list.)

    • If you are mapping to Heading (AutoLevel) and want to start a new Web page whenever this format is found, click Start New, Linked Web Page.

      Use this option to break up a long FrameMaker document into several HTML files, each linked to a single file. Whenever the specified format is found, FrameMaker leaves the heading in the original file (the parent file) and makes it a link to a subdocument whose content starts at the heading format and continues until the next instance of the format. For information on using this setting to simulate a table of contents, see Create links that simulate a TOC.

    • If you are mapping to the List Item element for either a bulleted or numbered list, and want to specify how many levels deep the item is (which usually translates as how much the item should be indented), enter a Nest List at Depth value.

  5. Click Change to accept the mapping.

  6. Repeat steps 2 through 5 as needed.

  7. When you finish specifying mappings, close the dialog box and save the document as HTML.

If you want to edit the mapping tables on the HTML reference page, be sure to close the HTML Setup dialog box first. Keeping the dialog box open results in an error when you try to edit the tables on that page.

Autolevel mappings for headings

HTML supports six levels of headings. You can convert any FrameMaker paragraph format to a heading by mapping it to Heading (Autolevel). With this special mapping, headings in the document are mapped to H1, H2, and so on, according to their relative levels and based on the highest-level mapping in that file. The advantage of this method is that if the document is broken into separate HTML files, each will always have an H1 mapping and an appropriate hierarchy of headings under that H1.

For example, suppose your document uses Title1, Title2, and Title3 formats. When you convert to HTML, you might want to break up the document into two files, and the second file might contain only instances of Title2 and Title3. The autolevel feature ensures that Title2 maps to H2 in the first file but maps to H1 in the second file.

For more information on how the autolevel headings work, when you choose to split a document into separate HTML files, see Use the Headings reference page.

If you want to fine-tune the autolevel mechanism or override the autolevel function and make mappings to specific heading levels, you must edit special tables on reference pages of the FrameMaker document. For more information, see Edit the HTML Mapping table.

Mappings for lists

FrameMaker automatically maps bulleted lists to HTML unordered lists and numbered lists to HTML ordered lists. If you want to override the automatic mapping, you must edit a table on the HTML reference page of the FrameMaker document. (See Edit the HTML Mapping table.)

In the HTML Setup dialog box, you can define the level of a list by specifying a value for Nest List at Depth. Typically, a browser displays different levels with different amounts of indentation.

You can include a FrameMaker autonumber in the converted text by choosing Include Autonumber. However, most browsers provide their own bullet characters and numbers with lists, so you are unlikely to use this option when converting lists.

The following table shows paragraph-based HTML elements.

Mapping name in the HTML Setup dialog box

Equivalent HTML element

Recommended use and typical appearance in a Web browser

Heading (AutoLevel)

H1, H2, H3, H4, H5, H6

Six levels of headings, with H1 the largest and most prominent

Paragraph

P

Normal body paragraphs

Preformatted Text

PRE

Text that closely matches the original’s line breaks and spacing; usually achieved by using multiple spaces and a fixed-width font

Address

ADDRESS

Text set off from the rest denoting an e-mail address or the like; usually indented or italicized

Block Quote

BLOCKQUOTE, BQ

A quotation set off by indenting

List Item

LI

Item preceded by a bullet character when it is part of an unordered list (UL), or by a sequential number when it is part of an ordered list (OL)

List Item (Continued)

P

Body paragraph within a list (not preceded by a bullet or number)

Data Term

DT

Item (such as a term in a glossary) that is to be defined by a DD element

Data Definition

DD

Definition of a term (a DT), such as in a glossary item

Data Definition (Continued)

P

Body paragraph within a data definition

Throw Away

None

Discarded during conversion to HTML

The following table shows character-based HTML elements.

Mapping name in the HTML Setup dialog box

Equivalent HTML element

Recommended use and typical appearance in a Web browser

Citation

CITE

A citation, usually displayed in italics or underlined

Code

CODE

Computer-program code, usually displayed in a fixed-width font such as Courier

Definition

DFN

Definition of a term, usually displayed in italics

Emphasis

EM

Emphasized text, usually displayed in italics or underlined

Keyboard

KBD

Text that a user types, usually displayed in a fixed-width font such as Courier

Sample

SAMP

Text that appears in a fixed-width font such as Courier

Short Quotation (Intl)

Q

Quotation of less than a full paragraph, usually displayed in quotation marks (may not be recognized by all browsers)

Span (CSS)

SPAN

Text that is displayed as specified in an HTML style sheet (by browsers that recognize style sheets) or without special formatting (by other browsers). For use when no other mapping is appropriate for example, for a drop cap.

Strong

STRONG

Emphasized text, displayed in bold

Typewriter

TT

Text in a fixed-width font such as Courier

Variable

VAR

A special term or, in programming contexts, the name of a variable, displayed in italics or bold italics

Plain Text

None

Text that cancels any previous character mapping, displayed as appropriate for the paragraph mapping

Throw Away

None

Discarded during conversion to HTML

Mappings for cross-reference formats

A typical cross-reference in a printed document such as “See Syntax on page 8 for more information” loses its meaning in HTML documents, which do not use page numbers. For this reason, cross-references are mapped by default to a predefined cross-reference conversion macro called See Also. The See Also macro changes the cross-reference so that it refers to the text of the paragraph but not to the page number (for example, “See Syntax for more information”). The cross-reference text in the original document becomes an HTML link in the converted document regardless of what format is used.

You can modify the See Also macro, or you can create your own macros and then map cross-reference formats to them.

When you first map a cross-reference, the See Also macro is the only macro in the To pop-up menu in the HTML Setup dialog box. If you create other conversion macros, they will appear in this menu as well. For information on how to create and edit cross-reference macros, see Use HTML conversion macros.

Two other choices in the To: pop-up menu let you map a cross-reference in other ways:

  • Choose Original Cross-Reference Format to leave the text of the cross-reference unchanged.

  • Choose Throw Away to delete the text of the cross-reference.

Fine-tuning mappings by editing reference pages

You can fine-tune the HTML conversion by editing tables on two special FrameMaker reference pages: the Headings page and the HTML page. If you are converting a book, the reference pages are BookHeadings and BookHTML. (See Convert books to HTML files.) For general information on reference pages, see Reference pages.

Note: Do not edit the information on the HTML reference page unless you are familiar with HTML coding. Most users will not need to edit the tables on this page.

The reference-page tables are set up automatically the first time you save as HTML or the first time you choose File > Utilities > HTML Setup. The Headings reference page contains one table, the Headings table. The HTML reference page contains the following tables:

If the tables are large, the HTML reference page will continue on for as many pages as needed.

Use the Headings reference page

The Headings table on the Headings reference page identifies which tags should be used for headings and what their hierarchy is.

The Headings Table sets up the relative hierarchy of the headings.
Setting up the hierarchy of the headings in the Headings table on the Headings reference page.

Using this table, you can modify the mappings for headings and the relative levels of those headings.

To Help you identify heading formats, text appears in the same font and point size as the headings do on the body pages of the document.

Edit the Headings table

  1. Choose View > Reference Pages and display the Headings page. The Headings page will not exist until you save the document as HTML, or choose File > Utilities > HTML Setup.

  2. Edit the table by doing the following:

    • To map a different paragraph format to a heading level, change the paragraph tag in the second column but do not change the heading level number. For example, if a Tip format is mapped to a level-6 heading but you want the Warning format to be mapped at that level instead, just change Tip to Warning in the second column.

    • To change the relative levels of headings, change the numbers in the Heading Level column. For example, to promote the Warning format to a higher heading level, change the 6 to a 5 in the Heading Level column. (You do not have to change the order of the rows when you do this, but you might want to so that the table is easier to read.)

    • To map several formats to a single level of heading, use the same number in the Heading Level column. For example, the Note and Warning formats are both level-6 headings in the following Headings table.

      Heading Level

      Paragraph Format

      Comment

      6

      Note

      6

      Warning

    • To add a format to the Headings table, press Control+Return to add a row and then fill in the Heading Level and Paragraph Format columns.

  3. If you removed or added formats in the Headings table, change their mappings in the HTML Mapping table as well. For example, you might change the entry of a SubHead format from H* to P in the HTML Mapping table. For more information on editing this table, see the next section.

Edit the HTML Mapping table

The HTML Mapping table on the HTML reference page contains the mappings you assign using the HTML Setup dialog box. (Mappings for headings appear here too, as well as in the Headings table.) You usually do not need to edit this table directly, but you might want to edit it in the following situations:

  • To bypass the autolevel mapping of headings and instead map a format explicitly to a heading level such as H1 or H2. (See Autolevel mappings for headings.)

  • To change many mappings quickly or globally by using Edit > Find/Change.

  • To change a bulleted list to a numbered list, or the reverse.

  • To use an HTML element that is not available through the HTML Setup dialog box.

  • To document the mappings in the Comments column of the table.

The first column of the Mapping table contains a FrameMaker source item prefixed with a letter that indicates the type of item: P for paragraph format, C for character format, or X for cross-reference format. The second column can contain the name of an HTML element or an HTML conversion macro name.

The HTML Mapping table on the HTML reference page
Using the HTML Mapping table on the HTML reference page

For information on defining macros, see Use HTML conversion macros.

Edit a mapping using the HTML Mapping table

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

  2. Locate the Mapping table on that page, and find the format whose mapping you want to change.

  3. Make the following changes as needed:

    • In the Element column, enter the name of the HTML element or conversion macro that the format is to be mapped to. If you are not sure of the correct HTML element name, see the tables in Mappings for lists. Enter H* to map to an autolevel heading.

    • In the New Web Page column, enter Y for Yes to create a separate HTML document whenever this format is found. Otherwise, enter N for No.

    • In the Include Auto# column, enter Y or Yes to include the full autonumber text of this format in the conversion. Otherwise, enter N or No.

    • In the Comments column, enter any text to document the purpose of the mapping, special cases, and so on. You can leave this column blank.

    An edited row might look like this.

    FrameMaker Source Item

    HTML Element

    New Web Page?

    Include Auto#?

    Comments

    P:Fnote

    FOOTNOTE

    N

    N

    Will not work in all browsers

Convert special characters

The FrameMaker character set and the character set used by HTML and the Web are not identical. Because of this, some characters are mapped to substitutions when converted to HTML. Some mappings are internal and rely on special HTML codes called entities. (For example, curved quotation marks are changed to the entity for straight ones.) Other substitutions are defined in the Character Macros table. For example, an em dash is defined as two hyphens. If no mapping exists, the character is ignored.

The following characters either have special predefined mappings or are treated specially.

Character

Default mapping

Where defined

… (ellipsis)

... (three periods)

Character Macros table

— (em dash)

-- (two hyphens)

Character Macros table

– (en dash)

- (one hyphen)

Character Macros table

¢ (cent)

&#162; (HTML character reference)

Character Macros table

© (copyright)

&#169; (HTML character reference)

Character Macros table

® (registered)

&#174; (HTML character reference)

Character Macros table

° (degree symbol)

&#176; (HTML character reference)

Character Macros table

< and > (angle brackets)

&lt; and &gt; (HTML entities)

Internal

"

&quot; (HTML entity for ")

Internal

& (ampersand)

&amp; (HTML entity)

Internal

You can add or change mappings for characters by adding or editing entries in the Character Macros table. As the previous table illustrates, you can map characters to text or to HTML character and entity references (which begin with an ampersand and end with a semicolon).

  1. Choose View > Reference Pages and display the Character Macros table on the HTML page.

  2. Edit a mapping, or create a new row (by pressing Control+Return) and enter a new mapping.

If you are unsure how to type a special character in the first column, look up its keystroke.

For example, to set up mappings for the dagger character, the trademark symbol, and the ae ligature, you could add the following rows.

Character

Replace With

Comments

*

Dagger symbol

(tm)

Trademark symbol

æ

&aelig;

ae maps to the HTML entity reference for that symbol

Save a document in HTML format

Know how to save a document in HTML format in FrameMaker

To convert a FrameMaker document to HTML, simply save it as an HTML file. Saving as HTML sets up definitions for how each FrameMaker format will convert, or map, to an HTML element. You can also save a whole book as HTML. (See Convert books to HTML files.)

FrameMaker automatically creates the mappings of formats to HTML elements upon initial conversion to HTML, but you can fine-tune them, and make further customizations, by creating conversion macros. For information, see Set up and adjust HTML mappings and Fine-tuning mappings by editing reference pages.

Even if you plan to fine-tune the conversion, you should begin by saving as HTML. You can then fine-tune the automatic mappings as needed.

  1. Choose File > Save As and choose HTML from the pop-up menu.

  2. Give the filename an extension of .html, specify the file location, and click Save. The converted file is saved where you specified.

  3. Open the HTML file in a Web browser to examine the converted file. If it meets with your approval, you are done.

To refine some mappings, continue by following the steps in Set up and adjust HTML mappings.

Use HTML conversion macros

Learn how to use HTML conversion macros in FrameMaker

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 pop-up menu 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 and display the HTML page.

  2. Edit a macro in a table, or create a row (by pressing Control+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 formats 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

Customize titles

The title of an HTML document appears in the window’s title bar. When you add a bookmark to that page, it also appears in the bookmark list. Initially, the <$defaulttitle> building block is used for the title, which uses the first heading in an HTML file as the title for that file. Usually, the default titles are satisfactory. However, you can specify a different title by editing macro tables on the HTML reference page.

System macros and general macros can define two sets of replacement text: one that appears in the body of the code and one that is inserted in the head area.

You can modify the default title, or you can remove the default title and set up your own titles.

Modify the default titles

  1. Choose View > Reference Pages and display the HTML reference page.

  2. In the HTML System Macros table, locate the four system macros that set up the default titles. Initially, they use the <$defaulttitle> building block to assign the first heading in the file as the title. You can change any or all of them.

    Macro Name

    Replace With

    Head

    Comments

    StartOfDoc

     

    <title><$defaulttitle></title>

     
  3. Change the default macro for Head. For example, the following macro changes the text of the title to static text.

    Macro Name

    Replace With

    Head

    Comments

    StartOfDoc

     

    <title>My Book</title>

     

Set up your own titles

  1. Choose View > Reference Pages and display the HTML reference page.

  2. Remove the four default title replacement texts from the HTML System Macros table.

  3. In the HTML General Macros table, define a macro that uses the <TITLE> HTML element in the third column, the Replace With (in HEAD) column. For example, the following macro uses a paragraph autonumber and text for the title, and also as paragraph text in the document.

    Macro Name

    Replace With

    Head

    Comments

    MyTitle

    <p><$paranum><$paratext></p>

    <title><$paranum><$paratext>

    </title>

     
  4. Map the macro to the format that you are splitting the HTML document on.

Insert HTML code

Learn to insert HTML code to convert document to HTML in FrameMaker.

You may want to insert special HTML code into your document (for example, the code that defines a Java applet).

  1. Choose View > Reference Pages and display the HTML reference page.

  2. In the HTML General Macros table, define a macro whose content is the HTML code.

  3. Choose View > Body Pages and place the insertion point where you want to insert the HTML code.

  4. Choose Insert > Marker and choose HTML Macro as the marker type.

  5. Enter the name of the general macro as the marker text and click New Marker.

For example, you could enter the following Java code as a macro definition.

Macro Name

Replace With

MyCode

<applet code="Bullets.class" width="600" height="6" codebase="classes/bullets/">
   <param name="bgColor" value="White">
</applet>

Where you want to insert this applet, you insert a marker whose marker type is HTML Macro and whose marker text is MyCode.

Convert books to HTML files

Learn how to convert books to HTML files in FrameMaker.

You follow the same basic procedure to save a book in HTML format that you use to save a single document. When FrameMaker maps the files in the book, it stores the mappings on reference pages added to the first file in the book. You can edit the tables on the reference pages in the same way you edit the tables on reference pages of individual documents.

The files in a book may not remain separate files when the book is saved as HTML. To break up a book file into separate HTML files, use the Start New, Linked Web Page option.

  1. Open the book file and choose File > Save Book As.

  2. Choose HTML from the pop-up menu.

  3. Give the filename an extension of .html and click Save. The converted files of the book are saved where you specified.

  4. Examine the converted files by opening them in a web browser. If they meet with your approval, you are done.

  5. To refine some mappings, open the first file in the book file and display its BookHeadings or BookHTML reference page. Edit the tables there. Then save the file and save the book file as HTML again.

Tip: If you fine-tuned the mappings for a document and want to use these mappings for a whole book, remove the tables on the BookHeadings and BookHTML reference pages in the book file’s first file. Then copy the tables on the document’s Headings and HTML reference pages and paste them onto the BookHeadings and BookHTML reference pages.

Troubleshooting and tips on HTML conversion

Learn how to troubleshoot HTML conversion, tips on HTML conversion in FrameMaker.

Follow these guidelines to ensure a smooth conversion to HTML:

Saving structured documents as HTML

Learn how to save and publish structured documents as HTML in FrameMaker.

The procedures for saving structured documents as HTML are the same as for unstructured documents, with the exception of mappings. In structured documents, all mappings are based on elements and attributes, rather than character, paragraph, and cross-reference formats. Structured FrameMaker elements map to HTML elements to define formats for containers. Structured FrameMaker attributes map to HTML attributes to define cross-references, cascading style sheets, languages, and alt-text for images.

Publishing options for online output formats

In addition to saving FrameMaker documents as HTML from FrameMaker, you can use any of the enterprise-class publishing options provided by Adobe.

  • Use RoboHelp to publish FrameMaker content into various formats in addition to the ones supported by FrameMaker’s multichannel publishing. Such formats include EclipseHelp, Oracle Help, Adobe AIR-based Help among various other formats supported in RoboHelp. In this approach, you define the style mapping and other conversion settings, and import the FrameMaker content into a RoboHelp project. Later, you can publish the required online output formats using RoboHelp features. See Adobe RoboHelp Help.

  • Use the Adobe FrameMaker Publishing Server and Adobe RoboHelp Server for enterprise-level, automated publishing into multi-channel, multi-device output formats.


April 29, 2020

Legal Notices | Online Privacy Policy