[oXygen-user] Configuring OT's FOP To Render MathML
Oxygen XML Editor Support
support at oxygenxml.com
Tue Jan 7 05:04:39 CST 2014
Hi Eliot,
The jar files that you added in the pdf2/fop/lib dir are not
automatically loaded by the ANT process started from command line. I
think that is true also for the PDF generation step (the FO -> PDF
transformation) performed by FOP, regardless how the transformation was
started. The JEuclid jar files have to be added to the classpath and
that is what the -lib parameters do in the Oxygen command that runs the
DITA transformation in the Oxygen application.
FOP delegates MathML processing to JEuclid (which is a FOP plugin) if it
finds it in the classpath. If FOP does not find a FOP plugin for the
MathML content you get the error about unrecognized MathML markup.
JEuclid can handle inline MathML markup in the FO document exactly as
you have it (inside <fo:instream-foreign-object> elements) so you should
just add the two JEuclid jar files explicitly to the ANT classpath, for
example as -lib parameters to the Java command that starts the ANT process.
Best regards,
Sorin
http://www.oxygenxml.com
Eliot Kimber wrote:
> Using Oxygen 15.1 with the 1.6.3 OT with FOP 1.1 manually installed into
> the pdf2 plugin, and given DITA docs with MathML and a plugin that outputs
> the MathML as markup within fo:instream-foreign-object elements, if I run
> the OT PDF transform from within Oxygen, then FOP renders the MathML
> nicely.
>
> If I run the same transform from the command line from within a
> startCmd.sh-created environment, e.g.:
>
> bash-3.2$ ant -lib "/Applications/oxygen/lib/xml-apis.jar" -lib
> "/Applications/oxygen/lib/xercesImpl.jar" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT" -lib
> "/Applications/oxygen/lib/commons-io-1.3.1.jar" -lib
> "/Applications/oxygen/lib/commons-logging-1.1.1.jar" -lib
> "/Applications/oxygen/lib/log4j.jar" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT/lib/dost-patches.jar" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT/lib" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT/lib/dost.jar" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT/lib/commons-codec-1.4.jar"
> -lib "/Applications/oxygen/lib/jing.jar" -lib
> "/Applications/oxygen/lib/saxon9ee.jar" -lib
> "/Applications/oxygen/lib/saxon.jar" -lib
> "/Applications/oxygen/lib/xmlgraphics-commons-1.5.jar" -lib
> "/Applications/oxygen/lib/fop.jar" -lib
> "/Applications/oxygen/lib/batik-all-1.7.jar" -lib
> "/Applications/oxygen/lib/xml-apis-ext.jar" -lib
> "/Applications/oxygen/lib/avalon-framework-4.2.0.jar" -lib
> "/Applications/oxygen/lib/jeuclid-core.jar" -lib
> "/Applications/oxygen/lib/jeuclid-fop.jar" -lib
> "/Applications/oxygen/lib/jh.jar" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT/lib/jsearch.jar" -lib
> "/Applications/oxygen/lib/lucene-analyzers-common-4.0.0.jar" -lib
> "/Applications/oxygen/lib/lucene-core-4.0.0.jar" -lib
> "/Applications/oxygen/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp
> /lib/xhtml-indexer.jar" -f
> "/Applications/oxygen/frameworks/dita/DITA-OT/build.xml"
> "-Dtranstype=pdf2"
> "-Dbasedir=/Users/ekimber/workspace_40/omics-plugin/temp/MathML-Test"
> "-Doutput.dir=/Users/ekimber/workspace_40/omics-plugin/temp/MathML-Test/out
> /pdf" "-Dwebhelp.trial.license=no"
> "-Ddita.temp.dir=/Users/ekimber/workspace_40/omics-plugin/temp/MathML-Test/
> temp/pdf" "-Dpdf.formatter=fop"
> "-Ddita.dir=/Applications/oxygen/frameworks/dita/DITA-OT"
> "-Dretain.topic.fo=yes" "-Dclean.temp=no" "-Dxep.failOnError=true"
> "-Dargs.input=/Users/ekimber/workspace_40/omics-plugin/temp/MathML-Test/Mat
> hML-Test.ditamap" "-DbaseJVMArgLine=-Xmx384m"
>
> The process runs and I don’t get any FOP messages about the math, but the
> equations are not rendered.
>
>
> I noticed that Oxygen includes the jeuclid-core and jeuclid-fop jars and I
> tried copying those into the pdf2/fop/lib dir.
>
> If I run the normal Toolkit process without the Oxygen-defined -lib
> options (meaning it’s using the class path defined by the startCmd.sh)
> then FOP complains about the MathML markup as being unrecognized, even
> with the JEuclid libraries present (which suggests that the Toolkit’s Ant
> process is not automatically loading the libraries).
>
> Likewise, if I run the fop shell agains the FO file I get the same MathML
> complaints.
>
> I verified that both the Oxygen-supplied FOP jar and the one in my OT are
> 1.1, e.g.:
>
> contrext01:fop ekimber$ java -jar /Applications/oxygen/lib/fop.jar -v
> FOP Version 1.1
>
>
> contrext01:fop ekimber$ java -jar build/fop.jar -v
> FOP Version 1.1
>
>
> So I’m at a bit of a loss as to how Oxygen is getting the result I want
> and what I need to do to get that same result outside of Oxygen.
>
> What am I missing?
>
> Thanks,
>
> Eliot
>
> —————
> Eliot Kimber, Owner
> Contrext, LLC
> http://contrext.com
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
More information about the oXygen-user
mailing list