Martin Goik wrote:
>
> Is there a way to generate pdf output via RenderX's Xep processor from
> docbook5 embedded MathML? So far the examples being presented use a
> current Version of Apache FOP.
>
Sure, but this require slightly modifying the process command called
db5.toPS found in XXE_install_dir/addon/config/docbook5/xslMenu.incl as,
unlike FOP+JEuclid or Antenna House, XEP does not natively support MathML.
I've attached the modified xslMenu.incl (XXE v4.2.0) to this email.
Note how the process command below converts all the MathML, whether
embedded or referenced using attribute fileref, to SVG (as recommended
by RenderX). This conversion is of course performed using the JEuclid
immage toolkit plug-in.
---
<command name="db5.toPS">
<process>
<mkdir dir="resources" />
<mkdir dir="raw" />
<copyDocument to="__doc.xml">
<cfg:extract xmlns=""
xmlns:db5="http://docbook.org/ns/docbook"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xpath="//db5:imagedata/mml:math" toDir="raw" >
<cfg:attribute name="fileref"
value="resources/{$url.rootName}.svg" />
</cfg:extract>
<cfg:extract xmlns=""
xmlns:db5="http://docbook.org/ns/docbook"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xpath="//db5:equation/mml:math |
//db5:informalequation/mml:math |
//db5:inlineequation/mml:math" toDir="raw" >
<db5:imagedata fileref="resources/{$url.rootName}.svg" />
</cfg:extract>
<resources match="(https|http|ftp)://.*" />
<!-- Support for textdata/@fileref.
add your favorite text file extensions here: -->
<resources
match=".+\.(txt|text|htm|html|xml|h|c|cpp|java|js|tcl|py|pl|rb)"
copyTo="." />
<resources match="(?:.+/)?(.+)\.(png|jpg|jpeg|gif|svg|svgz%1)"
copyTo="resources" referenceAs="%w/resources/$1.$2" />
<resources match="(?:.+/)?(.+)\.mml"
copyTo="raw" referenceAs="%w/resources/$1.svg" />
<resources match="(?:.+/)?(.+)\.tex"
copyTo="raw" referenceAs="%w/resources/$1.%0" />
<resources match="(?:.+/)?(.+)\.(\w+)"
copyTo="raw" referenceAs="%w/resources/$1.png" />
<resources match="(?:.+/)?(.+)"
copyTo="resources" referenceAs="%w/resources/$1" />
</copyDocument>
<convertImage from="raw/*.mml" to="resources" format="svg" />
<convertImage from="raw" skip="mml" to="resources" format="%0 png" />
<mkdir dir="images/callouts" />
<copyProcessResources resources="xsl/images/draft.png" to="images" />
<copyProcessResources
resources="@xsl/images/callouts/png_callouts.list"
to="images/callouts" />
<transform stylesheet="xsl/fo/docbook.xsl"
file="__doc.xml" to="__doc.fo"
label="Convert to PDF, PostScript"
documentation="http://docbook.sourceforge.net/release/xsl/current/doc/fo/%{parameter.name|paper.type}.html">
<parameter name="use.extensions">1</parameter>
<!-- Cannot work and generates a lot of error messages. -->
<parameter name="graphicsize.extension">0</parameter>
<parameter name="paper.type">A4</parameter>
<parameter name="generate.toc">%2</parameter>
<parameter name="toc.section.depth">3</parameter>
<parameter name="section.autolabel">%3</parameter>
<parameter name="callout.graphics">1</parameter>
<parameter name="shade.verbatim">1</parameter>
<parameter name="ulink.show">0</parameter>
<parameterGroup name="db5.toPS.transformParameters" />
</transform>
<processFO processor="XEP" file="__doc.fo" to="__doc.%0">
<parameter name="OUTPUT_FORMAT">%0</parameter>
<parameter name="PS.LANGUAGE_LEVEL">2</parameter>
<parameterGroup name="db5.toPS.XEPParameters" />
<!-- If XEP plug-in has not been installed, try FOP plug-in. -->
<processFO processor="FOP" file="__doc.fo" to="__doc.%0">
<parameter name="renderer">%0</parameter>
<parameter name="strict-validation">false</parameter>
<parameterGroup name="db5.toPS.FOPParameters" />
</processFO>
</processFO>
</process>
</command>
---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xslMenu.incl
Type: text/xml
Size: 23194 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20090126/a48d65e8/attachment.xml