How to integrate syntax highlighting with PDF customization plugin?

Frank Ralf
Posts: 350
Location: Hamburg

How to integrate syntax highlighting with PDF customization plugin?

Tue May 02, 2017 6:56 pm

Hi,

The syntax highlighting DITA-OT plugin "com.oxygenxml.highlight" works like a charm when using the standard PDF transformation. However, we are using a customization DITA-OT plugin on top of the "org.dita.pdf2" plugin: <require plugin="org.dita.pdf2"/> but the syntax highlighting doesn't get through. From the above mentioned blog post I recognize that I probably have to use and/or reference those topic2fo_shell_xxx.xsl files. How do I do this? Any pointers welcome.

tia
Frank
Frank Ralf
parson AG
www.parson-europe.com
Radu
Posts: 5379

Re: How to integrate syntax highlighting with PDF customization plugin?

Wed May 03, 2017 2:02 am

Hi Frank,

Not sure, if you send us the custom PDF plugin we could try to take a look at it. Possibly in your PDF plugin you added your own "topic2fo_shell" which instead of the original ones no longer defines extension points...
By the way, right now according to its licensing (see its plugin folder) this particular plugin is only free to use when publishing from Oxygen, otherwise when used outside you need to buy a separate webhelp license (even if you only need it for PDF).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 350
Location: Hamburg

Re: How to integrate syntax highlighting with PDF customization plugin?

Wed May 03, 2017 1:29 pm

Hi Radu,

Thanks for the quick reply. I will have a closer look at our plugin and report back.

And yes, I've seen the licensing file in the plugin folder and will keep that in mind.

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Frank Ralf
Posts: 350
Location: Hamburg

Re: How to integrate syntax highlighting with PDF customization plugin?

Wed May 03, 2017 3:38 pm

Hi Radu,

It was just a matter of adding the following line to our plugins/com.parson.pdf2/Customization/fo/xsl/custom.xsl file:

Code: Select all

<xsl:import href="../../../../com.oxygenxml.highlight/pdfHighlight.xsl"/>


Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Frank Ralf
Posts: 350
Location: Hamburg

Re: How to integrate syntax highlighting with PDF customization plugin?

Wed May 03, 2017 4:18 pm

Just a follow-up question: Is it possible to overwrite the highlighter files in DITA-OT/plugins/com.oxygenxml.highlight/highlighters/ from within our customization plugin? If not, that's no problem as we distribute the whole DITA framework and could configure the highlighters in the Highlight plugin itself.

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Radu
Posts: 5379

Re: How to integrate syntax highlighting with PDF customization plugin?

Wed May 03, 2017 10:49 pm

Hi Frank,

If you have a better idea about how we can make the plugin more extendable by customizers, we can try to improve it.
What do you mean by "highlighter files"? The XML configuration files for each programming language? The XSLT stylesheet "commons.xsl" seems to refer to them relative to the place where the 'commons.xsl' is placed.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 350
Location: Hamburg

Re: How to integrate syntax highlighting with PDF customization plugin?

Thu May 04, 2017 6:33 pm

Hi Radu,

I mean configuring the color scheme(s). I will have a look and report back. Thanks for the pointers.

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests