Partial two column pdf output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 22
- Joined: Tue May 17, 2016 4:58 pm
Partial two column pdf output
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">
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Partial two column pdf output
Hi,
Linking here to the same question you posted on StackOverflow:
https://stackoverflow.com/questions/447 ... umn-output
Unfortunately we do not have any experience doing this ourselves so besides the advice you got there I cannot add more.
When publishing DITA content to PDF from Oxygen there is also a transformation scenario called DITA Map PDF - WYSIWYG which lets you use CSS pagination rules to style the DITA content instead of using directly XSL-FO. You can either use a commercial engine for creating the PDF using CSS (either Prince XML or Antenna House) or the Oxygen internal "Chemistry" engine which is still in a beta stage in Oxygen 19.0.
If you want to know more about how this two-column topic could be done using CSS for creating the PDF I could get one of my colleagues who worked on this to give you more details.
Regards,
Radu
Linking here to the same question you posted on StackOverflow:
https://stackoverflow.com/questions/447 ... umn-output
Unfortunately we do not have any experience doing this ourselves so besides the advice you got there I cannot add more.
When publishing DITA content to PDF from Oxygen there is also a transformation scenario called DITA Map PDF - WYSIWYG which lets you use CSS pagination rules to style the DITA content instead of using directly XSL-FO. You can either use a commercial engine for creating the PDF using CSS (either Prince XML or Antenna House) or the Oxygen internal "Chemistry" engine which is still in a beta stage in Oxygen 19.0.
If you want to know more about how this two-column topic could be done using CSS for creating the PDF I could get one of my colleagues who worked on this to give you more details.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service