MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MathML Namespace + Mathematica

At 04:19 AM 1/28/2004, Florian Huber wrote:
>I like to use the Export-Mode HTML+MathML in Mathematica 5.0.
>It would be great to use the MathPlayer from Design Science to show the
>But there is one problem: Is far as I know, do I have to put the namespace
>m: to all MathML-Tags.
>Is there an export option in HTMLSave in Mathematica to fix this?
>F. Huber

The XHTML+MathML format uses the "Universal Style Sheet" provided by the 
W3C. It renders in several browsers (including IE with MathPlayer). See

One common mistake is that the document must be parsed as an XML file. This 
means you should use the .xml extension, not .html or .htm.

If for some reason the default MathML output doesn't fit your needs, there 
are options for controlling the MathML. It takes the form

Export["file.xml", expr, "XHTML+MathML",
   ConversionOptions -> {"MathMLOptions" -> mathmlopts}]

Where expr is the thing you are exporting (like a NotebookObject).

And mathmlopts are the options that you want to apply to the MathML. These 
are listed in the MathML documentation (AddOns&Links>XML Capabilities). To 
prefix the tags with "m:", mathmlopts would be

{"NamespacePrefixes" -> {""; -> "m"}}

Or if you want to use the menu item, you can use SetOptions and the menu 
will inherit the setting.

SetOptions[Export, ConversionOptions -> {"MathMLOptions" ->
   {"NamespacePrefixes" -> {""; -> "m"}}}]


  • Prev by Date: Re: Mathematica fonts in LaTeX
  • Next by Date: Re: Baffled By Underscore Pattern Matching
  • Previous by thread: Re: Mathematica fonts in LaTeX
  • Next by thread: Re: MathML Namespace + Mathematica