Unable to generate 2-column PDF output in DITA Book
Post here questions and problems related to editing and publishing DITA content.
-
Timbot2000
- Posts: 1
- Joined: Mon May 04, 2026 6:06 pm
Unable to generate 2-column PDF output in DITA Book
Post by Timbot2000 »
Hello everyone, first-time poster here.
I have created a document as a multi-topic book in DITA, and everything otherwise displays the way I would like it, however, There is one section, namely "Abstract" that I want displayed in 2-column view. However all attempts to do so have failed (including outputclass, topicgroup, etc..
The current code of the Abstract topic is as follows:
Where the corresponding code in the combined HTML5 is
and the current CSS settings are:
Yest PDF Chemistry still stubbornly refuses to make this section 2-column. Can anybody help?
I have created a document as a multi-topic book in DITA, and everything otherwise displays the way I would like it, however, There is one section, namely "Abstract" that I want displayed in 2-column view. However all attempts to do so have failed (including outputclass, topicgroup, etc..
The current code of the Abstract topic is as follows:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="abstract" outputclass="two-columns">
<title outputclass="two-columns">(57) Abstract</title>
<body outputclass="two-columns">
<p> This invention ... is not restricted.</p>
<p><image placement="inline" href="media/image3.png" id="image_y3q_5rx_cjc">
<alt>Enxploded view of nail gun</alt>
</image></p>
</body>
</topic>Code: Select all
</article><article xmlns:nd="http://www.oxygenxml.com/css2fo/named-destinations" class="- topic/topic topic nested0 two-columns two-column" aria-labelledby="ariaid-title4" break-before="true" is-chapter="true" id="unique_4" topicrefclass="- map/topicref " outputclass="two-columns two-column" nd:nd-id="abstract" oid="abstract" specializations="@props/deliveryTarget">
<h1 class="- topic/title title topictitle1 two-columns" outputclass="two-columns" id="ariaid-title4"><span class="- topic/ph topic/title-wrapper ph title-wrapper">(57) Abstract</span></h1>
<div class="- topic/body body two-columns" outputclass="two-columns">
<p class="- topic/p p"> This invention ... is not restricted.</p>
<p class="- topic/p p"><img xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot" class="- topic/image image" dita-ot:image-width="483" dita-ot:image-height="351" href="file:/home/tim/Insync/timbot2000@gmail.com/OneDrive/Portfolio/media/image3.png" id="unique_4_Connect_42_image_y3q_5rx_cjc" nd:nd-id="image_y3q_5rx_cjc" placement="inline" src="file:/home/tim/Insync/timbot2000@gmail.com/OneDrive/Portfolio/media/image3.png" alt="Enxploded view of nail gun"/></p>Code: Select all
/* Target abstract by its oid attribute */
article[oid="abstract"] {
column-count: 2 !important;
column-gap: 2em !important;
column-fill: balance !important;
}
/* Make the title span both columns */
article[oid="abstract"] h1.title {
column-span: all !important;
-moz-column-span: all !important;
-webkit-column-span: all !important;
}
/* Prevent paragraphs from breaking across columns */
article[oid="abstract"] p {
break-inside: avoid-column !important;
page-break-inside: avoid !important;
}
/* Target the body only within the article where oid is 'abstract' */
article[oid="abstract"] *[class ~= "topic/body"][class ~= "two-columns"] {
column-count: 2;
column-gap: 10mm;
}-
julien_lacour
- Posts: 805
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Unable to generate 2-column PDF output in DITA Book
Post by julien_lacour »
Hello,
Oxygen PDF Chemistry doesn't support column display at element level.
Instead you need to define it at page level for your "abstract" topic. You will find here the detailed customization.
Regards,
Julien
Oxygen PDF Chemistry doesn't support column display at element level.
Instead you need to define it at page level for your "abstract" topic. You will find here the detailed customization.
Regards,
Julien
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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