<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
           "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
>
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
math { font-family: serif; }
</style>
<title>A Tool for Content MathML Authoring</title>
</head>
<body>
<h1>A Tool for Content MathML Authoring:<br/>
Content Pseudo-TeX Translator Applet</h1>

<h2>Table of Contents</h2>

<ul>
<li>Introduction</li>
<li>1. Presentation and Content</li>
<li>2. Basics of Content MathML
<ul>
<li>2.1. Introduction to Notation</li>
<li>2.2. Excessive Verbosity of Content MathML</li>
</ul></li>
<li>3. Is TeX an Appropriate Content Notation?</li>
<li>4. A Content-Oriented TeX-Like Syntax
<ul>
<li>4.1. Familiar Elements of TeX Syntax</li>
<li>4.2. Development of Design Criteria</li>
<li>4.3. Final Design Criteria *</li>
<li>4.4. Syntactic Mapping Scheme *</li>
<li>4.5. Examples Using Content Pseudo-TeX *</li>
<li>4.6. Elements of Content MathML Not Covered by Content Pseudo-TeX *</li>
</ul></li>
<li>5. Limitations of Content Mark-up</li>
<li>6. Further Recommendations</li>
</ul>
<p>
[* Note:  Much of the material in these sections also appears in the
<a href="http://cs.jsu.edu/mcis/faculty/leathrum/mathtrans/mathtransdoc.xml">documentation page</a> 
for the translator applet.]
</p>
<p>
This article uses MathML, so it requires a MathML-enabled browswer,
such as <a href="http://www.mozilla.org">Firefox</a>
1.5 or later (<a href="http://www.mozilla.org/projects/mathml/fonts/">check</a> 
to be sure you have the math
fonts installed) or Explorer with the
<a href="http://www.dessci.com/">Design Science</a> MathPlayer
plug-in.
</p>
<h3>Links</h3>

<ul>
<li><a href="http://cs.jsu.edu/mcis/faculty/leathrum/mathtrans/mathtrans.xml">Translator applet page</a></li>
<li><a href="http://cs.jsu.edu/mcis/faculty/leathrum/mathtrans/mathtransdoc.xml">Documentation page</a></li>
</ul>

<p>
If you can read the math notation in this article, you
will be able to read the documentation page above -- it also
uses MathML.  The translator applet requires a browser with
a <a href="http://www.java.com">Java</a> 5 runtime environment.  The translator applet
page uses some special XML and DOM coding in JavaScript to accomplish
"live" rendering of the Content MathML -- this code, which complies
with W3C recommendations, works in
Firefox but not in Explorer.  The translator works without the
live rendering in Explorer, though.
</p>
<p>
<em>Update</em> (Sept. 2010):  The translator code has been rewritten
in JavaScript, so the Java runtime environment is no longer necessary.
</p>
<h2>Introduction</h2>
<p>
This article introduces the Content Pseudo-TeX translator
applet.  The applet was designed as a tool to simplify
writing Content MathML for web pages.  The applet takes
input in a "TeX-like" syntax and translates it into
strict Content MathML which can be cut and pasted directly
into pages.  This article begins by describing the motivation
for designing the applet, then gives the basic elements of
the input syntax, with examples, limitations, 
and recommendations for further work.
</p>
<h2>1. Presentation and Content</h2>
<p>
The W3C's proposed (but so far only sporadically accepted)
standard for presenting technical mathematics formulas in Web
pages is MathML, a mark-up language based on the very broad
standard known as XML, the eXtensible Mark-up Language.  MathML
is divided into two "flavors," Presentation MathML and Content
MathML.
</p>
<p>
Presentation MathML, as its name suggests, is concerned
mostly with how mathematics formulas are rendered in a Web
browser, so its elements have mostly to do with the positioning
and layout of the various operators, identifiers, and other
elements of a mathematical formula.  As such, it carries
some inherent limitations, having mostly to do with
how notation for the same mathematical entity can differ
between different contexts.
</p>
<p>
Perhaps the easiest way to see these limitations is to  consider
how mathematical notation can differ between countries or regions.
One straightforward example is the notation for intervals of
real numbers.  In the United States, the usual notation for
a closed interval of real numbers from a to b is
"[<var>a</var>,<var>b</var>],"
and an open interval is "(<var>a</var>,<var>b</var>)."
In most of Europe, Africa,
the Middle East, and India, however, an open interval is written
"]<var>a</var>,<var>b</var>[."
</p>
<p>
Ideally, an author would like to set up the MathML in such a way
that a local stylesheet can be applied to give the appropriate
notation for that region.  Stylesheet languages, such as CSS
or the newer XSLT, are quite powerful, but there are again
limitations in what a stylesheet can accomplish.
If Presentation MathML is used,
the stylesheet must try to interpret what is given as
layout information in a mathematically meaningful way in order
to decide how to transform the notation.  Consider, for example,
the ambiguity in American notation for open intervals,
as in "(<var>a</var>,<var>b</var>)," and
ordered pairs, as in "(<var>a</var>,<var>b</var>)."
How is a stylesheet, given only this layout
information, to decide which of these is intended by a particular
segment of mark-up?
</p>
<p>
The other flavor of MathML, Content MathML, is designed to address
these issues by describing mathematical entities semantically
rather than in terms of layout and presentation.  In the above
example, an open interval is described in Content MathML as
an "interval" object of type "open," with given endpoints.
This way, also, there is no ambiguity in the notation between
an open interval and an ordered pair -- an ordered pair is described
as a "list" object with two entries.
</p>
<p>
Content MathML is implemented via an XSL stylesheet which maps
the Content MathML tag set to Presentation MathML, which is then
given to the browser for rendering.  This stylesheet may be
specific to particular countries or regions, thus automatically
rendering the notation for open intervals
correctly for the region for which the stylesheet applies.
</p>
<h2>2. Basics of Content MathML</h2>

