How to rotate the whole chapter?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 26
- Joined: Wed Nov 27, 2019 11:03 am
How to rotate the whole chapter?
Hi!
(I've read all topics and articles here related to "landscape")
One of my topics contains wide content, so I want to place it on the landscape page.
I've got definitions in my CSS:
and it works for tables with orient="land".
I've added the following:
and placed it into ditamap:
As a result chapter is not rotated.
Is there any mistake?
Sincerely,
Dmitry
UPDATE: It appears now that row form TOC related with this chapter is placed on separated rotated page...
(I've read all topics and articles here related to "landscape")
One of my topics contains wide content, so I want to place it on the landscape page.
I've got definitions in my CSS:
Code: Select all
@page landscape-page:right {
size: landscape;
margin-top: 2.5cm;
margin-bottom: 1.5cm;
margin-left: 2cm;
margin-right: 3cm;
background-image: url(images/background_image_right_page_landscape.svg);
background-position:center;
background-repeat:no-repeat;
@top-left {
content: none
}
@top-center {
content: none
}
@top-right {
content: none
}
@right-bottom {
content: string(maptitle) "\A" string(chaptertitle1) "\A" string(chaptertitle2);
font-family: 'PT Sans', PTSans, sans-serif !important;
font-size:8pt;
color:white;
transform: rotate(90);
vertical-align: middle;
text-align: left;
}
@bottom-left-corner {
content: counter(page);
font-size:12pt;
font-family: 'PT Sans', PTSans, sans-serif;
color: #00657f;
transform: rotate(90);
padding-bottom: 0.5in;
}
@bottom-right-corner {
content: none;
}
}
@page landscape-page:left {
size: landscape;
margin-top: 1.5cm;
margin-bottom: 2.5cm;
margin-left: 2cm;
margin-right: 3cm;
background-image: url(images/background_image_left_page_landscape.svg);
background-position:center;
background-repeat:no-repeat;
@top-left {
content: none
}
@top-center {
content: none
}
@top-right {
content: none
}
@right-top {
content: string(maptitle) "\A" string(chaptertitle1) "\A" string(chaptertitle2);
font-family: 'PT Sans', PTSans, sans-serif !important;
font-size:8pt;
color:white;
transform: rotate(90);
vertical-align: middle;
text-align: right;
}
@bottom-left-corner {
content: none;
}
@top-left-corner {
content: counter(page);
font-size:12pt;
font-family: 'PT Sans', PTSans, sans-serif;
color: #00657f;
transform: rotate(90);
}
}
I've added the following:
Code: Select all
*[outputclass="wide"] {
page: landscape-page;
}
Code: Select all
<chapter outputclass="wide" href="modules/sigacfg/reference/r_security_ug_tables.dita"/>
Is there any mistake?
Sincerely,
Dmitry
UPDATE: It appears now that row form TOC related with this chapter is placed on separated rotated page...
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to rotate the whole chapter?
Post by julien_lacour »
Hello Dmitry,
Your customization is correct, you just need to move the outputclass attribute from <topicref> element to the topic "r_security_ug_tables.dita" itself. You will obtain something like:
It does not work on the ditamap <topicref> elements as they are references to the topics and not the actual topics.
Regards,
Julien
Your customization is correct, you just need to move the outputclass attribute from <topicref> element to the topic "r_security_ug_tables.dita" itself. You will obtain something like:
Code: Select all
<topic id="r_security_ug_tables" outputclass="wide">
Regards,
Julien
-
- Posts: 26
- Joined: Wed Nov 27, 2019 11:03 am
Re: How to rotate the whole chapter?
Hello Julien!
Unfortunately, no effect.
Does it should work?
Regards,
Dmitry
Unfortunately, no effect.
Does it should work?
Code: Select all
<reference id="r_security_ug_tables" outputclass="wide">
Dmitry
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to rotate the whole chapter?
Post by julien_lacour »
Dmitry,
On my side it works correctly, make sure your args.css parameter is correctly set, and contains:
For testing purpose I used the following Reference
You can also check in your favorite brower that if you select the node containing the reference, in my case:
The CSS Inspector show the "outputclass" selector (when inspecting the <article> element).
I did the test on <oXygen/> XML Editor 22.0, build 2020030607
Regards,
Julien
On my side it works correctly, make sure your args.css parameter is correctly set, and contains:
Code: Select all
*[outputclass = "wide"] {
page: landscape-page;
}
Code: Select all
<reference id="test" outputclass="wide">
<title>Test</title>
<shortdesc/>
<refbody/>
</reference>
Code: Select all
<article class="- topic/topic reference/reference topic reference nested2 wide" aria-labelledby="ariaid-title10" id="unique_18" topicrefclass="- map/topicref " nd:nd-id="test" oid="test" outputclass="wide">
<h3 class="- topic/title title topictitle3" id="ariaid-title10"><span class="- topic/ph topic/title-wrapper ph title-wrapper">Test</span></h3>
<div class="- topic/body reference/refbody body refbody"><p class="- topic/shortdesc shortdesc"></p></div>
</article>
I did the test on <oXygen/> XML Editor 22.0, build 2020030607
Regards,
Julien
-
- Posts: 26
- Joined: Wed Nov 27, 2019 11:03 am
Re: How to rotate the whole chapter?
Julien,
My inspector shows this:
'wide' is doubled.
I use 21.1 + framework you sent me before.
Regards,
Dmitry
My inspector shows this:
Code: Select all
<article xmlns:nd="http://www.oxygenxml.com/css2fo/named-destinations" class="- topic/topic reference/reference topic reference nested0 wide" aria-labelledby="ariaid-title2" break-before="true" is-chapter="true" id="unique_2" outputclass="wide wide" topicrefclass="- map/topicref bookmap/chapter " nd:nd-id="r_security_ug_tables" oid="r_security_ug_tables">
I use 21.1 + framework you sent me before.
Regards,
Dmitry
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to rotate the whole chapter?
Post by julien_lacour »
Dmitry,
Could you try to set back the "DITA / DITA Open Toolkit" to built-in value as well as "XML / PDF Output / CSS-based Processors" to Auto-detect and this what is happening. I tried on <oXygen/> XML Editor 21.1, build 2019120214 and my reference topic was displayed as landscape.
The snapshots are not released version and they can contain errors still on going.
Regards,
Julien
Could you try to set back the "DITA / DITA Open Toolkit" to built-in value as well as "XML / PDF Output / CSS-based Processors" to Auto-detect and this what is happening. I tried on <oXygen/> XML Editor 21.1, build 2019120214 and my reference topic was displayed as landscape.
The snapshots are not released version and they can contain errors still on going.
Regards,
Julien
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to rotate the whole chapter?
Post by julien_lacour »
Hello,
The issue is related to the usage of bookmap and chapters: the default rule for chapters is
Which has a bigger priority than the following rule (more specific):
In this case we have 2 solutions
Julien
The issue is related to the usage of bookmap and chapters: the default rule for chapters is
Code: Select all
*[class ~= "topic/topic"][is-chapter] {
/* Each chapter starts a new page sequence, so the :first selector applies to each of them. */
-oxy-page-group:start;
page: chapter;
}
Code: Select all
*[outputclass = 'wide'] {
page: landscape-page;
}
- Use the !important rule
Code: Select all
* [outputclass = 'wide'] { page: landscape-page !important; }
- Use a more specific selector
Code: Select all
*[class ~= "topic/topic"][is-chapter][outputclass="wide"] { page: landscape-page; }
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)
- ↳ 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