Page 1 of 1

Header Fonts and String Function

Posted: Wed Oct 16, 2019 3:23 am
by jmorales
Hi,
I'm trying to set up the headers for PDF output. I'm using <oXygen/> XML Author 21.1, build 2019090904. When I try to specify font-family or font-size for the header, these properties are ignored. Only the font-weight is honored.

@page :left {
@top-left {
content: "Some Sample Text";
font-family: roman, 'times new roman', times, serif;
font-size: 6pt;
font-weight: normal;
}
}

@page :right {
@top-right {
content: "Some Sample Text";
font-family: arial, helvetica, sans-serif;
font-size: 26pt;
font-weight: bold;
}
}

Am I doing something wrong? If this is a bug, is there a workaround?

Thanks!

Re: Header Fonts and String Function

Posted: Wed Oct 16, 2019 3:53 pm
by Dan
Are you using a publishing template (selected in the first page of the DITA transformation scenrio dialog)? Probably the CSS rules from it are more specific.

You can use more specific selectors like:

Code: Select all

@page :left, chapter:left, chapter:first:left { .. }
Or you can use the !important specifier:

Code: Select all

font-family: roman, 'times new roman', times, serif !important;
Regards,
Dan

Re: Header Fonts and String Function

Posted: Thu Oct 17, 2019 2:32 am
by jmorales
Thanks, Dan! I used @page chapter-left as the selector, and this time the font properties were honored.