<xsl:call-template name="pi.dbfo_keep-together"/>
</xsl:variable>
+ <!-- These don't have a pgwide attribute, so may use a PI -->
+ <xsl:variable name="pgwide.pi">
+ <xsl:call-template name="pi.dbfo_pgwide"/>
+ </xsl:variable>
+
+ <xsl:variable name="pgwide">
+ <xsl:choose>
+ <xsl:when test="$pgwide.pi">
+ <xsl:value-of select="$pgwide.pi"/>
+ </xsl:when>
+ <!-- child element may set pgwide -->
+ <xsl:when test="*[@pgwide]">
+ <xsl:value-of select="*[@pgwide][1]/@pgwide"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:choose>
<!-- informaltables have their own templates and
are not handled by formal.object -->
<xsl:when test="local-name(.) = 'equation'">
- <fo:block id="{$id}"
- xsl:use-attribute-sets="equation.properties">
- <xsl:if test="$keep.together != ''">
- <xsl:attribute name="keep-together.within-column"><xsl:value-of
- select="$keep.together"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:block>
+ <xsl:choose>
+ <xsl:when test="$pgwide = '1'">
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="pgwide.properties
+ equation.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="equation.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="local-name(.) = 'procedure'">
<fo:block id="{$id}"
</fo:block>
</xsl:when>
<xsl:when test="local-name(.) = 'informalfigure'">
- <fo:block id="{$id}"
- xsl:use-attribute-sets="informalfigure.properties">
- <xsl:if test="$keep.together != ''">
- <xsl:attribute name="keep-together.within-column"><xsl:value-of
- select="$keep.together"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:block>
+ <xsl:choose>
+ <xsl:when test="$pgwide = '1'">
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="pgwide.properties
+ informalfigure.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="informalfigure.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="local-name(.) = 'informalexample'">
- <fo:block id="{$id}"
- xsl:use-attribute-sets="informalexample.properties">
- <xsl:if test="$keep.together != ''">
- <xsl:attribute name="keep-together.within-column"><xsl:value-of
- select="$keep.together"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:block>
+ <xsl:choose>
+ <xsl:when test="$pgwide = '1'">
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="pgwide.properties
+ informalexample.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="informalexample.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="local-name(.) = 'informalequation'">
- <fo:block id="{$id}"
- xsl:use-attribute-sets="informalequation.properties">
- <xsl:apply-templates/>
- </fo:block>
+ <xsl:choose>
+ <xsl:when test="$pgwide = '1'">
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="pgwide.properties
+ informalequation.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="informalequation.properties">
+ <xsl:if test="$keep.together != ''">
+ <xsl:attribute name="keep-together.within-column"><xsl:value-of
+ select="$keep.together"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
<fo:block id="{$id}"