<h3>2.1. Introduction to Notation</h3>
<p>
A MathML expression must be enclosed within a
"<kbd>&lt;math&gt;...&lt;/math&gt;</kbd>" environment, similar to
using "<kbd>$</kbd>" or "<kbd>$$</kbd>"
to delimit expressions in TeX, or the LaTeX environments
"<kbd>\(</kbd>...<kbd>\)</kbd>" and
"<kbd>\[</kbd>...<kbd>\]</kbd>."  Within a
"<kbd>\&lt;math&gt;</kbd>" environment,
either Presentation MathML or Content MathML may be used, and
in some circumstances the two flavors of MathML can even
be mixed, although such usage tends to be limited to advanced
applications.
</p>
<p>
In Content MathML, all identifiers, numerals, and symbols are enclosed within
an environment: "<kbd>&lt;cn&gt;</kbd>...<kbd>&lt;/cn&lt;</kbd>"
for numerals (so you cannot simply
write "<kbd>2</kbd>" in a Content MathML expression, you must write
"<kbd>&lt;cn&gt;2&lt;/cn&gt;</kbd>"),
"<kbd>&lt;ci&gt;</kbd>...<kbd>&lt;/ci&gt;</kbd>" for identifiers
(the variable "<var>x</var>" must be represented
"<kbd>&lt;ci&gt;x&lt;/ci&gt;</kbd>"),
and "<kbd>&lt;csymbol&gt;</kbd>...<kbd>&lt;/csymbol&gt;</kbd>"
for more advanced mathematical
symbols (the contents of a "<kbd>&lt;csymbol&gt;</kbd>" environment are often
Presentation MathML markup for the advanced symbol -- this is
one of the ways in which Content MathML can be extended by mixing
it with Presentation MathML).  Content MathML does support several
stand-alone tags to represent common mathematical symbols
such as "<kbd>&lt;infinity/&gt;</kbd>" and "<kbd>&lt;pi/&gt;</kbd>."
</p>
<p>
More complicated expressions in Content MathML are composed
using prefix notation, with the operator and its arguments
expressly delimited within an
"<kbd>&lt;apply&gt;</kbd>...<kbd>&lt;/apply&gt;</kbd>" environment.
This makes a certain
sense for functions --  for example,
"<var>f</var>(<var>x</var>,<var>y</var>)" would be expressed
in Content MathML as follows:
</p>
<pre><![CDATA[<apply>
 <ci>f</ci>
 <ci>x</ci>
 <ci>y</ci>
</apply>]]></pre>
<p>
Here the first child of the "<kbd>&lt;apply&gt;</kbd>"
environment ("<kbd>&lt;ci&gt;f&lt;/ci&gt;</kbd>")
is the
function "<var>f</var>", and the other children
("<kbd>&lt;ci&gt;x&lt;/ci&gt;</kbd>" and
"<kbd>&lt;ci&gt;y&lt;/ci&gt;</kbd>")
are the arguments to "<var>f</var>,"
in this case the variables "<var>x</var>" and "<var>y</var>."
I refer to these as "children" because the whole point of using an
XML-based syntax, as MathML does, is to represent expressions
as trees -- here the "<kbd>&lt;apply&gt;</kbd>"
environment provides the parent
node in the tree, with the contents of the environment providing a
list of child nodes.
</p>
<p>
This applied prefix notation in Content MathML may make sense
for representing functions, but it is less intuitive for
representing expressions more commonly written using infix
operators, such as "<var>x</var>+<var>y</var>"
-- this must be written in Content MathML
as follows:
</p>
<pre><![CDATA[<apply>
 <plus/>
 <ci>x</ci>
 <ci>y</ci>
</apply>]]></pre>
<p>
Note here that the "<kbd>&lt;plus/&gt;</kbd>" entity, representing the
addition operator, must be the first item in the list of
children in the "<kbd>&lt;apply&gt;</kbd>" environment -- this is the prefix
notation for addition.  Content MathML supports a fairly wide
assortment of such entities to represent common functions and
operations in various fields of basic mathematics, including
basic algebra (such as the "<kbd>&lt;plus/&gt;</kbd>" entity above),
exponential and logarithmic functions (e.g. "<kbd>&lt;ln/&gt;</kbd>"),
trigonometric functions (e.g. "<kbd>&lt;sin/&gt;</kbd>"), calculus
(e.g. "<kbd>&lt;int/&gt;</kbd>"), statistics (e.g.
"<kbd>&lt;sdev/&gt;</kbd>"), set theory
(e.g. "<kbd>&lt;union/&gt;</kbd>"), and others, but these all must be used
within the context of an "<kbd>&lt;apply&gt;</kbd>" environment.  The intent of
supplying these basic operations in Content MathML is to allow
authors to represent essentially any of the expressions common
in K-12 mathematics, and even a bit further (e.g. vector
calculus, with "<kbd>&lt;div/&gt;</kbd>," "<kbd>&lt;grad/&gt;</kbd>,"
"<kbd>&lt;curl/&gt;</kbd>," etc.).
</p>
<p>
For certain operators, the list of children in the "<kbd>&lt;apply&gt;</kbd>"
environment may include "qualifiers" to the operators.  This
is how, for example, bound variables and limits for integrals
are handled in Content MathML.
For example, the integral expression below:
</p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
 <int/>
 <bvar><ci>x</ci></bvar>
 <lowlimit><cn>0</cn></lowlimit>
 <uplimit><pi/></uplimit>
 <apply>
  <sin/>
  <ci>x</ci>
 </apply>
</apply>
</math>
<p>
This would be written in Content MathML as follows:
</p>
<pre><![CDATA[<apply>
 <int/>
 <bvar><ci>x</ci></bvar>
 <lowlimit><cn>0</cn></lowlimit>
 <uplimit><pi/></uplimit>
 <apply>
  <sin/>
  <ci>x</ci>
 </apply>
</apply>]]></pre>
<p>
Here the environments "<kbd>&lt;bvar&gt;</kbd>"
(for identifying the bound variable
for the integral, i.e. the variable "<var>x</var>" for the
"<var>dx</var>" part of the
expression), "<kbd>&lt;lowlimit&gt;</kbd>" (the lower limit),
and "<kbd>&lt;uplimit&gt;</kbd>" (the upper limit) are the qualifiers for the
"<kbd>&lt;int/&gt;</kbd>" operator.  This example also demonstrates how
"<kbd>&lt;apply&gt;</kbd>" tags can be nested --
the inner "<kbd>&lt;apply&gt;</kbd>," containing
the expression for "sin(<var>x</var>)," is the last child element in the
outer "<kbd>&lt;apply&gt;</kbd>."
</p>
<p>
Some Content MathML tags also support "attributes" which can
affect both the meaning and the rendering of the expression.
One common example, following on the examples used earlier in
this article, is the
"<kbd>&lt;interval&gt;</kbd>...<kbd>&lt;/interval&gt;</kbd>" environment.
The opening "<kbd>&lt;interval&gt;</kbd>" tag can take a
"<kbd>closure</kbd>" attribute
to specify what sort of interval to represent.  For example,
the closed interval "[<var>a</var>,<var>b</var>]" would be written in Content MathML
as follows:
</p>
<pre><![CDATA[<interval closure="closed">
 <ci>a</ci>
 <ci>b</ci>
</interval>]]></pre>

