18.7.3.3 Supplying properties for extracted graphics
You can use predefined macro variable <$$_extrgraphid> to access properties you have assigned to individual graphics in the configuration file.
For example, suppose you are using JavaScript in extract replacement code to specify characteristics of the secondary window in which each extracted graphic will appear. And suppose you want each window to be the same size as the graphic. You could place code like the following in an ExtrReplace marker for each individual extract, with the dimensions for that particular graphic:
<p class="fig"><a href="javascript:location='<$$_currfile>';
window.open('<$$_extrfile>','height=387,width=550')">
Or, you could specify the dimensions of any extractable graphics in the project configuration file: (see §23.9.2 Adjusting image size for selected graphics):
; Graphic file name = number of pixels wide, 0 to omit width attribute
; Graphic file name = number of pixels high, 0 to omit height
Then you could access the dimensions with a list variable (see §28.4 Using multiple-value list variables) in the replacement code. For example, you could replace the JavaScript height and width clause with the following code, where $$graphhigh and $$graphwide are list variables:
'height=<$$graphhigh[$$_extrgraphid]>,
width=<$$graphwide[$$_extrgraphid]>'
You could define macros to supply default values for graphics not listed in the configuration sections that your list variables access. For example:
<$$ht = ($$graphhigh[$$_extrgraphid])>
<$_if ($$ht==0)><$$ht=387><$_endif><$$ht>
> 18 Splitting and extracting files > 18.7 Customizing and replacing extracts > 18.7.3 Replacing extracts with links in the parent file > 18.7.3.3 Supplying properties for extracted graphics