Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

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


  • 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