32.4.1.2 Using PI markers to assign properties to graphics

You can use PI markers in your DITA document to assign a property to a single graphic or to only a few graphics, or to exclude a graphic from a general assignment. Use either of these PI marker types:

HTMConfig

Content is [GraphSection]=Value

HTML Macro

Content is any HTML code

HTMConfig for individual graphics

Insert the HTMConfig PI marker in text before the graphic, and provide as marker content the property assignment. For example, to scale a certain graphic to 75%, you could place an HTMConfig PI marker just before the <image> tag, and specify the scale factor as the PI marker content:

HTMConfig="[GraphScale]=75"

See §42.2.9.4 Overriding graphic properties for HTML.

HTML Macro for a series of graphics

You can use PI markers of type HTML Macro to change the value of a macro variable just before a graphic or series of graphics, then change it back again after the graphics. For example, you could use HTML Macro PI markers and a macro variable to scale a series of graphics to 75%.

Include in the configuration file a scale-factor setting that references a macro variable:

[GraphScale]
*=<$$scalepct>

Initialize the value of the macro variable:

[MacroVariables]
scalepct=100

In text just before the graphics to be scaled, insert an HTML Macro PI marker with content:

<$$scalepct=75>

Just after the graphics to be scaled, insert another HTML Macro PI marker with content:

<$$scalepct=100>

See §37.3 Using macro variables.

Previous Topic:  32.4.1.1 Using wildcards to assign properties to graphics

Next Topic:  32.4.1.3 Specifying an image class for a graphic

Parent Topic:  32.4.1 Assigning properties to sets of graphics

Sibling Topics:

32.4.1.1 Using wildcards to assign properties to graphics

32.4.1.3 Specifying an image class for a graphic

32.4.1.4 Creating named groups of graphics