23.5.2 Replacing or surrounding a graphic with macro code
You can specify code to be included before, after, or in place of any graphic, or group of graphics, by assigning a macro or HTML code to one or more graphic IDs. For example:
; Graphic ID = text of macro to put before graphic
; Graphic ID = text of macro to put after graphic
; Graphic ID = text of macro to put instead of graphic
When you specify a macro or other HTML code to replace a graphic, Mif2Go ignores any preceding or following code or macro you assign to that same graphic in one of the other [Graph*Macros] sections.
To avoid having graphics wrapped in paragraph tags when you use [GraphReplaceMacros], see §23.5.6 Omitting paragraph tags around graphics.
If the macro should apply to all but a few images, you can list the images to exclude by assigning nothing to their IDs; list the exceptions first. For example:
See §23.5.1.1 Using wildcards to assign properties to graphics.
Use predefined macro variables
The macro definition (or HTML code) can include the following predefined macro variables, which reference the graphics to which the code or macro is assigned:
If you assign code instead of a macro name, the code must be all on the same line.
Replace graphics with thumbnails
To show each graphic in a smaller size (a “thumbnail”), for example, you could specify something like the following (see §4.6 Using wildcards in configuration settings):
<a href="<$$_graphsrc>"><img src="<$$_graphsrc>" width="25%" /></a>
For a way to provide thumbnails in the form of links to the graphics they replace, see §18.7.3.2 Using thumbnails for links to illustrations in HTML.
View full-size graphics on demand
If you import high-resolution bitmap images into your document by reference, and in FrameMaker you scale them down to fit the page, the scaled-down images might not show clearly in HTML. You can make these images clickable in HTML, so the graphic can be viewed full size. For example:
<a href="<$$_graphsrc>" target="_blank"><img src="<$$_graphsrc>"
width="<$$_graphorigwide>" height="<$$_graphorighigh>" /></a>
> 23 Including graphics in HTML > 23.5 Selecting and modifying graphics > 23.5.2 Replacing or surrounding a graphic with macro code