O'Reilly logo

DITA for Print by Leigh W. White

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Change the default alignment for all images

Determine how all images are aligned (left, right, or center) by default.

By default, the PDF plugin aligns block images (that is, images with placement="break") with the left margin of the preceding text, like this:

../images/image_alignment.png
Figure 31. Left-aligned images

You can set the align attribute to right or center on a per-image basis. But what if you want all your block images to be aligned the same way? You don’t want to have to set align for every single image. Instead, you can change the default alignment.

  1. Open commons.xsl and find this section:
    <xsl:template match="*" mode="placeImage"> <xsl:param name="imageAlign"/> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required