Title property not working after upgrading to version 21.1
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Title property not working after upgrading to version 21.1
Post by shanweizhong »
In my Oxygen Author 21, I used the following CSS code to style my PDF document title on the cover page, and it worked fine.
However, after upgrading to version 21.1, I found the "margin-top" property stops working and the title goes up to the top of the page and overlaps with the company logo in the background.
Any idea how to fix that?
Code: Select all
*[class~="front-page/front-page-title"] {
display: block;
text-align: center;
margin-top: 34%;
font-size: 2.6em;
font-weight: bold;
line-height: 105%;
}
Any idea how to fix that?
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Title property not working after upgrading to version 21.1
The margins of the first block in the page are now discarded. This is desirable, to make the sections titles align properly in the page when they are at the beginning. The front-page-title is not the first block in the page, there are others with no content. Those are losing the top margin.
A workaround is to increase the value of the margin-top, like:
Many regards,
Dan
A workaround is to increase the value of the margin-top, like:
Code: Select all
*[class~="front-page/front-page-title"] {
display: block;
text-align: center;
margin-top: 3in;
font-size: 2.6em;
font-weight: bold;
line-height: 105%;
}
Dan
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
Thanks Dan. I tried that but it did not work. I also tried to set the "margin-top" property of "front-page/front-page-title" and "bookmap/booktitle" and they did not work either.
My ditamap file is as follows:
I also inspected the generated HTML file and found the properties actually work there.
Maybe there are some other properties I should set?
Cheers,
Michael
My ditamap file is as follows:
Code: Select all
<bookmap>
<booktitle>
<mainbooktitle>
<ph keyref="prod_name"/> <ph keyref="cur_ver" audience="external"/><ph keyref="cur_internal_ver" audience="internal"/> Client Release Notes <ph audience="internal">(Internal)</ph>
</mainbooktitle>
</booktitle>
...
</bookmap>
Maybe there are some other properties I should set?
Cheers,
Michael
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Title property not working after upgrading to version 21.1
Post by chrispitude »
The margin behavior change that Dan mentions is a result of this discussion:
"How do I suppress margin-top/margin-bottom at the top/bottom of the content bounding box?"
topic20016.html
As Dan says, this is needed for body content that flows across multiple pages without "vertically indenting" different elements away from the page content bounding box. This is something that industrial page-layout programs (like FrameMaker) do, and it is a desirable change for PDF Chemistry.
If I can find time later today, I'll see if I can reproduce this and find an alternate method for you to position your book title.
"How do I suppress margin-top/margin-bottom at the top/bottom of the content bounding box?"
topic20016.html
As Dan says, this is needed for body content that flows across multiple pages without "vertically indenting" different elements away from the page content bounding box. This is something that industrial page-layout programs (like FrameMaker) do, and it is a desirable change for PDF Chemistry.
If I can find time later today, I'll see if I can reproduce this and find an alternate method for you to position your book title.
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
I see. Thanks for the background. My problem was solved with Dan's workaround.chrispitude wrote: ↑Thu May 30, 2019 3:06 pm The margin behavior change that Dan mentions is a result of this discussion:
"How do I suppress margin-top/margin-bottom at the top/bottom of the content bounding box?"
topic20016.html
As Dan says, this is needed for body content that flows across multiple pages without "vertically indenting" different elements away from the page content bounding box. This is something that industrial page-layout programs (like FrameMaker) do, and it is a desirable change for PDF Chemistry.
If I can find time later today, I'll see if I can reproduce this and find an alternate method for you to position your book title.
Cheers,
Michael
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
Hi Dan,
I'm not sure if it is a related issue, but I found that the "margin-bottom" property also stopped working for "note", as shown in the following style:
Code: Select all
*[class~="topic/note"] {
border-top: 1px solid;
border-bottom: 1px solid;
margin-bottom: 1em;
}
Any idea how I can fix this?
Cheers,
Michael
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Title property not working after upgrading to version 21.1
Hello,
I've tested and seems the margin-bottom property works as it should on the note.
I managed to add a generous bottom margin (10em) to the note and that was reflected correctly in the PDF, as you can see from the screenshot.

