Name

cx:mathml-to-svg — Draws diagrams with mathml-to-svg.

Synopsis

Input portPrimarySequenceContent types
source✔  xml 
Output portPrimarySequenceContent types
result✔   
Option nameTypeDefault value
parametersmap(xs:QName, item()*)?()
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
  |   <p:input port="source" content-types="xml"/>
  |   <p:output port="result"/>
  |   <p:option name="parameters" as="map(xs:QName, item()*)?"/>
5 |</p:declare-step>

Description

The cx:mathml-to-svg step uses JEuclid to convert MathML to SVG.

Note

The actual implementation used is version 3.1.14 of a modern fork of JEuclid that supports recent versions of Java and the underlying Batik libraries.

Example

The equation rendered in Figure 1, “Example MathML converted to SVG” is one of the more interesting (looking) examples from the Mozilla MathML torture test.

Figure 1Example MathML converted to SVG

Correct rendering of Figure 1, “Example MathML converted to SVG” relies on support for SVG in your user agent. If your user agent also supports MathML, it can render the equation directly, as (possibly) shown in Figure 2, “Example MathML”.

det ( A ) = σ S n ϵ ( σ ) i = 1 n a i , σ i
Figure 2Example MathML