<h3>2.2. Excessive Verbosity of Content MathML</h3>
<p>
Some of the examples above begin to demonstrate the most
serious drawbacks of Content MathML, though -- its excessive
verbosity and unfamiliar notational conventions for representing
even the most simple mathematical expressions.  For example,
the definite integral used in an example above can be computed
fairly easily using basic calculus techniques -- its value is
2.  Representing this equality using Content MathML now requires
using the "<kbd>&lt;equal/&gt;</kbd>" entity, which must be used within the
context of an "<kbd>&lt;apply&gt;</kbd>" environment, in prefix form, as follows:
</p>
<pre><![CDATA[<apply>
 <equal/>
 <apply>
  <int/>
  <bvar><ci>x</ci></bvar>
  <lowlimit><cn>0</cn></lowlimit>
  <uplimit><pi/></uplimit>
  <apply>
   <sin/>
   <ci>x</ci>
  </apply>
 </apply>
 <cn>2</cn>
</apply>]]></pre>
<p>
This same equality would be represented in TeX as follows:
</p>
<pre>\int_0^\pi \sin x\, dx = 2</pre>

<h2>3. Is TeX an Appropriate Content Notation?</h2>
<p>
Since Content MathML does have these problems which
directly affect its usability and acceptance, it seems
natural to ask if another mark-up notation for
mathematical formulas would address these problems,
and many authors of mathematics would immediately
suggest TeX.
As familiar as TeX may be for many people writing mathematics
for Web pages, as a mark-up language for mathematical formulas,
it presents many of the
same problems as Presentation MathML.
Indeed, especially in its syntax for formulas, it is
an inherently presentation-oriented mark-up language.
For one simple example, consider the "<kbd>^</kbd>" operator in TeX.
In some contexts, such as "<kbd>$x^2$</kbd>," it is interpreted as
an exponent; in other contexts, such as
"<kbd>$\sum_{n=1}^\infty\frac1n$</kbd>," it can interpreted as specifying
a superscript or upper limit.  In American notation, this makes
sense, since superscripts and exponents are rendered similarly,
but semantically, superscripts and exponents are fundamentally
different.  A different regional notation may require one
or the other to be rendered differently.
As such, a strict TeX syntax for mathematical formulas
will be inappropriate for content-level notation.
</p>
<p>
However, this does not imply that TeX-like syntax must be
completely abandoned in developing a content-level notation.
It simply implies that some compromises and adaptations of
the TeX syntax must be accepted in order to reach a
content-level notation with syntax familiar to TeX users.
</p>
<h2>4. A Content-Oriented TeX-Like Syntax</h2>