However, if the note is positioned at the very bottom of the page, it is intended behavior to move the element following the note to the next page and in that case, if there is not enough space for the note's margin until the page break, it won't be reflected (like in the 2nd screenshot). In such cases, you should move the note to the next page.

If you think you have a different situation, sending us a sample map with one topic and the customization CSS you are using, could help us investigate.
Regards,
Costin
I've tested and seems the margin-bottom property works as it should on the note.
I managed to add a generous bottom margin (10em) to the note and that was reflected correctly in the PDF, as you can see from the screenshot.

However, if the note is positioned at the very bottom of the page, it is intended behavior to move the element following the note to the next page and in that case, if there is not enough space for the note's margin until the page break, it won't be reflected (like in the 2nd screenshot). In such cases, you should move the note to the next page.

If you think you have a different situation, sending us a sample map with one topic and the customization CSS you are using, could help us investigate.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
Thanks Costin. My bad. I was looking at the notes embedded in bullets...
Cheers,
Michael
Cheers,
Michael
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
It seems to be weird. When <note> is embedded in <li>, the "margin-bottom" style stops working but the "border-top" and "border-bottom" styles keep working...
Cheers,
Michael
Cheers,
Michael
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Title property not working after upgrading to version 21.1
Hello Michael,
We are preparing a nightly build of the publishing engine, with a new parameter that will allow you to control the discarding of the top/bottom margins for elements that are at the top or bottom of a page. Costin will give you more details when the build is ready.
Many regards,
Dan
We are preparing a nightly build of the publishing engine, with a new parameter that will allow you to control the discarding of the top/bottom margins for elements that are at the top or bottom of a page. Costin will give you more details when the build is ready.
Many regards,
Dan
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Title property not working after upgrading to version 21.1
Hello Michael,
We have prepared a nightly build here:
http://mirror.oxygenxml.com/maven-night ... e-full.zip
Extract it to a folder, then configure oXygen to use it (Preferences/DITA/ DITA Open Toolkit/Custom).
Restart oXygen. In your transformation scenario parameters tab, a new parameter should be visible:
Set its value to 'no', then run a test transformation.
This should restore the old block margin behavior.
Many regards,
Dan
We have prepared a nightly build here:
http://mirror.oxygenxml.com/maven-night ... e-full.zip
Extract it to a folder, then configure oXygen to use it (Preferences/DITA/ DITA Open Toolkit/Custom).
Restart oXygen. In your transformation scenario parameters tab, a new parameter should be visible:
Code: Select all
drop.block.margins.at.page.boundary
This should restore the old block margin behavior.
Many regards,
Dan
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
Thanks so much for the help, Dan.
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Title property not working after upgrading to version 21.1
Hi shanweizhong,
If, for any reason, you don't want to use the publishing engine, but stick with using the official stable release from our website, there is a workaround I could think of.
You should use the outputclass attribute on the specific list items that contain notes and match your outputclass from CSS, like:
[*]in the source DITA file:
[*]in your customization CSS:
Regards,
Costin
If, for any reason, you don't want to use the publishing engine, but stick with using the official stable release from our website, there is a workaround I could think of.
You should use the outputclass attribute on the specific list items that contain notes and match your outputclass from CSS, like:
[*]in the source DITA file:
Code: Select all
<li outputclass="note_list_item">
<note>That is a Note inside a list item</note>
</li>
Code: Select all
*[class~="note_list_item"]{
margin-bottom: 10em !important;
}
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 30
- Joined: Mon Jul 10, 2017 2:18 am
Re: Title property not working after upgrading to version 21.1
Post by shanweizhong »
Good suggestion. Thanks Costin.
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