Re: MathML Namespace + Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg46082] Re: [mg45863] MathML Namespace + Mathematica*From*: Dale Horton <daleh at wolfram.com>*Date*: Thu, 5 Feb 2004 04:03:01 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

At 04:19 AM 1/28/2004, Florian Huber wrote: >Hi, > >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 >equations. > >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? > >Regards > >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 http://www.w3.org/Math/XSL/ 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" -> {"http://www.w3.org/1998/Math/MathML"; -> "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" -> {"http://www.w3.org/1998/Math/MathML"; -> "m"}}}] -Dale