19.3.4 Providing alternate link destinations
You can use a macro to place a copy of a paragraph ID or a cross-reference ID somewhere in the generated HTML code other than immediately before the content of the paragraph in question. Two predefined macro variables capture the values of these Mif2Go-generated IDs:
Each returns what would normally go in the <a name=...> tag:
for the ID of the first cross-reference marker in a paragraph |
is the FileID of the HTML file (provided [HTMLOptions]UseFileIDs=Yes, which is the default) |
|
For example, if the anchor Mif2Go creates from the first cross-reference marker in a paragraph looks like this:
The value of <$$_xrefid> for that paragraph would be:
Note: FrameMaker ObjectIDs can change; see §19.3.3 Linking to an arbitrary location.
See §5.3 Identifying files and objects.
Suppose you want to display something (perhaps a table, a link, or a graphic) above a mid-topic (non-split) heading, so that jumps to that heading show the preceding something at the top of the window, above the heading.
You could use [ParaStyleCodeBefore] to place HTML code just before the content of each such mid-topic heading, and include a copy of the paragraph ID (or cross-reference marker ID) in that code. This would force hypertext jumps (or cross references) to the paragraph to go to the preceding code instead of to the paragraph content. Whatever is produced by that code would then appear at the top of the window when you click a link to the paragraph.
For example, to precede a mid-topic heading with a one-cell table containing a link back to a local TOC:
SubHead=<p><a name="<$$_xrefid>"></a></p><$BackToTOC>
<table cellpadding="5" border="1" cellspacing="2">
<td><font size=-3><a href="#contents">Contents</a></font></td>
Clicking a cross-reference link to any SubHead paragraph would show a box containing a link to Contents above the SubHead paragraph.
§28.3.4 Using predefined macro variables
§28.9.3 Surrounding or replacing text with code or macros
> 19 Creating HTML links > 19.3 Specifying link destination > 19.3.4 Providing alternate link destinations