How to get two booktitlealt on two different lines in PDF output
Posted: Fri Nov 24, 2017 11:01 am
Hi,
I am working on a plugin with customized PDf styles. We have two booktitlealt in our DITAMap. In the PDF output, I want these booktitlealt on two different rows. However, in my output they are in one line without any space between them. Can you please help?
_____________________________________________________________________________________________________________________________
front-matter.xsl
___________________________________________________________________________________________________________________________
front-matter-aatr.xsl
I am working on a plugin with customized PDf styles. We have two booktitlealt in our DITAMap. In the PDF output, I want these booktitlealt on two different rows. However, in my output they are in one line without any space between them. Can you please help?
_____________________________________________________________________________________________________________________________
front-matter.xsl
Code: Select all
<xsl:template name="createFrontMatter_1.0">
<fo:page-sequence master-reference="front-matter" xsl:use-attribute-sets="__force__page__count">
<xsl:call-template name="insertFrontMatterStaticContents"/>
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="__frontmatter">
<fo:external-graphic src="url(Customization/OpenTopic/common/artwork/ptc_header.png)" width="100%" height="100%" content-width="scale-to-fit" content-height="scale-to-fit" scaling="uniform" />
</fo:block>
<!-- set the title -->
<fo:block xsl:use-attribute-sets="__frontmatter__title">
<xsl:choose>
<xsl:when test="$map/*[contains(@class,' topic/title ')][1]">
<xsl:apply-templates select="$map/*[contains(@class,' topic/title ')][1]"/>
</xsl:when>
<xsl:when test="$map//*[contains(@class,' bookmap/mainbooktitle ')][1]">
<xsl:apply-templates select="$map//*[contains(@class,' bookmap/mainbooktitle ')][1]"/>
</xsl:when>
<xsl:when test="//*[contains(@class, ' map/map ')]/@title">
<xsl:value-of select="//*[contains(@class, ' map/map ')]/@title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/descendant::*[contains(@class, ' topic/topic ')][1]/*[contains(@class, ' topic/title ')]"/>
</xsl:otherwise>
</xsl:choose>
<!-- set the subtitle -->
<fo:block xsl:use-attribute-sets="__frontmatter__subtitle">
<xsl:apply-templates select="$map//*[contains(@class,' bookmap/booktitlealt ')]"/>
</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
<xsl:if test="not($retain-bookmap-order)">
<xsl:call-template name="createNotices"/>
</xsl:if>
</xsl:template>
front-matter-aatr.xsl
Code: Select all
<xsl:attribute-set name="__frontmatter__title" use-attribute-sets="common.title">
<xsl:attribute name="space-before">3in</xsl:attribute>
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
<xsl:attribute name="font-size">24pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="line-height">140%</xsl:attribute>
<xsl:attribute name="text-align">right</xsl:attribute>
<xsl:attribute name="margin-left">2in</xsl:attribute>
<xsl:attribute name="color">#3D4647</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__frontmatter__subtitle" use-attribute-sets="common.title">
<xsl:attribute name="font-size">14pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="line-height">140%</xsl:attribute>
<xsl:attribute name="text-align">right</xsl:attribute>
<xsl:attribute name="color">#3D4647</xsl:attribute>
</xsl:attribute-set>