Loading ...
Sorry, an error occurred while loading the content.

java code highlight in DITA OT PDF output

Expand Messages
  • Igor Jacy Lino Campista
    Hi there, I have been evaluating the plugin *qwcode.dita.ot.plugins.highlight* (http://bitbucket.org/qwcode/dita.ot.plugins.highlight/wiki/Home) and found it
    Message 1 of 4 , Apr 18 2:15 PM
    View Source
    • 0 Attachment
      Hi there,

      I have been evaluating the plugin qwcode.dita.ot.plugins.highlight  (http://bitbucket.org/qwcode/dita.ot.plugins.highlight/wiki/Home)
      and found it quite nice. (supports only XHTML though)

      It is based on the library xslthl (https://sourceforge.net/projects/xslthl/)

      I was reading other projects, mainly docbook-related, and found that the docbook FO-based has PDF output with highlight also based on xslthl. (https://svn.apache.org/repos/asf/click/trunk/tools/docbook/README.txt). So I became intriged.

      I have been trying myself but I just have had not enough luck (mostly due to my lack of skills/understanding of the DITA OT processing, and also but not least, XSL )

      This is what I have done so far:

      1) modified qwcode.highlight/plugin.xml and added

      <feature extension="dita.xsl.xslfo" value="src/dita.xsl.pdf.xsl" type="file"/>

      2) duplicated qwcode.highlight/src/*.xsl from xhtml to pdf

      For updating qwcode.highlight/src/highlight_pdf.xsl   I guided myself using http://docbook.sourceforge.net/release/xsl/current/fo/highlight.xsl

      3) workaround compilation problems because saxon declarations in qwcode.highlight/src/xslthl.xsl , I commented them out.

      4) replaced <pre> by <fo:block>   (as suggested by http://services.renderx.com/lists/xep-support/2161.html)


      The DITA OT when through but no effect was visible.
      My target is to enable highlight for PDF output using Apache FOP.

      Has anybody done something similar?


      Best regards,
      Igor Lino
    • qwcode
      Igor and Everyone: Since Igor asked about it recently (see email below), I have released an extension to the Idiom FO plugin for highlighting source code.
      Message 2 of 4 , May 8, 2010
      View Source
      • 0 Attachment
        Igor and Everyone:
        Since Igor asked about it recently (see email below), I have released an
        extension to the Idiom FO plugin for highlighting source code. It's
        similar to my plugin for Xhtml, but for pdfs instead. It also uses
        Xslthl. Here's the link to the download and instructions:

        http://bitbucket.org/qwcode/dita.ot.plugins.highlight-pdf/wiki/Home

        I rarely generate PDF personally, so any feedback is appreciated. The
        main hurdle I found in doing this was that the Idiom FO plugin (the
        default pdf plugin) is not extensible by any plugin extension points
        like the rest of the toolkit, but rather has it's own mechanism for
        extension. I imagine it will get integrated at some point.

        Marcus
        http://qwcode.com



        > Hi there,
        >
        > I have been evaluating the plugin qwcode.dita.ot.plugins.highlight
        > (http://bitbucket.org/qwcode/dita.ot.plugins.highlight/wiki/Home)
        > and found it quite nice. (supports only XHTML though)
        >
        > It is based on the library xslthl
        > (https://sourceforge.net/projects/xslthl/)
        >
        > I was reading other projects, mainly docbook-related, and found that
        > the docbook FO-based has PDF output with highlight also based on
        > xslthl.
        > (https://svn.apache.org/repos/asf/click/trunk/tools/docbook/README.txt). So I became intriged.
        >
        > I have been trying myself but I just have had not enough luck (mostly
        > due to my lack of skills/understanding of the DITA OT processing, and
        > also but not least, XSL )
      • Igor Jacy Lino Campista
        Hi Marcus, Really great news. That is definitively a very good feature for the PDF output. I will test it in the coming week with some production document.
        Message 3 of 4 , May 9, 2010
        View Source
        • 0 Attachment
          Hi Marcus,

          Really great news. That is definitively a very good feature for the PDF output.  I will test it in the coming week with some production document.

          Maybe we can raise a feature request for DITA OT, if there is something that can be done or improve the DITA OT extensions. (I would have expected that XHTML and PDF have same extension structure)

          Cheers,
          Igor


          On 09.05.2010 06:39, qwcode wrote:
           

          Igor and Everyone:
          Since Igor asked about it recently (see email below), I have released an
          extension to the Idiom FO plugin for highlighting source code. It's
          similar to my plugin for Xhtml, but for pdfs instead. It also uses
          Xslthl. Here's the link to the download and instructions:

          http://bitbucket. org/qwcode/ dita.ot.plugins. highlight- pdf/wiki/ Home

          I rarely generate PDF personally, so any feedback is appreciated. The
          main hurdle I found in doing this was that the Idiom FO plugin (the
          default pdf plugin) is not extensible by any plugin extension points
          like the rest of the toolkit, but rather has it's own mechanism for
          extension. I imagine it will get integrated at some point.

          Marcus
          http://qwcode. com

          > Hi there,
          >
          > I have been evaluating the plugin qwcode.dita. ot.plugins. highlight
          > (http://bitbucket. org/qwcode/ dita.ot.plugins. highlight/ wiki/Home)
          > and found it quite nice. (supports only XHTML though)
          >
          > It is based on the library xslthl
          > (https://sourceforge .net/projects/ xslthl/)
          >
          > I was reading other projects, mainly docbook-related, and found that
          > the docbook FO-based has PDF output with highlight also based on
          > xslthl.
          > (https://svn. apache.org/ repos/asf/ click/trunk/ tools/docbook/ README.txt). So I became intriged.
          >
          > I have been trying myself but I just have had not enough luck (mostly
          > due to my lack of skills/understandin g of the DITA OT processing, and
          > also but not least, XSL )


        • Igor Lino
          Hi Marcus, Got it working....Works like charm! My production document looks visibly much better. Thank you so much. I will mention and write your name &
          Message 4 of 4 , May 21, 2010
          View Source
          • 0 Attachment
            Hi Marcus,

            Got it working....Works like charm! My production document looks visibly much better. Thank you so much. I will mention and write your name & project link in a couple of slides when I present the changes.

            I raised a feature request in DITA OT at https://sourceforge.net/tracker/index.php?func=detail&aid=3005258&group_id=132728&atid=725077
            for improving the integration.

            Cheers,
            Igor

            -------- Original-Nachricht --------
            > Datum: Mon, 10 May 2010 00:10:49 +0200
            > Von: Igor Jacy Lino Campista <icampista@...>
            > An: dita-users@yahoogroups.com, dita-ot-developer@...
            > CC: qwcode <qwcode@...>
            > Betreff: Re: [dita-users] FO extension for highlighting source code in pdfs

            > Hi Marcus,
            >
            > Really great news. That is definitively a very good feature for the PDF
            > output. I will test it in the coming week with some production document.
            >
            > Maybe we can raise a feature request for DITA OT, if there is something
            > that can be done or improve the DITA OT extensions. (I would have
            > expected that XHTML and PDF have same extension structure)
            >
            > Cheers,
            > Igor
            >
            >
            > On 09.05.2010 06:39, qwcode wrote:
            > >
            > > Igor and Everyone:
            > > Since Igor asked about it recently (see email below), I have released an
            > > extension to the Idiom FO plugin for highlighting source code. It's
            > > similar to my plugin for Xhtml, but for pdfs instead. It also uses
            > > Xslthl. Here's the link to the download and instructions:
            > >
            > > http://bitbucket.org/qwcode/dita.ot.plugins.highlight-pdf/wiki/Home
            > > <http://bitbucket.org/qwcode/dita.ot.plugins.highlight-pdf/wiki/Home>
            > >
            > > I rarely generate PDF personally, so any feedback is appreciated. The
            > > main hurdle I found in doing this was that the Idiom FO plugin (the
            > > default pdf plugin) is not extensible by any plugin extension points
            > > like the rest of the toolkit, but rather has it's own mechanism for
            > > extension. I imagine it will get integrated at some point.
            > >
            > > Marcus
            > > http://qwcode.com <http://qwcode.com>
            > >
            > > > Hi there,
            > > >
            > > > I have been evaluating the plugin qwcode.dita.ot.plugins.highlight
            > > > (http://bitbucket.org/qwcode/dita.ot.plugins.highlight/wiki/Home
            > > <http://bitbucket.org/qwcode/dita.ot.plugins.highlight/wiki/Home>)
            > > > and found it quite nice. (supports only XHTML though)
            > > >
            > > > It is based on the library xslthl
            > > > (https://sourceforge.net/projects/xslthl/
            > > <https://sourceforge.net/projects/xslthl/>)
            > > >
            > > > I was reading other projects, mainly docbook-related, and found that
            > > > the docbook FO-based has PDF output with highlight also based on
            > > > xslthl.
            > > >
            > > (https://svn.apache.org/repos/asf/click/trunk/tools/docbook/README.txt
            > >
            > <https://svn.apache.org/repos/asf/click/trunk/tools/docbook/README.txt>).
            > > So I became intriged.
            > > >
            > > > I have been trying myself but I just have had not enough luck (mostly
            > > > due to my lack of skills/understanding of the DITA OT processing, and
            > > > also but not least, XSL )
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.