Partial two column pdf output
Posted: Tue Jun 27, 2017 12:37 pm
Hi,
I want a part of the document to appear in a two-column style. I've found the attribute <xsl:attribute name="column-count">2</xsl:attribute> for that. This turns the whole document in a two column pdf output. So I've created an @outputclass for that in the layout-masters-attr . This does not seam to work. Does anyone have an idea how to create a two column output for just one topic in the ditamap?
layout-masters-attr:
Topic body:
I want a part of the document to appear in a two-column style. I've found the attribute <xsl:attribute name="column-count">2</xsl:attribute> for that. This turns the whole document in a two column pdf output. So I've created an @outputclass for that in the layout-masters-attr . This does not seam to work. Does anyone have an idea how to create a two column output for just one topic in the ditamap?
layout-masters-attr:
Code: Select all
<xsl:attribute-set name="region-body" use-attribute-sets="region-body.odd"/>
<xsl:attribute-set name="region-body.odd">
<xsl:attribute name="margin-top">
<xsl:value-of select="$body-margin"/>
</xsl:attribute>
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$body-margin"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}">
<xsl:value-of select="$page-margin-inside"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}">
<xsl:value-of select="$page-margin-outside"/>
</xsl:attribute>
<xsl:attribute name="column-count">
<xsl:choose>
<xsl:when test="@outputclass = 'twocol'">2</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="region-body.even">
<xsl:attribute name="margin-top">
<xsl:value-of select="$body-margin"/>
</xsl:attribute>
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$body-margin"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}">
<xsl:value-of select="$page-margin-outside"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}">
<xsl:value-of select="$page-margin-inside"/>
</xsl:attribute>
<xsl:attribute name="column-count">
<xsl:choose>
<xsl:when test="@outputclass = 'twocol'">2</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
Topic body:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_hbq_pxv_yy" xml:lang="ko-KR" outputclass="twocol">
<title>test</title>
<body outputclass="twocol">