Screen tag cannot be customized in Oxygen 16

Having trouble installing Oxygen? Got a bug to report? Post it all here.
rww
Posts: 23
Joined: Wed Jul 24, 2013 12:40 am

Screen tag cannot be customized in Oxygen 16

Post by rww »

I've upgraded to Oxygen 16 from Oxygen 15.1 and my customization settings for the <screen> tag now no longer work for DITA PDF output.

I've customized the screen tag text for the font size, as well as added a border and changed the background colour, but none of it works now. Even if I strip everything back to the basic screen tag settings and change something simple, like the background colour, the customization doesn't work. I've tried changing it in the DITA-OT/plugins/org.dita.pdf2 directory and my Customization folder but in either case nothing works.

The DITA-OT attribute settings for screen are as follows:

Code: Select all

    <xsl:attribute-set name="screen" use-attribute-sets="base-font">
<xsl:attribute name="space-before">1.2em</xsl:attribute>
<xsl:attribute name="space-after">0.8em</xsl:attribute>
<xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
<xsl:attribute name="background-color">#f0f0f0</xsl:attribute>
<xsl:attribute name="font-family">monospace</xsl:attribute>
<xsl:attribute name="line-height">106%</xsl:attribute>
</xsl:attribute-set>
Changing anything here has no effect on the finished PDF. For example, change the background color to red (ridiculous but easy to see):

Code: Select all

    <xsl:attribute-set name="screen" use-attribute-sets="base-font">
<xsl:attribute name="space-before">1.2em</xsl:attribute>
<xsl:attribute name="space-after">0.8em</xsl:attribute>
<xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
<xsl:attribute name="background-color">red</xsl:attribute>
<xsl:attribute name="font-family">monospace</xsl:attribute>
<xsl:attribute name="line-height">106%</xsl:attribute>
</xsl:attribute-set>
I really can't see what the problem is as everything worked perfectly in 15.1.
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Screen tag cannot be customized in Oxygen 16

Post by Radu »

Hi,

I looked into this and it seems that a plugin we added starting with Oxygen 15.2 to the bundled DITA OT inhibits the default handling templates to be called on elements which are space-preserve like <screen>.

The improvement we added in 15.2 is to be able to mark certain code blocks as having content belonging to a specific programming language in order to get syntax highlight inside them:

http://www.oxygenxml.com/doc/ug-oxygen/ ... block.html

We'll try to find a fix for this and also incorporate the fix in the next minor bug fix release of Oxygen 16.0 which is usually announced in this RSS feed:

http://www.oxygenxml.com/rssBuildID.xml

In the meantime you can open this XSLT stylesheet:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.highlight\pdfHighlight.xsl

and replace the match on the template:

Code: Select all

<xsl:template match="*[contains(@class,' topic/pre ')]">
with:

Code: Select all

<xsl:template match="*[contains(@class,' topic/pre ')][contains(@outputclass, 'language-')]">
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rww
Posts: 23
Joined: Wed Jul 24, 2013 12:40 am

Re: Screen tag cannot be customized in Oxygen 16

Post by rww »

Ok, I'll watch out for the update. In the meantime I've made the suggested change and my customizations are working properly again.
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Screen tag cannot be customized in Oxygen 16

Post by Radu »

Hi,

Just to update the thread, in Oxygen 16.1 the customizations made in the highlight plugin for codeblocks added by Oxygen to the DITA OT do not interfere with user customizations for other space-preserve elements.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply