Composing to HTML with MathFlow in Arbortext's Publishing Engine
Applicability
The information on this page applies to: | |
---|---|
MathFlow 1.x-2.x for Arbortext | Arbortext Publishing Engine (APE) or E3 5.x or later |
Issue
Arbortext Publishing Engine (formerly Enterprise E-Content Engine (E3)) is a publishing server that automatically converts XML to multiple types of media—Web, print, PDF, HTML Help, wireless and more. MathFlow is integrated with most of Publishing Engine's uses. However, since no interactive dialogs can be used from Publishing Engine, and since the output often involves many files, there are some special steps to take for using MathFlow with Publishing Engine's default 'convert' function when generating HTML (PDF composition can be done as usual with APE) from doctypes using MathFlow to handle their MathML.
Choosing the output type
The first issue is that MathFlow allows for three different kinds of rendering for mathematical formulas when generating HTML:
Images
MathPlayer
Universal Math StyleSheet (umss)
To indicate which kind of output you want from Arbortext Publishing Engine, you have to assign the corresponding value to the variable $mathml::e3HTMLOutput
in the <custom-path>/scripts/mathml_user.acl
file.
For example: $mathml::e3HTMLOutput = "umss";
Valid values are images (default), mathplayer and umss. The mathml_user.acl file needs to be created if it does not yet exist.
Format Options
In addition, the request URL should pass some specific options, depending on the desired rendering format of images, mathplayer or umss:
images - Since this output contains several files, you should pass a
zip-output=yes
pair to the request URL. Also, the files will get copied to a directory (inside the zip file) called according to the value given to zip-graph-dir (for example,zip-graph-dir=external_files
). Note that this directory name should not include a dot (it throws off the javascript). In particular, the default scheme (filename.files) does not work, so this option is also required.Example (will vary depending on user/system configuration):
http://localhost:8080/e3/servlet/e3?file=$aptpath/custom/doctypes/axdocbook_math/demo.xml&type=html&zip-output=yes&zip-graph-dir=external_files&f=convert
mathplayer - This is the simplest of the three cases; no special considerations are required. But remember, the output file only works for IE6+MathPlayer.Example:
http://localhost:8080/e3/servlet/e3?file=$aptpath/custom/doctypes/axdocbook_math/demo.xml&type=html&f=convert
umss - In addition to the considerations for images, if one wants to use umss output, it is important to also add to the request
zip-root=<fname>.xml
. The output should actually be an xml file (not html), so the name of the file could be anything, but the extension should be .xml.Example:
http://localhost:8080/e3/servlet/e3?file=$aptpath/custom/doctypes/axdocbook_math/demo.xml&type=html&zip-output=yes&zip-graph-dir=external_files&zip-root=e3out.xml&f=convert
We hope this has been helpful. As always, please let us know if you have questions about this, or if you have additional techniques that work. We'd love to hear from you.