<h3>4.1. Familiar Elements of TeX Syntax</h3>
<p>
The syntactic elements which a TeX author would find familiar
must begin with the fundamental TeX backslash-escaped
"macro" notation, as in "<kbd>\sum</kbd>,"
"<kbd>\int</kbd>," "<kbd>\frac</kbd>," and "<kbd>\sqrt</kbd>."
Other syntactic elements in particular familiar to users
of LaTeX would include square-bracket delimited optional
arguments, as in "<kbd>\sqrt[3]{x}</kbd>,"
and environments using
"<kbd>\begin{</kbd><var>identifier</var><kbd>}</kbd>"
and "<kbd>\end{</kbd><var>identifier</var><kbd>}</kbd>."
</p>
<p>
Another important aspect for acceptance
of any proposed content-level
syntax would be support for infix notation applied to
standard binary operators and relations.
While the prefix notation with "<kbd>&lt;apply&gt;</kbd>" tags provides
Content MathML with a very high-level approach to
expressing mathematics by its meaning rather than by its
layout, that notation is the primary cause of the
excessive verbosity and unfamiliarity of its syntax.
</p>
<h3>4.2. Development of Design Criteria</h3>
<p>
To be fair, the "criteria" by which I developed
the TeX-like syntax
did go through some modifications as
I worked on the details of the syntax and the software
to translate to Content MathML.
Initially, I just felt that I wanted to keep to a concise,
TeX-like syntax which would map in a very general way directly
to Content MathML, with as little reference as possible to
particular MathML tag identifiers.  In some aspects of the
TeX-like syntax, this was pretty easy to achieve -- for
example, a TeX-like environment
"<kbd>\begin{id}</kbd>...<kbd>\end{id}</kbd>"
could map directly to a Content MathML environment
"<kbd>&lt;id&gt;</kbd>...<kbd>&lt;/id&gt;</kbd>"
without the software translator knowing
anything about the "<kbd>id</kbd>" identifier.  Similarly,
"<kbd>\id{</kbd>...<kbd>}</kbd>" could map directly to
"<kbd>&lt;apply&gt;&lt;id/&gt;</kbd>...<kbd>&lt;/apply&gt;</kbd>."
The primary advantage of handling these translations without
any particular dependence on the identifiers will be that
the translation will still provide meaningful output for
tags which are added to Content MathML in the future.
</p>
<p>
The standard infix notation for binary operators and relations
can be handled similarly -- for example, "<kbd>x+y</kbd>" can map
to "<kbd><![CDATA[<apply><plus/><ci>x</ci><ci>y</ci></apply>]]></kbd>."
In Content MathML, grouping is explicit with the
"<kbd>&lt;apply&gt;</kbd>" environment, but in a standard arithmetic expression
using binary infix operators, much of the grouping is implied by
standard precedence rules, which can be overridden using
explicit grouping by parentheses.  This difference in how
grouping is handled between the two forms is easily translated
in the parser -- indeed, the output of any good parser for
arithmetic expressions will be essentially a tree-based
representation of the expression, which translates easily into
the tree-based XML syntax of Content MathML.
</p>
<p>
The issues of syntactic translation become a bit more difficult
for Content MathML stand-alone entities such as
"<kbd>&lt;infinity/&gt;</kbd>"
(which generally do not appear as the first child in an
"<kbd>&lt;apply&gt;</kbd>"
environment), and for binary relations which do not have simple
keyboard equivalents, such as the TeX "<kbd>\in</kbd>" relation (as in
"<kbd>$x\in A$</kbd>").  These elements need to be treated differently in
the TeX-like syntax in order to map correctly into Content MathML.
I decided to handle these elements using different characters
to <em>end</em> a backslash-escaped macro identifier -- so, for example,
"<kbd>\id;</kbd>" maps to "<kbd>&lt;id/&gt;</kbd>"
(without any "<kbd>&lt;apply&gt;</kbd>" tags),
and "<kbd>x\id|y</kbd>" maps to
"<kbd><![CDATA[<apply><id/><ci>x</ci><ci>y</ci></apply>]]></kbd>,"
again without the translator knowing anything about the
"<kbd>id</kbd>" identifier.  This may not be standard TeX notation, but
it does provide a simple translation mechanism and is not so
different from TeX as to be totally unfamiliar.
</p>
<p>
In Content MathML, "qualifiers" provide a mechanism for specifying
details about how an applied element is to be interpreted.  For
example, the "<kbd>&lt;bvar&gt;</kbd>"
qualifier provides information about a
bound variable, as for an integral, so that
"<kbd><![CDATA[<apply><int/><bvar><ci>x</ci></bvar>]]></kbd>...<kbd>&lt;/apply&gt;</kbd>"
indicates an integral with respect to the (bound) variable "<var>x</var>."
This seemed a natural place to use the LaTeX square-bracket
optional argument syntax.  However, here there is some necessary
dependence on identifiers in order to distinguish between different
qualifiers.  For example, the optional argument in the form
"<kbd>[v:</kbd>...<kbd>]</kbd>" provides the
"<kbd>&lt;bvar&gt;</kbd>...<kbd>&lt;/bvar&gt;</kbd>" qualifier.
</p>
<p>
Finally, in MathML, "attributes" applied to the tags provide
additional information about the tags which can affect both
meaning and rendering.  In particular, the "type" attribute
for many tags provides information about what the tag represents.
For example, the "<kbd>&lt;interval&gt;</kbd>" environment in Content MathML
supports the "<kbd>closure</kbd>" attribute, by which an interval can be
described as "<kbd>open</kbd>," "<kbd>closed</kbd>," or the mixed closures
"<kbd>open-closed</kbd>" or "<kbd>closed-open</kbd>."  I couldn't find a truly
appropriate element of TeX-like syntax to represent these
attributes, so here I strayed even farther from standard TeX syntax.
I introduce attributes into the source syntax using the special
"<kbd>@</kbd>" character, so that
"<kbd>\begin{interval}@open a b\end{interval}</kbd>"
maps to "<kbd><![CDATA[<interval closure="open"><ci>a</ci><ci>b</ci></interval>]]></kbd>"
to represent the open interval from "<var>a</var>" to "<var>b</var>."
This approach to attributes, though, only allows any element in
the TeX-like syntax to support one attribute.  This turned out only to
be a problem for the "<kbd>&lt;cn&gt;</kbd>" environment, which supports both
the "<kbd>type</kbd>" and "<kbd>base</kbd>" attributes.  In this situation, I had to
decide which attribute would be more useful in general, so
the "<kbd>@</kbd>" construct in the TeX-like syntax maps to the
"<kbd>type</kbd>" attribute for the "<kbd>&lt;cn&gt;</kbd>" environment.
</p>
<h3>4.3. Final Design Criteria</h3>
<p>
[Note:  Much of this section also appears in the
<a href="http://cs.jsu.edu/mcis/leathrum/mathtrans/mathtransdoc.xml">documentation page</a> for the translator applet.]
</p>
<p>
So ultimately I judged the design of the TeX-like syntax
and its translation software by the following criteria:
</p>
<ul>
<li> Output (destination) code should be <em>strict</em> Content MathML -- no presentation tags.</li>
<li> Input (source) code should be "TeX-like" -- in particular:
<ul>
<li> Backslash-escaped "macros" (although there will be a few different forms of them);</li>
<li> Curly brackets "<kbd>{</kbd>...<kbd>}</kbd>" for most grouping;</li>
<li> Square brackets "<kbd>[</kbd>...<kbd>]</kbd>" (as in LaTeX)
for optional arguments (here will correspond to Content MathML
"qualifiers");</li>
<li> Environments similar to LaTeX:
"<kbd>\begin{foo}</kbd>...<kbd>\end{foo}</kbd>."</li>
</ul></li>
<li> Basic infix algebraic expressions and relations should be supported.</li>
<li> Mapping from source to destination should be primarily <em>syntactic</em> -- so that if
user wants to use "<kbd>foo</kbd>" identifier, then e.g. "<kbd>\foo</kbd>" source should yield (syntactically correct)
"<kbd>&lt;foo/&gt;</kbd>" element, even if renderer doesn't recognize "<kbd>&lt;foo/&gt;</kbd>."
Primary advantage of this will be that translation will still work even if Content MathML element set expands.</li>
<li> Sources of semantic ambiguity in TeX should be settled in favor of Content MathML -- for
example, "<kbd>^</kbd>" in TeX can be used for either exponents or superscripts, but Content MathML doesn't
use superscripts <em>per se</em> at all; here, "<kbd>^</kbd>" will be used only for exponents, and
"<kbd>_</kbd>" for Content MathML
"selectors."</li>
<li> Source expressions should be concise.</li>
<li> Source expressions should cover as many cases of Content MathML as possible, even if it means departing
from standard TeX-like syntax; however, it should not be expected that the source syntax would cover all
cases of Content MathML.</li>
<li> Source language with translator
should be regarded as a tool for authoring Content MathML, <em>not</em> as a replacement
for Content MathML.</li>
</ul>

