Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg46090] Re: [mg45863] MathML Namespace + Mathematica
  • From: Murray Eisenberg <murray at>
  • Date: Thu, 5 Feb 2004 04:03:09 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <>
  • Reply-to: murray at
  • Sender: owner-wri-mathgroup at

Are you sure about the .xml extension?  Mozilla (1.5, under Windows XP
and with the appropriate math fonts installed) seems to choke on it:
Trying to load such a page with extension .xml immediately crashes Mozilla!

Here's the entire Notebook expression for the .nb file I started with:

     \(\[Integral]\_0\%\[Pi]\( x\^2\) \[DifferentialD]x\)], "Input"]
FrontEndVersion->"5.0 for Microsoft Windows",
ScreenRectangle->{{0, 1280}, {0, 979}},
WindowSize->{496, 740},
WindowMargins->{{0, Automatic}, {Automatic, 0}},

And here's the entire .xml file generated by Save As Special...XML 

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="HTMLFiles/pmathml.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<!-- This HTML document was created by converting a Mathematica notebook 
using Export. -->

<html xmlns=""; class="Notebook">

<head >

<link href="HTMLFiles/Default.css" rel="stylesheet" type="text/css" />


<p class="Input">
  <math xmlns=''>

<hr />
<p style='font-family: Helvetica; font-size: 8pt'>Created by
<a href="";><span style='font-style: 
&nbsp;(February 4, 2004) </p>



Dale Horton wrote:

> 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 
> 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"}}}]
> -Dale

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: Simple Differentiation?
  • Next by Date: Re: how to run a shell command in mathematica?
  • Previous by thread: Re: MathML Namespace + Mathematica
  • Next by thread: time serie -> sum inside a loop