Figure Image

Adjust the placement of figure elements and image elements.

Overview

Resource location:@import url("https://jorsek.github.io/pdfgen.github.io/styles1.1/modules/dita/figure_image.css");
Figure 1. Images. By default, the images in step command elements are automatically:
  • Resized to match @height="16px"
  • Have decorations like borders or shadows removed
images in steps overview
Hide full stops after title elements when description is present
Figure 2. Before
image title full stop
Figure 3. After
image title hide full stop

You apply this customization by adding the code under the <xsl:import> tag in the XSLT tab.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

    <xsl:import href="../../../../../../../../sdk2/internal/pdf_generator/pdf_generator.xsl"/>

<!-- Add this code -->
    <xsl:template name="place-fig-lbl">
        <xsl:param name="stringName"/>
        <!--  Number of fig/title's including this one  -->
        <xsl:variable name="fig-count-actual" select="count(preceding::*[contains(@class, ' topic/fig ')]//*[contains(@class, ' topic/title ')]) - count(/normalized/map//*[contains(@class, ' topic/fig ')]//*[contains(@class, ' topic/title ')]) +1"/>
        <xsl:variable name="ancestorlang">
            <xsl:call-template name="getLowerCaseLang"/>
        </xsl:variable>
        <xsl:choose>
            <!--  title -or- title & desc  -->
            <xsl:when test="*[contains(@class, ' topic/title ')]">
                <figcaption>
                    <span class="fig--title-label">
                        <xsl:choose>
                            <!--  Hungarian: "1. Figure "  -->
                            <xsl:when test="$ancestorlang = ('hu', 'hu-hu')">
                                <xsl:value-of select="$fig-count-actual"/>
                                <xsl:text>. </xsl:text>
                                <xsl:call-template name="getVariable">
                                    <xsl:with-param name="id" select="'Figure'"/>
                                </xsl:call-template>
                                <xsl:text></xsl:text>
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:call-template name="getVariable">
                                    <xsl:with-param name="id" select="'Figure'"/>
                                </xsl:call-template>
                                <xsl:text></xsl:text>
                                <xsl:value-of select="$fig-count-actual"/>
                                <xsl:text>. </xsl:text>
                            </xsl:otherwise>
                        </xsl:choose>
                    </span>
                    <xsl:apply-templates select="*[contains(@class, ' topic/title ')]" mode="figtitle"/>
                    <xsl:if test="*[contains(@class, ' topic/desc ')]">
                        <!-- <xsl:text>. </xsl:text>  -->
                    </xsl:if>
                    <xsl:for-each select="*[contains(@class, ' topic/desc ')]">
                        <span class="figdesc">
                            <xsl:call-template name="commonattributes"/>
                            <xsl:apply-templates select="." mode="figdesc"/>
                        </span>
                    </xsl:for-each>
                </figcaption>
            </xsl:when>
            <!--  desc  -->
            <xsl:when test="*[contains(@class, ' topic/desc ')]">
                <xsl:for-each select="*[contains(@class, ' topic/desc ')]">
                    <figcaption>
                        <xsl:call-template name="commonattributes"/>
                        <xsl:apply-templates select="." mode="figdesc"/>
                    </figcaption>
                </xsl:for-each>
            </xsl:when>
        </xsl:choose>
    </xsl:template>

<!-- End of add this code -->

</xsl:stylesheet>
Disable figure numbering
See Figure no Numbering.