MathML import/export for the
TI-89/92+

Version
1.01

Author: Bhuvanesh Bhatt (bbhatt1@towson.edu)

Last updated: October 13, 2001

MathML v2.0 is
a standard specification by the W3C for
representing mathematical expressions. Members of the Math Working Group
include Wolfram Research, Design Science, IBM, Adobe, Microsoft, and the American Mathematical Society. It is based on
the popular XML, and has several advantages over traditional methods of
mathematics communication:

·
It
can be rendered in any web browser that has adequate stylesheet support.
Currently, several vendors such as IBM
and Design Science
offer plug-ins to render MathML in web browsers, and both Internet Explorer and
Netscape plan to support MathML.

·
Expressions
and subexpressions can be copied and pasted (imported) into a computer algebra
system such as Mathematica
or the TI-89/92+
for evaluation, and the results can be posted back to the Web.

·
Voice
synthesis software can use the semantics of MathML to render math expressions
(math can be accessible to the visually impaired).

·
MathML
can encode both presentation (notation) and content (semantic) information.
Content MathML uses default notation.

This package currently does only export of TI-89/92+
expressions to content MathML, but I plan to add a program for importing MathML
as well. Thanks to E.W. for his help with this program.

Usage:

1.
In the home screen,
evaluate: MMLExp(expression-string[, textvar])

The textvar argument is optional.

For example: MMLExp("sin(x)+cos(x)") or MMLExp("x^2",
"mathml\powtest")

2.
The program will write
to the mathml\mmldata text variable (or the specified variable). The variable’s
contents, if any, will be overwritten. Any errors will be shown in the text
variable, and the last error will be shown in the status bar.

3.
Transfer the text
variable to a computer via GraphLink (if the conversion was successful).

4.
Open the text variable
in a text editor. On Windows, try Wordpad instead of Notepad for better
line-break formatting.

5.
Delete the first three
lines and the last line. What remains is the generated MathML. You can now
embed it in XHTML code, keep it as a standalone MathML (**.**mml) file, or
paste the part <math>…</math> into a computer algebra system like Mathematica^{Ò}.

Format for standalone MathML file:

<?xml
version="1.0"?>

<!DOCTYPE math PUBLIC
"-//W3C//DTD MathML 2.0 //EN"
"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">

<math
xmlns="http://www.w3.org/1998/Math/MathML">

...

</math>

How to embed MathML into XHTML:

<?xml
version="1.0"?>

<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">

<html
xmlns="http://www.w3.org/1999/xhtml">

<body>

<p>

<math>...</math>

</p>

</body>

</html>

What’s New:

·
Added XML header
information (DTD specification etc.)

·
Added an optional
argument for specifying the text variable to use

·
Program now returns the
name of the text variable if conversion was successful, and undef otherwise

·
Program no longer tries
to open the text variable

·
Changed vector
conversion so that column vectors are called <vector>

·
The <fn> tag has been deprecated, so it was removed

·
Added statistics tags

·
Added <inverse>
tag for matrix^{-1}

·
The floating point
number 0.57721566490153 is translated to <eulergamma/>

·
Added <cn type=…>
attributes

·
Variables containing
Greek characters are now exported correctly (Unicode)

Major things remaining to be implemented:

·
Add <cn
type="complex-cartesian"> attribute for complex numbers

·
Piecewise-defined
functions (WHEN_TAG)

·
Trig tags that are not built-in (csc/sec/cot/csch/sech/coth and their inverses)

·
Hex and Bin (ExtTags) –
for other (unsupported) ExtTags, maybe use error format TagsVal:ExtTagsVal

·
Generating MathML from a
text variable, including both text and expressions (using control characters to
distinguish them)

·
Build tag dictionary
(may scrap it if it increases filesize)

·
Exporting presentation
MathML (using “boxed RPN” information from AMS)

·
Importing content MathML

More examples:

When pasted into Mathematica^{Ò} 4.1, MathML looks like
this:

Here is what MathML currently looks like in
IBM’s techexplorer^{Ò}:

Disclaimer and copyright:

This software product is provided as-is, with no warranties or claims
of merchantability or fitness for a particular purpose. The author is not
responsible for any damages to your calculator. The product may be freely
distributed as long it is distributed as a whole, without any modification.

NOTICE: This product is not endorsed by Texas Instruments Incorporated. The owner of the product is solely
responsible and liable for any content or goods. Texas Instruments Incorporated (“TI”) makes no representation
with respect to the suitability of this product. In no event shall TI or its licensees be liable for any damages
whatsoever, including special, indirect or consequential damages, arising out
of or in connection with the use of this product.

Mathematica is a trademark of Wolfram Research, Inc.

MathML is a trademark of the W3C.

techexplorer is a trademark of IBM Corporation.

Copyright Ó 2001 Bhuvanesh Bhatt.

[†] TI is a licensed trademark of Texas Instruments Inc. All other trademarks are the property of their owners.