DITA至PDF部分两列输出



我想创建一个pdf base dut dita/xml地图,其中一个主题以报纸风格的两列输出格式化。

我发现要在我的布局摩托车 - attr样式表中使用的属性: <xsl:attribute name="column-count">2</xsl:attribute>

这为整个文档创建了两列输出。因此,我在区域主体属性集中添加了@outputclass参数。这没有给我正确的结果。有人知道如何在ditamap中为单个主题创建两列输出吗?

我的样式表定义:

<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>

我的主题定义:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_hbq_pxv_yy">
<title>test</title>
<prolog/>
<body outputclass="twocol">

问题是,页面序列必须在其上具有正确的列计数属性以及PDF2插件的工作方式,这是为文档的特定区域设置的,TOC,TOC,索引,身体等。你不能只是tu

为了实现自己想要的东西,您可以将主题的内容拿到2列表中。虽然不是最好的解决方案,但它是当前实现的最佳方法。

如果您有机会将天线房屋格式化用于PDF生成,则可以通过指定fo:block-container/column-count =" 2"。p>列计数/css(-ah-(列计数

http://www.antenna.co.jp/ahf/help/v64e/ahf-ext.html#columns

样式表非常简单,如下:

<xsl:template match="*[contains(@class,' topic/body ')][string(@outputclass) eq 'twocol']" priority="2">
    <fo:block-container column-count="2">
        <xsl:next-match/>
    </fo:block-container>
</xsl:template>

最新更新