In the [ExtrReplace] section you can assign HTML code, including macros, to the ExtrStart format or ExtrStart PI marker, whichever you used to designate the start of the extract. The code you assign replaces the entire extract in the parent file. For example:
[HTMLParaStyles]
Heading2=ExtrStart
[ExtrReplace]
; doc format = HTML code to use instead of extracted para
Heading2=<$YourMacroForTheReplacement>
If you need different replacements for different extracts, you could either use different starting formats, or you could use an ExtrReplace PI marker to specify replacement code for a particular extract; the marker takes precedence over anything you specify in the [ExtrReplace] section.
You can use several predefined macro variables in replacement code to reference the replaced extract file, the extract title, and the first graphic in the extract. Table 27-8 lists the variables you can use in extract replacement code. Also, predefined macro <$_extrthumb> provides a convenient way to include scaled thumbnails of graphics as replacement links; see §27.8.3.2.3 Providing scaled thumbnails.
For example, the following code uses a thumbnail graphic to link to an extract:
[HTMLParaStyles]
FigCaption=Contents ExtrStart Title
FigAnchor=ExtrFinish
[ExtrReplace]
FigCaption=<$ThumbCode>
[ThumbCode]
<p class="thumbnail"><a href="<$$_extrfile>">
<img src="<$$_extrgraph>" alt="<$$_extrtitle>" /></a></p>
See §27.8.3.2 Using thumbnails for links to illustrations in HTML.