Images are typically aligned with the text margins, but you can enable the ability for images to align with the container paragraph.
The image/@placement attribute controls the anchoring position of images. By default, when inserting an image without a fig container, the placement attribute will be set to “inline” (since this would typically be used for inline images). When inserting an image within a fig (inserting the fig typically automatically inserts the image), the placement attribute will be set to “break”. You are free to change the @placement value as needed for situations that require a different setting. When placement is set to “inline” the anchoring position ( ) is set to “At Insertion Point”, and when placement is set to “break” the anchoring position is set to “Below Current Line” (these settings cannot be changed).
When placement is “break” and align is “left”, the image will be forced to the left margin (page margin or side head margin). If you are using side heads this is typically the formatting that’s needed, but if you’re not using side heads or when you have an image in indented text (like a list), you will probably want the image to be indented to match the text block.
If you make use of the “Move Figure Title” book-build option, you will find that setting the placement of an image within a fig to “inline” will probably achieve the desired result by allowing the image to align with the containing paragraph. To automate this processing, DITA-FMx provides the “BreakToInline” parameter in the BookBuildOverrides section of the book-build INI file (ditafmx-bookbuild.ini). Setting this parameter to “1” will change all of the placement=’break’ images to placement=’inline’ that are in a paragraph whose first indent is greater than zero. This setting must be made manually in the book-build INI file, and may not work well in all situations, so it’s best to experiment a bit and test to make sure it is providing the proper results.
In order for this to work properly, the “Fixed” option of the “Line Spacing” property of the fig.anchor paragraph (or the style assigned to a figure anchor) style must be deselected. Also, the MoveFigTitles book-build INI parameter must be set to “1”. When testing this, be sure to watch the report in the console log to verify that you see the following message:
Using BookBuild Override: BreakToInline=1