### 6.8 Specifying options for figures

You can specify options that affect title placement, use of anchors, some aspects of alignment, and numbering of figures.

Title placement

By default, DITA2Go puts figure titles below images on output, but puts the IDs for figure titles above the images, so that links to an image in HTML show the whole image and the title, not just the title.

To keep the figure title above the image:

    [FigureOptions]
    ; FigTitleAboveImage = No (default, links moved so browsers show the
    ; figure, not just the title), or Yes (DITA style, title above image)
    FigTitleAboveImage = Yes

If you use a fig element to hold a simpletable (so the simpletable can have a title; see §14.6 Treating figure titles as table titles), by default DITA2Go puts the title above the table on output, which generally looks better.

To keep the figure title below the table:

    [FigureOptions]
    ; FigTitleAboveTable = Yes (default, figure titles look better above
    ; a table) or No (normal figure style, title below table)
    FigTitleAboveTable = No

Anchor

Some output types might require figures to be anchored in paragraphs.

To specify a format for figure-anchor paragraphs:

    [FigureOptions]
    ; UseFigureAnchor = Yes (default, use anchor para) or No (for special
    ; cases, will break many normal use cases)
    UseFigureAnchor = Yes
    ; FigureAnchorFormat = name of format to use for figure anchor para
    ; when TitleAboveImage = No
    FigureAnchorFormat = FigurePara

Anchor paragraphs in table cells should contain at least one character in addition to the image, even if the character is just a nonbreaking space, to keep the image inline.

Alignment

To specify alignment on output for any image with attribute @placement="break":

    [FigureOptions]
    ; GraphicAlignment = image alignment when placement="break": left,
    ; right, or center, default left
    GraphicAlignment = left

Note: DITA2Go ignores all special <fig> attributes except for @placement, @width, @height, and @alt.

Numbering

To specify numbering and a label for figure titles, see §8.5.3 Defining number format components.

Previous Topic: 6.7 Specifying formats for footnotes

Next Topic: 6.9 Specifying formats and options for tables

Parent Topic: 6. Mapping elements to output formats

Sibling Topics:

6.1 Understanding how to assign formats

6.2 Specifying options for naming formats

6.3 Mapping outputclass attribute values to formats

6.4 Mapping element paths to output formats

6.5 Mapping element attributes to output formats

6.6 Specifying formats for cross references

6.7 Specifying formats for footnotes

6.9 Specifying formats and options for tables

6.10 Specifying options for special lists

6.11 Specifying options for draft comments

6.12 Specifying options for maps

6.13 Deciding where to display title and shortdesc

Table of Contents • Index