Bold not rendered

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Bold not rendered

Post by Boreas »

Hello,

we created a plugin to customise our PDF. Apprently we changed something that we were not supposed to because bold is no longer displayed. There is only only scenario in my set of scenarios that does this, and this scenario is the only one using this plugin.

Any idea where I sould start looking? we made changes to format the toc, links, steps, xref, headings, content... Is there a default font that overrides everything?

thanks again.

Carole
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Bold not rendered

Post by Radu »

Hi Carole,

Actually someone else had a similar problem when italic styles did no longer work for him after a PDF customization:

http://www.oxygenxml.com/forum/topic10123.html

In that long thread at some point I made an analysis:

http://www.oxygenxml.com/forum/topic10123.html#p28139

and came to the conclusion that when you make a customization XSLT stylesheet you should overwrite only the XSLT templates that you want to change and not copy entire XSLT stylesheet content to your customization.

So that might also be the problem in your case, the template which matches plain text phrases *[contains(@class,' topic/ph ')] started having more priority than the one which matches b tags.

Other ways to debug PDF problems:

1) Add xsl:messages in the XSLT code to see if certain templates get called. You should find those messages in the ANT console output.
2) Edit the transformation scenario and set paremeter the clean.temp to no, then look in the temporary files folder for the topic.fo file containing the generated XSL-FO output, then look in it to see the styles used to render the bold tags.
3) Try to debug the PDF output:

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Re: Bold not rendered

Post by Boreas »

Hello,

with the information supplied from the other post on lost <i>, I was able to better understand how things were organized and related one to another. I realized that it was not <b> that I had lost, but it was rather the bold defined for <wintitle> and <uicontrol> that were not rendered.I normally do not use <b> alone as a tag.
My plugin did not call a customized ui-domain.xsl so I figured that <wintitle> and uicontrol> were formatted with the ui-domain.xsl of the org.dita.pdf2 folder. As a test, to make sure I was in the rigth file, I changed the color (to pink) of the <uicontrol> and <wintitle> tags defined in the ui-domain.xsl file of the org.dita.pdf2 folder. Only the <uicontrol> tag came out pink. :? . I was expecting to have both tags in pink.I made other tests on the tags, the behavior of both tags never was the same.<b> alone however was rendered ok.



So I added the ui domain files to my customization.

I Added <xsl:import href="ui-domain.xsl"/> to the fo/xsl/custom.xsl file.
I added the the ui-domain.xsl to the xsl folder of my plugin.
I added the ui-domain-attr.xsl to the attr folder of my plugin.
I made no changes to the files.

I generated my document, and bold was back for both tags, but the <b> tag alone was not generated.
I don't understand why I needed to add the files to my plugin to make it work. I am pretty sure that adding files to the customization that are not customized is not a best practice. I can only think that somewhere in my customization, I was overriding something in the tags definition. That makes a lot of unknown to easily troubleshoot. :wink: I played around with the files, and commented out the <ph> tag from the customs.xsl file, and the <b> tag was generated again, without breaking anything else.I know, not a good idea.

In any case, your instructions gave me a much better understanding of the CSS and help in identifying the problem.
Thanks.

Carole
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Re: Bold not rendered

Post by Boreas »

Just a quick note, to say that <b> alone is genereated even if I don't comment out the <ph>.

Sorry for the confusion.

Carole
Post Reply