Page 1 of 1

Title property not working after upgrading to version 21.1

Posted: Wed May 29, 2019 7:51 am
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.

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%;
}
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?

Re: Title property not working after upgrading to version 21.1

Posted: Wed May 29, 2019 10:17 am
by Dan
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:

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%;
}
Many regards,
Dan

Re: Title property not working after upgrading to version 21.1

Posted: Thu May 30, 2019 1:36 am
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:

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>    
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

Re: Title property not working after upgrading to version 21.1

Posted: Thu May 30, 2019 3:06 pm
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.

Re: Title property not working after upgrading to version 21.1

Posted: Fri May 31, 2019 12:35 pm
by Dan
Hello,

I think one workaround is to use the padding-top property instead of margin. The margin is discarded, but the padding not.

Many regards,
Dan

Re: Title property not working after upgrading to version 21.1

Posted: Tue Jun 04, 2019 1:05 am
by shanweizhong
Dan wrote: Fri May 31, 2019 12:35 pm Hello,

I think one workaround is to use the padding-top property instead of margin. The margin is discarded, but the padding not.

Many regards,
Dan
Thanks so much, Dan. The padding-top property really worked! :-)

Cheers,
Michael

Re: Title property not working after upgrading to version 21.1

Posted: Tue Jun 04, 2019 1:06 am
by shanweizhong
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.
I see. Thanks for the background. My problem was solved with Dan's workaround.

Cheers,
Michael

Re: Title property not working after upgrading to version 21.1

Posted: Thu Jun 06, 2019 7:01 am
by shanweizhong
Dan wrote: Fri May 31, 2019 12:35 pm Hello,

I think one workaround is to use the padding-top property instead of margin. The margin is discarded, but the padding not.

Many regards,
Dan
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;
}
As I added top and bottom borders to the note, I'm hoping to add some space below the bottom border. "padding-bottom" does not work in this case because it will add space above the bottom border.

Any idea how I can fix this?

Cheers,
Michael

Re: Title property not working after upgrading to version 21.1

Posted: Thu Jun 06, 2019 10:59 am
by Costin
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.
Image

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.
Image

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

Re: Title property not working after upgrading to version 21.1

Posted: Mon Jun 10, 2019 7:25 am
by shanweizhong
Thanks Costin. My bad. I was looking at the notes embedded in bullets...

Cheers,
Michael

Re: Title property not working after upgrading to version 21.1

Posted: Mon Jun 10, 2019 7:50 am
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

Re: Title property not working after upgrading to version 21.1

Posted: Mon Jun 10, 2019 3:15 pm
by Dan
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

Re: Title property not working after upgrading to version 21.1

Posted: Tue Jun 11, 2019 1:53 pm
by Dan
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:

Code: Select all

drop.block.margins.at.page.boundary
Set its value to 'no', then run a test transformation.
This should restore the old block margin behavior.

Many regards,
Dan

Re: Title property not working after upgrading to version 21.1

Posted: Wed Jun 12, 2019 6:06 am
by shanweizhong
Thanks so much for the help, Dan.

Re: Title property not working after upgrading to version 21.1

Posted: Wed Jun 12, 2019 4:51 pm
by Costin
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:

Code: Select all

<li outputclass="note_list_item">
                <note>That is a Note inside a list item</note>
            </li>
[*]in your customization CSS:

Code: Select all

*[class~="note_list_item"]{
    margin-bottom: 10em !important;
}
Regards,
Costin

Re: Title property not working after upgrading to version 21.1

Posted: Wed Jun 12, 2019 11:20 pm
by shanweizhong
Good suggestion. Thanks Costin.