<h3>4.4. Syntactic Mapping Scheme</h3>
<p>
[Note:  Much of this section also appears in the
<a href="http://cs.jsu.edu/mcis/leathrum/mathtrans/mathtransdoc.xml">documentation page</a> for the translator applet.]
</p>
<p>
The resulting syntactic mapping scheme worked out as follows:
</p>
<table border="1">
<tr><td><strong>Source:</strong></td><td><strong>Content MathML:</strong></td></tr>
<tr><td>Source:</td><td>Content MathML:</td></tr>
<tr><td><kbd>foo(...)</kbd></td><td><pre><![CDATA[<apply>
 <ci>foo</ci>
 ...
</apply>]]></pre></td></tr>
<tr><td><kbd>\foo;</kbd></td><td><kbd>&lt;foo/&gt;</kbd></td></tr>
<tr><td><kbd>x\foo|y</kbd></td><td><pre><![CDATA[<apply>
 <foo/>
 x
 y
</apply>
]]></pre></td></tr>
<tr><td><kbd>x\foo@bar|y</kbd></td><td><pre><![CDATA[<apply>
 <foo type="bar"/>
 x
 y
</apply>
]]></pre></td></tr>
<tr><td><kbd>&amp;foo;</kbd></td><td><pre><![CDATA[<ci>&foo;</ci>]]></pre></td></tr>
<tr><td><kbd>\foo{...}</kbd></td><td><pre><![CDATA[<apply>
 <foo/>
 ...
</apply>
]]></pre></td></tr>
<tr><td><kbd>\foo@bar{...}</kbd></td><td><pre><![CDATA[<apply>
 <foo type="bar"/>
 ...
</apply>
]]></pre></td></tr>
<tr><td><kbd>\begin{foo}...\end{foo}</kbd></td><td><pre><![CDATA[<foo>
 ...
</foo>
]]></pre></td></tr>
<tr><td><kbd>\begin{foo}@bar...\end{foo}</kbd></td><td><pre><![CDATA[<foo type="bar">
 ...
</foo>
]]></pre></td></tr>
</table>

<p>
Qualifiers are specified as given in the following table:
</p>
<ul>
<li> <kbd>[v:...]</kbd> = <kbd>&lt;bvar&gt;...&lt;/bvar&gt;</kbd></li>
<li> <kbd>[u:...]</kbd> = <kbd>&lt;uplimit&gt;...&lt;/uplimit&gt;</kbd></li>
<li> <kbd>[l:...]</kbd> = <kbd>&lt;lowlimit&gt;...&lt;/lowlimit&gt;</kbd></li>
<li> <kbd>[i:...]</kbd> = <kbd>&lt;interval&gt;...&lt;/interval&gt;</kbd></li>
<li> <kbd>[c:...]</kbd> = <kbd>&lt;condition&gt;...&lt;/condition&gt;</kbd></li>
<li> <kbd>[d:...]</kbd> = <kbd>&lt;domainofapplication&gt;...&lt;/domainofapplication&gt;</kbd></li>
<li> <kbd>[b:...]</kbd> = <kbd>&lt;logbase&gt;...&lt;/logbase&gt;</kbd></li>
<li> <kbd>[n:...]</kbd> = <kbd>&lt;degree&gt;...&lt;/degree&gt;</kbd></li>
<li> <kbd>[m:...]</kbd> = <kbd>&lt;momentabout&gt;...&lt;/momentabout&gt;</kbd></li>
<li> <kbd>[s:...]</kbd> = <kbd>&lt;list&gt;...&lt;/list&gt;</kbd></li>
</ul>

<p>
Attributes are specified using the special character "@"
as follows:
</p>
<table border="1">
<tr><td><strong>Element:</strong></td>
<td><strong>Attribute:</strong></td><td><strong>Allowed values:</strong></td></tr>
<tr><td><kbd>cn</kbd></td><td><kbd>type</kbd></td>
<td>real, integer, rational, e-notation, complex-cartesian, complex-polar</td></tr>
<tr><td><kbd>ci</kbd></td><td><kbd>type</kbd></td>
<td>many -- see
<a href="http://www.w3.org/TR/2003/REC-MathML2-20031021/chapter4.html">W3C documentation</a>
(generally do not affect rendering)</td></tr>
<tr><td><kbd>tendsto</kbd></td><td><kbd>type</kbd></td>
<td>two-sided, above, below</td></tr>
<tr><td><kbd>set</kbd></td>
<td><kbd>type</kbd></td><td>normal, multiset</td></tr>
<tr><td><kbd>interval</kbd></td><td><kbd>closure</kbd></td>
<td>closed, open, open-closed, closed-open</td></tr>
<tr><td><kbd>list</kbd></td><td><kbd>order</kbd></td>
<td>numerical, lexicographic</td></tr>
</table>
<p>
There are some other features and subtleties of the translator's source
syntax which are not covered in the above tables -- see the
<a href="">documentation page</a> for details.
I refer to the resulting mark-up language (the source code syntax
for the translator applet) as "Content Pseudo-TeX."
</p>

<h3>4.5. Examples Using Content Pseudo-TeX</h3>
<p>
[Note:  Much of this section also appears in the
<a href="http://cs.jsu.edu/mcis/leathrum/mathtrans/mathtransdoc.xml">documentation page</a> for the translator applet.]
</p>
<p>
The table below shows a few more involved examples of expressions
given first in the Content Pseudo-TeX source syntax, then
in the Content MathML output from the translator applet, then
finally rendered by the browser from the Content MathML source.
Some of these examples expand or complete examples used
earlier in this article.
</p>
<table border="1">
<tr><td><strong>Source:</strong></td><td><strong>Content MathML:</strong></td>
<td><strong>Rendered:</strong></td></tr>
<tr><td><kbd>\int[v:x][l:0][u:\pi;]{\sin{x}}=2</kbd></td>
<td><pre><![CDATA[<apply>
 <eq/>
 <apply>
  <int/>
  <bvar>
   <ci>x</ci>
  </bvar>
  <lowlimit>
   <cn>0</cn>
  </lowlimit>
  <uplimit>
   <pi/>
  </uplimit>
  <apply>
   <sin/>
   <ci>x</ci>
  </apply>
 </apply>
 <cn>2</cn>
</apply>]]></pre></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<int/>
<bvar>
<ci>x</ci>
</bvar>
<lowlimit>
<cn>0</cn>
</lowlimit>
<uplimit>
<pi/>
</uplimit>
<apply>
<sin/>
<ci>x</ci>
</apply>
</apply>
<cn>2</cn>
</apply>
</math></td></tr>
<tr>
<td><pre>\limit[v:x][c:{x\tendsto@above|0}]{\sin{x}/x}=1</pre></td>
<td><pre><![CDATA[<apply>
 <eq/>
 <apply>
  <limit/>
  <bvar>
   <ci>x</ci>
  </bvar>
  <condition>
   <apply>
    <tendsto type="above"/>
    <ci>x</ci>
    <cn>0</cn>
   </apply>
  </condition>
  <apply>
   <divide/>
   <apply>
    <sin/>
    <ci>x</ci>
   </apply>
   <ci>x</ci>
  </apply>
 </apply>
 <cn>1</cn>
</apply>]]></pre></td>
<td>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
 <eq/>
 <apply>
  <limit/>
  <bvar>
   <ci>x</ci>
  </bvar>
  <condition>
   <apply>
    <tendsto type="above"/>
    <ci>x</ci>
    <cn>0</cn>
   </apply>
  </condition>
  <apply>
   <divide/>
   <apply>
    <sin/>
    <ci>x</ci>
   </apply>
   <ci>x</ci>
  </apply>
 </apply>
 <cn>1</cn>
