<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_plain.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m11032">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Using Mathematica to Output MathML</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:bib="http://bibtexml.sf.net/">2.5</md:version>
  <md:created xmlns:bib="http://bibtexml.sf.net/">2003/01/29</md:created>
  <md:revised xmlns:bib="http://bibtexml.sf.net/">2004/07/13 15:30:32.960 GMT-5</md:revised>
  <md:authorlist xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:bib="http://bibtexml.sf.net/" id="jago">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Adan</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Galvan</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">jago@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="jago">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Adan</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Galvan</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">jago@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">content mathml</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">mathematica</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">mathml</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:bib="http://bibtexml.sf.net/">This module shows how to use Mathematica to output content MathML for use in Connexions modules.</md:abstract>
</metadata>



  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="intro">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Introduction</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="para1">
	In short, <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://www.wolfram.com/">Mathematica</link> is a powerful math program that can be used to
	manipulate, evaluate, and solve mathematical equations. One of
	the features new to recent versions of Mathematica is the ability to output
	MathML. This includes the support of content MathML as
	well as presentation MathML. This document will show you how
	to use Mathematica to output content MathML to input into
	<link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu/technology/cnxml/">CNXML</link>
	documents.
        <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="warning">
            This method of creating content MathML only works in Mathematica 4.2 and above.  We recommend you use at least version 5.0.
          </note>

      </para>
    </section>
    
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="notebook">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Mathml Content Notebook</name>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="nb_para">
	I have created a simple MathML notebook that anyone can use to
	set up Mathematica to output content MathML. The sample notebook is available as <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="content_mathml.nb">a download from this module</link>.
      </para>
      
      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="using">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Using the Notebook</name>

	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="using_p">
	  There are a few steps you will have to follow to use the
	  notebook:

	  <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="steps_list" type="enumerated">
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Start Mathematica</item>
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Load the content_MathML.nb by clicking the
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">file -&gt; open..</code> menu option.</item>
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Evaluate the notebook by clicking the
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Kernel -&gt; Evaluation -&gt; Evaluate
	    Notebook</code> menu option.
	    </item>
	  </list>
          Evaluating the notebook actually sets the options that we need. If you do not evalute the notebook, the options will not be set.	
	  Once you have followed these steps and ensured that there
	  are no errors, you can proceed to the next step.
         <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="note">
           This document does not have any operating-system-specific info. For example, there will be no info on how to start Mathematica since this varies depending on what operating system the user is working with.
          </note>
        
	</para>
      </section>

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="creating_matml">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Exporting Content Mathml</name>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="createMathML">
	  Follow the instructions below to use Mathematica palettes:

	  <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="palettes">
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Open the palette by clicking the <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">File -&gt;
	    Palettes-&gt; Basic Input</code> menu option. (If it is not already open on startup.)</item>
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Build the equation you wish to export into MathML
	    using the palette.</item>
	  </list>
	  </para>
	
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="export_p">
	  Now that you have created the equation using whatever method
	  you have chosen, it is time to export the equation as
	  MathML.

	  <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="export" type="enumerated">
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Highlight the equation you wish to export</item>
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Copy the equation as MathML by clicking the
	      <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">edit -&gt; copy as -&gt; MathML</code> menu
	      option.(This will put the equation into a buffer that you will not see!)</item>
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Paste the equation in the appropriate place in your
	      CNXML document</item>
	  </list>
	  
	  That's it! You now have content MathML embedded into your
	  CNXML document.
	</para>
      </section>

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="lookfor">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Problems to Look Out For</name>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="prob1">
	  There may be a few differences in the format of the math
	  that comes out of Mathematica. Following is a list of
	  possible problems to look out for. This list will be updated
	  as problems are found.
	  
	<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="prob_list">
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">If you plan to have your equations numbered you will
	    need to have the MathML inside of an <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" document="m9006" target="equation">equation</cnxn> tag.
	  </item>
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">When exporting an equation that has a radical, the exported math will not use the root tag, but instead will export math with a power. For example, if you attempt to export the square root of two, the resulting MathML will be two to the one-half power.
          </item>
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">You may need to delete the extraneous <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">xmlns:mathematica</code> and <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">mathematica:form</code> attributes from the MathML output.</item>
          
	</list>

	  If you encounter a problem contact techsupport@cnx.rice.edu.
	</para>
      </section>
    </section>
	      
	  

  </content>
  
</document>
