Column count affecting TOC - HTML5 & CSS to PDF
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 38
- Joined: Thu Jul 29, 2021 12:02 pm
Column count affecting TOC - HTML5 & CSS to PDF
Post by InspectorSpacetime »
Hello,
I'm using the HTML5 & CSS to PDF transformation with Oxygen 24.1, and working on a regular map, not a bookmap.
I need one of my chapters to have a two column layout, and I've managed to do this with CSS following these instructions: https://www.oxygenxml.com/doc/versions/ ... pages.html
However, as a result, the TOC entry for this particular chapter has been affected as well! The entry is on a separate page, so the TOC is broken in the middle. The TOC entry for this chapter also has the 2 column layout.
What am I doing wrong, or is this a bug?
I'm using the HTML5 & CSS to PDF transformation with Oxygen 24.1, and working on a regular map, not a bookmap.
I need one of my chapters to have a two column layout, and I've managed to do this with CSS following these instructions: https://www.oxygenxml.com/doc/versions/ ... pages.html
However, as a result, the TOC entry for this particular chapter has been affected as well! The entry is on a separate page, so the TOC is broken in the middle. The TOC entry for this chapter also has the 2 column layout.
What am I doing wrong, or is this a bug?
-
- Posts: 39
- Joined: Mon Jul 25, 2022 11:18 am
Re: Column count affecting TOC - HTML5 & CSS to PDF
Post by andrei_pomacu »
Hi,
I tested in Oxygen 24.1 and seems that the problem does not occur in my setup.
Can you send a simplified example with your map and your css files in order to debug it to see where the problem is?
Regards,
Andrei
I tested in Oxygen 24.1 and seems that the problem does not occur in my setup.
Can you send a simplified example with your map and your css files in order to debug it to see where the problem is?
Regards,
Andrei
-
- Posts: 38
- Joined: Thu Jul 29, 2021 12:02 pm
Re: Column count affecting TOC - HTML5 & CSS to PDF
Post by InspectorSpacetime »
Hi Andrei,
My CSS looks like this:
And I have configured my DITA Map like this:
And as a result the TOC looks like this:

My CSS looks like this:
Code: Select all
@page two_col_page {
column-count: 2;
}
*[outputclass ~= "2col"] {
page: two_col_page !important;
}
Code: Select all
<topicref href="topics/general.dita" outputclass="2col">
<topicref href="topics/about_the_tutorial.dita" outputclass="g_title" toc="no"/>
<topicref href="topics/audience.dita" outputclass="g_title" toc="no"/>
<topicref href="topics/prequisites.dita" outputclass="g_title" toc="no"/>
<topicref href="topics/copyright_disclaimer.dita" outputclass="g_title" toc="no"/>
</topicref>

You do not have the required permissions to view the files attached to this post.
-
- Posts: 38
- Joined: Thu Jul 29, 2021 12:02 pm
Re: Column count affecting TOC - HTML5 & CSS to PDF
Post by InspectorSpacetime »
I inspected the merged.html file, and the TOC entry for this chapter also has the ”2col” class and outputclass. That’s probably what’s causing the problem.
So, using another selector besides * to target just the actual topic probably fixes it. Will try soon.
EDIT: Yes indeed, switching the CSS to this:
fixed the problem. So "article" instead of "*" did the trick for me.
So, using another selector besides * to target just the actual topic probably fixes it. Will try soon.
EDIT: Yes indeed, switching the CSS to this:
Code: Select all
article[outputclass ~= "2col"] {
page: two_col_page !important;
}
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