</apply>
</math>
</td>
</tr>
<tr>
<td><pre>x_1=(-b+\root{b^2-4a*c})/2a</pre></td>
<td><pre><![CDATA[<apply>
 <eq/>
 <apply>
  <selector/>
  <ci>x</ci>
  <cn>1</cn>
 </apply>
 <apply>
  <divide/>
  <apply>
   <plus/>
   <apply>
    <minus/>
    <ci>b</ci>
   </apply>
   <apply>
    <root/>
    <apply>
     <minus/>
     <apply>
      <power/>
      <ci>b</ci>
      <cn>2</cn>
     </apply>
     <apply>
      <times/>
      <apply>
       <times/>
       <cn>4</cn>
       <ci>a</ci>
      </apply>
      <ci>c</ci>
     </apply>
    </apply>
   </apply>
  </apply>
  <apply>
   <times/>
   <cn>2</cn>
   <ci>a</ci>
  </apply>
 </apply>
</apply>]]></pre></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
 <eq/>
 <apply>
  <selector/>
  <ci>x</ci>
  <cn>1</cn>
 </apply>
 <apply>
  <divide/>
  <apply>
   <plus/>
   <apply>
    <minus/>
    <ci>b</ci>
   </apply>
   <apply>
    <root/>
    <apply>
     <minus/>
     <apply>
      <power/>
      <ci>b</ci>
      <cn>2</cn>
     </apply>
     <apply>
      <times/>
      <apply>
       <times/>
       <cn>4</cn>
       <ci>a</ci>
      </apply>
      <ci>c</ci>
     </apply>
    </apply>
   </apply>
  </apply>
  <apply>
   <times/>
   <cn>2</cn>
   <ci>a</ci>
  </apply>
 </apply>
</apply>
</math></td>
</tr>
<tr>
<td><pre>\sum[v:n][l:1][u:\infinity;]{1/n^2}=\pi;^2/6</pre>
</td>
<td><pre><![CDATA[<apply>
 <eq/>
 <apply>
  <sum/>
  <bvar>
   <ci>n</ci>
  </bvar>
  <lowlimit>
   <cn>1</cn>
  </lowlimit>
  <uplimit>
   <infinity/>
  </uplimit>
  <apply>
   <divide/>
   <cn>1</cn>
   <apply>
    <power/>
    <ci>n</ci>
    <cn>2</cn>
   </apply>
  </apply>
 </apply>
 <apply>
  <divide/>
  <apply>
   <power/>
   <pi/>
   <cn>2</cn>
  </apply>
  <cn>6</cn>
 </apply>
</apply>]]></pre></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
 <eq/>
 <apply>
  <sum/>
  <bvar>
   <ci>n</ci>
  </bvar>
  <lowlimit>
   <cn>1</cn>
  </lowlimit>
  <uplimit>
   <infinity/>
  </uplimit>
  <apply>
   <divide/>
   <cn>1</cn>
   <apply>
    <power/>
    <ci>n</ci>
    <cn>2</cn>
   </apply>
  </apply>
 </apply>
 <apply>
  <divide/>
  <apply>
   <power/>
   <pi/>
   <cn>2</cn>
  </apply>
  <cn>6</cn>
 </apply>
</apply>
</math>
</td>
</tr>
<tr>
<td><pre>
\int[v:x][l:-\infinity;][u:\infinity;]
     {\exp{-(x^2)}}=\root{\pi;}
</pre></td>
<td><pre><![CDATA[<apply>
 <eq/>
 <apply>
  <int/>
  <bvar>
   <ci>x</ci>
  </bvar>
  <lowlimit>
   <apply>
    <minus/>
    <infinity/>
   </apply>
  </lowlimit>
  <uplimit>
   <infinity/>
  </uplimit>
  <apply>
   <exp/>
   <apply>
    <minus/>
    <apply>
     <power/>
     <ci>x</ci>
     <cn>2</cn>
    </apply>
   </apply>
  </apply>
 </apply>
 <apply>
  <root/>
  <pi/>
 </apply>
</apply>]]></pre></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<int/>
<bvar>
<ci>x</ci>
</bvar>
<lowlimit>
<apply>
<minus/>
<infinity/>
</apply>
</lowlimit>
<uplimit>
<infinity/>
</uplimit>
<apply>
<exp/>
<apply>
<minus/>
<apply>
<power/>
<ci>x</ci>
<cn>2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<root/>
<pi/>
</apply>
</apply>
</math>
</td></tr>
<tr>
<td>
<pre>\diff[v:x]{
      \int[v:t][l:a][u:x]{f(t)}
   }=f(x)</pre>
