Can DITA outputs automatically generate image captions?

DITA outputs can automatically generate image captions by utilizing structured content and transformation processes. This automation simplifies the process of adding captions to images during the publishing phase, improving content consistency and accessibility.

DITA provides a structured authoring approach where content is semantically marked up, making it possible to associate captions with images. During the transformation process, tools like DITA Open Toolkit (DITA-OT) or publishing engines can be configured to automatically generate image captions based on the structured content. This is typically achieved by extracting content from designated elements, like <title> or custom elements, and placing it as captions next to images in the output. For example, if a <title> element is used to caption images within DITA topics, the transformation process can extract the text from these <title> elements and position them as captions for the corresponding images in the final document.

Example:

In a DITA-based software manual, the content has been structured with <fig> elements containing both “image” and <title> elements for captions. When you generate the output, the transformation process recognizes the <title> element’s content and automatically places it as a caption below the corresponding image in the document. This means that each image in the final manual will have a caption that is automatically generated from the structured DITA content, ensuring consistency and reducing the need for manual caption entry.


<fig>
  <image href="screenshot.png" alt="Software Screenshot"/>
  <title>Step 1: Launching the Application</title>
</fig>
    

The output will have “Step 1: Launching the Application” automatically placed as a caption below the screenshot, improving document clarity and accessibility without manual intervention.