Add hypertext commands in FrameMaker, define active hyperlink area in FrameMaker.
A hypertext command in a FrameMaker document, defines an active area in a document. If a user clicks on the active area in a view-only FrameMaker document or an output such as PDF or HTML, the associated hypertext command is executed.
You can create a hypertext command in a document to provide inter-activity to the reader. See Add hypertext commands to documents.
You can use hypertext commands to perform tasks such as opening a web page, displaying an alert, go to a specific pages (first, last, page number) in the current document, open and close external applications. See Available hypertext commands.
You can then save your document as view-only, PDF or publish the document using the FrameMaker multi-channel publishing solution.
You can use hypertext commands in images added to a FrameMaker to Create an image map that defines multiple clickable areas in a single image.
Add hypertext commands in FrameMaker, learn to define active area, define an image active area, Insert hypertext command marker in FrameMaker.
To add hypertext commands to a document, you need to first Define an active area in a document and then Associate a hypertext command with an active area.
You can associate hypertext commands to text or images in a document. When a user clicks on the active area, the area is highlighted after which the command is executed.
You can define a word, phrase, paragraph, or multiple adjacent words as active areas. To identify a text active area, FrameMaker uses the character format of the text. This implies that the character format of the text active area must be different from that of the surrounding text. If the character format is the same as the surrounding text, the entire text in the paragraph is set as active.
Select the word or phrase.
You need to change the character format of the selected word or phrase.
In the Format menu, go to the Characters sub-menu.
In the Characters sub-menu, you can choose from the list of default character formats available in the current document catalog.
Alternatively, open the Character Designer catalog and apply a custom character format.
Ensure that the same character format is applied to the entire paragraph.
You can assign different hypertext commands to adjacent words or phrases in a paragraph by applying by different or the same character format to the words or phrases. However, you need to ensure that the character formats of the words or phrases are not the same as that of the surrounding paragraph text. After this you can associate a hypertext command with each of the adjacent words or phrases. For details, see Insert hypertext command marker.
You can define an active area on an image in a document. When a user clicks the image, the associated hypertext command is executed.
Draw a text frame to cover the image in the document.
Make sure that the graphic is not set to have text run around it.
To place a text frame over the image:
Open the Graphics toolbar ( ).
Click Text Frame in the Graphics toolbar and draw the text frame to cover the image.
Set the text frame fill and pen patterns to None.
To set the text frame properties:
Right-click the text frame and choose Object Properties.
In the Anchored Frame Properties dialog:
Go to the Stroke tab and uncheck the Pen Pattern option.
Go to the Fill tab and uncheck the Pattern option.
Ensure that the text frame is placed above the image.
If you place the image after placing the text frame, choose
to place the text frame in front of the graphic.If you create an active area on the master page of a document, the area will be active on all pages of the document. For example, you can add text to the document header and create an active area in the text in the header.
After you Define an active area in a document, you need to associate a hypertext command to the area. When a reader clicks the active area in your document, the hypertext command is executed.
View-only FrameMaker documents support all FrameMaker hypertext commands, PDF and HTML outputs of hypertext documents, have limited support. For details, see PDF and HTML: Hypertext command support.
Place the insertion point in the active area.
At the start of the word or phrase.
At the start of the paragraph.
At the start of each separate word of phase.
In the enclosing text frame. See Define an image active area.
Open the Hypertext dialog.
.Use the Hypertext dialog to:
If you are adding a hypertext command in a structured document, select the required hypertext element tag.
Select the hypertext command to execute when a user click the active area to which the current hypertext command is associated.
See the current set of Available hypertext commands.
Enter the command parameters.
Hypertext commands must always appear in lowercase. The parameters can be uppercase or lowercase, but they are case-sensitive. The entire command can be up to 255 characters long. (Each character in a Japanese font counts as two characters.)
See the current set of Available hypertext commands.
FrameMaker will validate the syntax as soon as you insert the command in the document.
Make the current document view-only.
You can also use this option to text the hypertext commands that you insert in a document.
Click New Hypertext Marker.
A hypertext marker is inserted in the document.
Learn to edit and delete hypertext commands in FrameMaker.
Open the Hypertext dialog and use the Find / Change dialog to find the hypertext command to edit.
In the Find drop-down list, choose Any Marker.
The marker will be displayed in the Hypertext dialog.
Change the required options for the command and click Edit Hypertext Marker.
Open the Hypertext dialog and use the Find/Change dialog to find the hypertext command to edit.
In the Find drop-down list, choose Any Marker.
The marker will be displayed in the Hypertext dialog.
Press the Delete key to delete the marker.
Know the available hypertext commands in FrameMaker.
The sections covers the available hypertext commands to:
You can display alert messages on the click on an active area by using the Alert and Alert With Title commands.
Displays an alert message.
alert message
alert Hello world
To display a custom title with the alert message:
Open a reference page for the current document (
).Place a text frame on the reference page and enter the custom title in the text frame.
Right-click on the text frame and choose Object Properties to display the Text Frame Properties dialog.
Go to the Text Frame tab and set the AlertTitle
.
Displays an alert message with a user-defined title.
alerttitle title:message
alerttitle Message to the World:Hello world
You can navigate to a specific destination in the current or another FrameMaker document. To do this, you need use the Specify Named Destination command. You then point to this destination when you create any of the following commands:
Specify a named destination location.
newlink linkname
newlink available_hypertext_commands
Pointer to the named destination defined by the Specify Named Destination. You can point to a named destination in the current or another FrameMaker document.
gotolink filename:linkname
gotolink available_hypertext_commands
gotolink hypertextcommands.fm:available_hypertext_commands
Pointer to the named destination defined by the Specify Named Destination. You can point to a named destination in the current or another FrameMaker document. The window is then resized to fit the destination document page.
gotolinkfitwin filename:linkname
gotolinkfitwin available_hypertext_commands
gotolinkfitwin hypertextcommands.fm:available_hypertext_commands
Point to the named destination defined by the Specify Named Destination. If the destination is a different document, it opens in a new window.
openlink file_name:linkname
openlink available_hypertext_commands
openlink hypertextcommands.fm:available_hypertext_commands
Point to the named destination defined by the Specify Named Destination. If the destination is a different document, it opens in a new window. The new window is then resized to fit the document page displayed.
openlink file_name:linkname
openlink available_hypertext_commands
openlink hypertextcommands.fm:available_hypertext_commands
You can navigate to a specific page in the current or another FrameMaker document.
Point to the first or last page of the current or a different document. The page is displayed in the active window.
gotolink filename:firstpage
gotolink
filename:lastpage
gotolink firstpage
gotolink hypertextcommands.fm:lastpage
Point to a specific page in the current or a different document. The page is displayed in the active window.
gotopage filename:pagenumber
gotopage 7
gotopage hypertextcommands.fm:7
MyDoc.fm:vii
.Point to the previous or next page of the current document. The page is displayed in the active window.
previouspage
nextpage
previouspage
nextpage
You can place hypertext commands on pages that a reader can click to go back to the page from which the reader reached the current page. This behavior is similar to the back button functionality on your web browser. For example, if you have create an active text area on a page to navigate the user to another page on the document. On the destination page, you can place a Jump Back or Jump Back & Fit to Page hypertext commands.
Navigate back to the previous page. The page is displayed in the active window.
previouslink filename:linkname
previouslink available_hypertext_commands
previouslink hypertextcommands.fm:available_hypertext_commands
Navigate back to the previous page. The page is displayed in the active window. The new window is then resized to fit the document page displayed.
previouslinkfitwin filename:linkname
previouslinkfitwin available_hypertext_commands
previouslinkfitwin hypertextcommands.fm:available_hypertext_commands
You can open documents as new FrameMaker documents (Open Document As New), open the document on the first or last page(Open Document At First/Last Page), or open a document on a specific page number (Open Document At Page Number).
Opens a document (defined in the file name argument) as a new, unnamed document. The document displays in a new window, leaving the active window open.
opennew filename
opennew hypertextcommands.fm
Opens a document at the first or last page of the document. The page appears in a new window (leaving the active window open) only if the page is in a different document.
openlink filename:firstpage
openlink
filename:lastpage
openlink hypertextcommands.fm:firstpage
Opens a document at a specific page. The page appears in a new window (leaving the active window open) only if the page is in a different document.
openpage filename:pagenumber
openpage hypertextcommands.fm:7
Defines a contiguous set of clickable areas in an image and associates one hypertext command with each area.
For example, you can take a screen capture of a toolbar in an application and then assign one hypertext command to each button on the toolbar. The hypertext command then navigates the reader to the corresponding help for the associated button on the toolbar image.
matrix rows columns ReferencePageFlowName
matrix 1 3 button_matrix_flow
Number of rows of buttons
Number of buttons in a row
Text frame created on the document reference page that defined the hypertext command for each button in the matrix.
Define a button matrix to the map the three icons in the following image to three corresponding hypertext commands:
Go to the reference page for the current document (
).Define a text frame on the reference page and set the value
of the flow tag to button_matrix
.
The flow tag value is used to map the image text frame (Step 1) to the text frame on the reference page.
Open the Text Frame Properties dialog.
Right-click on the text frame and choose Object Properties.
Go to the Text Frame tag and enter button_matrix in the Tag field.
In the text frame, enter the hypertext command for each button matrix.
For example, you can use the Jump To Named Destination command to navigate the reader to a named destination when the user clicks on a button in the matrix.
gotolink first_button_help
gotolink second_button_help
gotolink third_button_help
Add the above image to a FrameMaker document and Define an image active area.
In the text frame, add the following button matrix hypertext command:
matrix 1 3 button_matrix
The
image contains one row of icons and three columns. Also, the text
frame flow tag, on the reference page, is defined as button_matrix
(Step
2).
The hypertext command defined on each line in the reference page text frame (Step 3) corresponds to the command to be executed for each button on the image (Step 4).
This means that for
the following button matrix hypertext command, the reference page
text frame (button_matrix_flow
) must contain hypertext
commands on six lines:
matrix 2 3 button_matrix_flow
You need to Specify Named Destination
To test the button matrix, click Make View-Only in the Hypertext dialog.
If you plan to create PDF or HTML output for FrameMaker document containing a button matrix, ensure PDF and HTML: Hypertext command support.
Launches browser and displays the specified web page.
message URL url
message URL http://www.adobe.com
You can use the hypertext command to open external applications and files.
message system application name or path, window state
To open Microsoft Word in the maximized window state:
message
system winword, SW_MAXIMIZE
To open Microsoft Word in the minimized window state:
message
system winword, SW_MINIMIZE
To open a specific PDF document, specify the complete path to the document:
message system c:/hypertextdocuments.pdf
The PDF opens in the default application.
To specify the application to open the file:
message system acrobat c:/hypertextdocuments.pdf
The above examples specify the application name. You can also specify the complete path to the application .exe file. For example, if you have multiple versions of an application installed, usually the latest version is the default. You can open a previous version by specifying the complete path to the .exe for the version.
To open an application by specifying the complete path to the application .exe file:
message
system "C:\Program Files\Adobe\Adobe FrameMaker 2019\FrameMaker.exe"
The following table lists the available window state options:
State |
Definition |
---|---|
SW_HIDE |
Hides the window and activates another window |
SW_MAXIMIZE |
Maximizes the specified window |
SW_MINIMIZE |
Minimizes the specified window and activates the next window in the Alt+Tab order |
SW_RESTORE |
Activates and displays the window (If the window is minimized or maximized, Windows restores it to its original size and position.) |
SW_SHOW |
Activates the window and displays it in its current size and position |
SW_SHOWDEFAULT |
Sets the show state based on the SW_ flag specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application |
SW_SHOWMAXIMIZED |
Activates the window and displays it as a maximized window |
SW_SHOWMINIMIZED |
Activates the window and displays it as a minimized window |
SW_SHOWMINNOACTIVE |
Displays the window as a minimized window (The active window remains active.) |
SW_SHOWNA |
Displays the window in its current state (The active window remains active.) |
SW_SHOWNOACTIVATE |
Displays a window in its most recent size and position (The active window remains active.) |
SW_SHOWNORMAL |
Activates and displays a window (If the window is minimized or maximized, Windows restores it to its original size and position.) |
If you omit the windowstate value, the window state is set to SW_SHOWNORMAL. For more information on window states, see the documentation for the Windows software development kit.
You can use hypertext commands to close the current document (Close Current Document) and close all open view-only document (Close All Hypertext Windows). You can also create a hypertext command to exit FrameMaker (Exit FrameMaker).
Close the current active FrameMaker document.
quit
Close all open view-only FrameMaker documents.
quit
all
Exit the current instance of FrameMaker.
exit
Know the hypertext command support in FrameMaker.
View-only FrameMaker documents support all hypertext commands.
PDF and HTML outputs of hypertext documents, have limited support.
The following table describes the PDF and HTML support:
Command |
HTML |
|
---|---|---|
Alert, Alert with Title |
Appears as a note, with no title |
NO |
Jump to Named Destination |
YES |
YES |
Jump to Named Destination & Fit to Page |
Works as described, but doesn’t fit to page |
Works as described, but doesn’t fit to page |
Jump to First Page, Jump to Last Page, Jump to Page Number, Jump to Previous Page, Jump to Next Page |
YES |
NO |
Jump Back, Jump Back & Fit to Page |
NO |
NO |
Open Document |
YES |
YES |
Open Document & Fit to Page, Open Document as New, Open Document at First Page, Open Document at Last Page, Open Document at Page Number |
Works as described, but doesn’t fit to page or open a separate window |
Works as described, but doesn’t fit to page or open a separate window |
Pop-up menu |
NO |
NO |
Button Matrix |
NO |
Works as described, if the text frame containing the command is in an anchored frame in the main text flow |
Message URL |
Works when PDF is opened in browser; however, the link sometimes does not work in Acrobat |
YES |
Message Client |
NO |
NO |
Close current window, Close All Hypertext Windows, Exit Application |
NO |
NO |
Understand how to use the hypertext commands to create different clickable regions in a single image through image map in FrameMaker.
You can use the hypertext commands to create different clickable regions in a single image. In the following procedure, create three clickable regions around the rectangles in the following flowchart:
Define an image active area for each rectangle.
Insert a Jump To Named Destination hypertext command in the text frame for each image active area.
Use the Specify Named Destination hypertext command in the three destinations for each of the three clickable regions.
To test the image map in FrameMaker, click Make View-Only.
In this example, the Named Destination hypertext command is defined in each of the clickable regions. You can use any combination of the Available hypertext commands.