</td>
<td>
<pre><![CDATA[<apply>
 <eq/>
 <apply>
  <diff/>
  <bvar>
   <ci>x</ci>
  </bvar>
  <apply>
   <int/>
   <bvar>
    <ci>t</ci>
   </bvar>
   <lowlimit>
    <ci>a</ci>
   </lowlimit>
   <uplimit>
    <ci>x</ci>
   </uplimit>
   <apply>
    <ci>f</ci>
    <ci>t</ci>
   </apply>
  </apply>
 </apply>
 <apply>
  <ci>f</ci>
  <ci>x</ci>
 </apply>
</apply>]]></pre>
</td>
<td>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>x</ci>
</bvar>
<apply>
<int/>
<bvar>
<ci>t</ci>
</bvar>
<lowlimit>
<ci>a</ci>
</lowlimit>
<uplimit>
<ci>x</ci>
</uplimit>
<apply>
<ci>f</ci>
<ci>t</ci>
</apply>
</apply>
</apply>
<apply>
<ci>f</ci>
<ci>x</ci>
</apply>
</apply>
</math></td>
</tr>
</table>
<h3>4.6. Elements of Content MathML Not Covered by Content Pseudo-TeX</h3>
<p>
[Note:  Much of this section also appears in the
<a href="http://cs.jsu.edu/mcis/leathrum/mathtrans/mathtransdoc.xml">documentation page</a> for the translator applet.]
</p>
<p>
The list below gives the elements of Content MathML which cannot
be generated in any usable way by the translator applet.
</p>
<ul>
<li> <kbd>type="constant"</kbd> for <kbd>&lt;cn&gt;</kbd> tag
<ul>
<li> Work-around: use defined stand-alone elements instead</li>
</ul>
</li>
<li> <kbd>base</kbd> attribute for <kbd>&lt;cn&gt;</kbd> tag
<ul>
<li> No work-around available</li>
</ul>
</li>
<li> <kbd>&lt;csymbol&gt;</kbd>, <kbd>&lt;semantics&gt;</kbd>,
<kbd>&lt;declare&gt;</kbd>,
<kbd>&lt;annotation&gt;</kbd>, and <kbd>&lt;annotation-xml&gt;</kbd>
elements
<ul>
<li> These are advanced Content MathML elements generally used to
associate Content MathML with Presentation MathML or other
encodings, and are therefore beyond the scope of the translator's
source syntax</li>
</ul>
</li>
<li> <kbd>definitionURL</kbd> and <kbd>encoding</kbd> attributes
<ul>
<li> These are advanced Content MathML elements again, generally
used to associate Content MathML with external encodings, and
are therefore beyond the scope of the translator's source syntax</li>
</ul>
</li>
<li> <kbd>class</kbd>, <kbd>id</kbd>, <kbd>style</kbd>,
<kbd>href</kbd>, <kbd>xref</kbd>,
and <kbd>other</kbd> attributes
<ul>
<li> These attributes are used in XML to provide a way to
associate elements with CSS stylesheet information, and are
therefore beyond the scope of the translator's source syntax</li>
</ul>
</li>
</ul>
<h2>5. Limitations of Content Mark-up</h2>
<p>
Content mark-up of any type does carry its own inherent limitations.
One fairly simple example illustrating this is the common
use of the "plus-or-minus" operator.  Content MathML does
not have a built-in element  corresponding to this operator, so
for example the Quadratic Formula must be expressed as two
separate expressions differing only in that single operator,
using "<kbd>&lt;plus/&gt;</kbd>" in one of the expressions and
"<kbd>&lt;minus/&gt;</kbd>" in
the other.  This may seem like yet another place where the
restrictions of Content MathML lead to excessive verbosity, but
the issue here is actually somewhat deeper.  To see how,
though, the Quadratic Formula is not the best example -- a
better example is the angle-sum and angle-difference identities
for cosine.  These identities are usually presented in a form
where the two versions of the identities are compressed into
a single expression, using both a "plus-or-minus" operator and
a "minus-or-plus" operator.  This expression implies a link
between the choices of operators at these two positions in
the expression, and indeed this link is important to the
meaning of the expression.
The table below shows the mark-up code for the
separate forms of the expressions in both the Content Pseudo-TeX
syntax and in Content MathML, and the combined form in
Presentation MathML.
</p>
<table border="1">
<tr>
<td colspan="2">
<strong>Separate:</strong>
</td>
<td>
<strong>Combined:</strong>
</td>
</tr>
<tr>
<td>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
 <eq/>
 <apply>
  <cos/>
  <apply>
   <plus/>
   <ci>&alpha;</ci>
   <ci>&beta;</ci>
  </apply>
 </apply>
 <apply>
  <minus/>
  <apply>
   <times/>
   <apply>
    <cos/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <cos/>
    <ci>&beta;</ci>
   </apply>
  </apply>
  <apply>
   <times/>
   <apply>
    <sin/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <sin/>
    <ci>&beta;</ci>
   </apply>
  </apply>
 </apply>
</apply>
</math>
</td>
<td>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
 <eq/>
 <apply>
  <cos/>
  <apply>
   <minus/>
   <ci>&alpha;</ci>
   <ci>&beta;</ci>
  </apply>
 </apply>
 <apply>
  <plus/>
  <apply>
   <times/>
   <apply>
    <cos/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <cos/>
    <ci>&beta;</ci>
   </apply>
  </apply>
  <apply>
   <times/>
   <apply>
    <sin/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <sin/>
    <ci>&beta;</ci>
   </apply>
  </apply>
 </apply>
</apply>
</math>
</td>
<td>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
 <mrow>
  <mi>cos</mi>
  <mrow>
   <mo>(</mo>
   <mrow>
    <mi>&alpha;</mi>
   </mrow>
   <mo>&PlusMinus;</mo>
   <mrow>
    <mi>&beta;</mi>
   </mrow>
   <mo>)</mo>
  </mrow>
 </mrow>
 <mo>=</mo>
 <mrow>
  <mrow>
   <mrow>
    <mi>cos</mi>
    <mrow>
     <mi>&alpha;</mi>
    </mrow>
   </mrow>
   <mo/>
   <mrow>
    <mi>cos</mi>
    <mrow>
     <mi>&beta;</mi>
    </mrow>
   </mrow>
  </mrow>
  <mo>&MinusPlus;</mo>
  <mrow>
   <mrow>
    <mi>sin</mi>
    <mrow>
     <mi>&alpha;</mi>
    </mrow>
   </mrow>
   <mo/>
   <mrow>
    <mi>sin</mi>
    <mrow>
     <mi>&beta;</mi>
    </mrow>
   </mrow>
  </mrow>
 </mrow>
</mrow>
</math>
</td>
</tr>
<tr>
<td>
<pre>\cos{&alpha;+&beta;}=
\cos{&alpha;}*\cos{&beta;}-
\sin{&alpha;}*\sin{&beta;}</pre>
</td>
<td>
<pre>\cos{&alpha;-&beta;}=
\cos{&alpha;}*\cos{&beta;}+
\sin{&alpha;}*\sin{&beta;}</pre>
</td>
<td>
Presentation MathML only
</td>
</tr>
<tr>
<td>
<pre><![CDATA[<apply>
 <eq/>
 <apply>
  <cos/>
  <apply>
   <plus/>
   <ci>&alpha;</ci>
   <ci>&beta;</ci>
  </apply>
 </apply>
 <apply>
  <minus/>
  <apply>
   <times/>
   <apply>
    <cos/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <cos/>
    <ci>&beta;</ci>
   </apply>
  </apply>
  <apply>
   <times/>
   <apply>
    <sin/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <sin/>
    <ci>&beta;</ci>
   </apply>
  </apply>
 </apply>
</apply>]]></pre>
</td>
<td>
<pre><![CDATA[<apply>
 <eq/>
 <apply>
  <cos/>
  <apply>
   <minus/>
   <ci>&alpha;</ci>
   <ci>&beta;</ci>
  </apply>
 </apply>
 <apply>
  <plus/>
  <apply>
   <times/>
   <apply>
    <cos/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <cos/>
    <ci>&beta;</ci>
   </apply>
  </apply>
  <apply>
   <times/>
   <apply>
    <sin/>
    <ci>&alpha;</ci>
   </apply>
   <apply>
    <sin/>
    <ci>&beta;</ci>
   </apply>
  </apply>
 </apply>
</apply>]]></pre>
</td>
<td>
<pre><![CDATA[<mrow>
 <mrow>
  <mi>cos</mi>
  <mrow>
   <mo>(</mo>
   <mrow>
    <mi>&alpha;</mi>
   </mrow>
   <mo>&PlusMinus;</mo>
   <mrow>
    <mi>&beta;</mi>
   </mrow>
   <mo>)</mo>
  </mrow>
 </mrow>
 <mo>=</mo>
 <mrow>
  <mrow>
   <mrow>
    <mi>cos</mi>
    <mrow>
     <mi>&alpha;</mi>
    </mrow>
   </mrow>
   <mo/>
   <mrow>
    <mi>cos</mi>
    <mrow>
     <mi>&beta;</mi>
    </mrow>
   </mrow>
  </mrow>
  <mo>&MinusPlus;</mo>
  <mrow>
   <mrow>
    <mi>sin</mi>
    <mrow>
     <mi>&alpha;</mi>
    </mrow>
   </mrow>
   <mo/>
   <mrow>
    <mi>sin</mi>
    <mrow>
     <mi>&beta;</mi>
    </mrow>
   </mrow>
  </mrow>
 </mrow>
</mrow>]]></pre>
</td>
</tr>
</table>
<p>
How can this link be captured in a content-level notation, though?
Since Content MathML is based on XML, the relationships between
the MathML tags are represented (in the Document Object Model, or DOM)
as a tree-based structure.  This link between the "plus-or-minus"
and "minus-or-plus" operators at two different places in the expression
would
require an association between nodes on distinct branches of
the tree structure.  On their own, neither Content MathML
nor the more general XML support such associations.
Yet without the association, the meaning of the expression is lost.
The correct formal answer to this issue must then be to represent
the two versions of the angle-sum and angle-difference identities
for cosine as two separate expressions, for the purposes of a
content-level representation.
Note, however, that the MathML
"<kbd>&lt;semantics&gt;</kbd>" tag can be used
to associate the Content MathML with Presentation MathML that
combines the two expressions in the usual way.
It is important to point out that the Presentation MathML does
not actually link the two operators -- it simply places them
correctly without any actual semantic association between them.
</p>
<h2>6. Further Recommendations</h2>
<p>
The W3C maintains a Document Type Definition (DTD) which
can be used for documents which use XHTML, MathML, and SVG
(Scalable Vector Graphics)
together.
This profile would allow authors of online
mathematics to include very sophisticated equations and
figures in their documents.
This profile provides an obvious first step toward
next-generation web pages which include mathematics.
Indeed, this article uses a W3C profile with XHTML and MathML,
but not SVG since the article doesn't use graphics.
</p>
<p>
The latest version of XHTML groups the tags into "modules,"
such as a "tables" module and a "forms" module.  One
of the modules is the "presentation" module, which includes
such tags as "<kbd>&lt;br&gt;</kbd>," "<kbd>&lt;b&gt;</kbd>,"
and "<kbd>&lt;i&gt;</kbd>."
(In place of the presentation tags "<kbd>&lt;b&gt;</kbd>"
and "<kbd>&lt;i&gt;</kbd>,"
there are corresponding
content-level tags "<kbd>&lt;strong&gt;</kbd>"
and "<kbd>&lt;em&gt;</kbd>.")
It is worth
noting that XHTML does not support the HTML
"<kbd>&lt;font&gt;</kbd>" tag
<em>at all</em>.  A simple recommendation
for maintaining content-level markup, then, would be to use
XHTML <em>without</em> the presentation-module tags.
</p>
<p>
A more draconian, but perhaps nonetheless ultimately preferable,
recommendation would be to create a new stylesheet using
XSLT transformations to implement a new tag set, with tag
names derived from document structure macros in LaTeX.  For example,
the stylesheet could implement a
"<kbd>&lt;theorem&gt;</kbd>...<kbd>&lt;/theorem&gt;</kbd>"
XML environment analogous to the LaTeX
"<kbd>\begin{theorem}</kbd>...<kbd>\end{theorem}</kbd>" environment.
The document structure environments in LaTeX do not specify
any particular presentation for theorems or definitions, leaving
such decisions to the LaTeX style -- in other words, they
provide content-level information about the document.
The syntax
of tags in a document written for this stylesheet would still
be XML-based, but at least the tag identifiers would be
familiar to LaTeX users.  I am working on a stylesheet
based on this idea, and I hope to have a prototype available soon.
</p>
<p>
Finally, as of this writing, W3C has just introduced the working draft
for MathML version 3.0.  Bringing the translator into compliance
with this new version will require some modifications to the applet,
in particular to change how bound variables, qualifiers, and attributes are handled.
The changes in Content MathML between versions 2.0 and 3.0 are designed
to bring Content MathML closer to 
<a href="http://www.openmath.org">OpenMath</a>, including
the introduction of "content dictionaries" for defining symbols and
entities.  I will work on the necessary changes as soon as possible and
make the revised applet available from the current translator applet
page, but I will not roll the new applet out onto the main translator
page until this new version of MathML moves from "working draft" to
"recommendation" status within W3C.
In the meantime, MathML 2.0 is the current accepted standard supported
by available browsers and plug-ins, and even those browsers which 
do begin to support the new working draft will include legacy support
features included in the working draft, so the 
current version of the translator will still
generate acceptable output.
</p>
</body>
</html>

