<?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">
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>A Tool for Content MathML Authoring</title>
  <meta name="Author" content="Tom Leathrum" />
  <meta name="Keywords" content="MathML, Content MathML, authoring tool" />
  <meta name="Description" content="This article describes a tool for translating a TeX-like input language into Content MathML." />
  <link rel="icon" href="../MAA.png" type="image/png" />
  <link rel="shortcut icon" href="../MAA.png" type="image/png" />
  <link rel="stylesheet" href="styles.css" type="text/css" />
  <script type="text/javascript" src="../scripts.js"></script>
</head>

<body>

<div class="front">

<h1 class="joma">The Journal of Online Mathematics and Its Applications</h1>

<p class="joma"><a href="http://mathdl.maa.org/mathDL/4/?pa=content&amp;sa=viewDocument&amp;nodeId=1551" class="internal" title="Go to title page">Volume 7. June 2007. Article ID 1551</a></p>

<h1 class="title">A Tool for Content MathML Authoring:<br/>
Content Pseudo-TeX Translator Applet</h1>

<h2 class="author">Thomas E. Leathrum</h2>

<h3 class="institution">Developers' Area Associate Editor</h3>

<div class="abstract">
<h4>Abstract</h4>

<p>This article describes an authoring tool that translates a simple, TeX-like input syntax into Content MathML. The MathML can then be copied and pasted into web pages.</p>
</div>

<div class="contents">
<h4>Contents</h4>

<ul style="list-style-type:none">
	<li><a href="#Introduction" class="internal">Introduction</a></li>
	<li>1. <a href="#MathML" class="internal">Presentation and Content</a></li>
	<li>2. <a href="#Basics" class="internal">Basics of Content MathML</a>
		<ul style="list-style-type:none">
			<li>2.1. <a href="#Notation" class="internal">Introduction to Notation</a></li>
			<li>2.2. <a href="#Verbosity" class="internal">Excessive Verbosity of Content MathML</a></li>
		</ul>
	</li>
	<li>3. <a href="#TeX" class="internal">Is TeX an Appropriate Content Notation?</a></li>
	<li>4. <a href="#ContentTeX" class="internal">A Content-Oriented TeX-Like Syntax</a>
		<ul style="list-style-type:none">
			<li>4.1. <a href="#Syntax" class="internal">Familiar Elements of TeX Syntax</a></li>
			<li>4.2. <a href="#Design" class="internal">Development of Design Criteria</a></li>
			<li>4.3. <a href="#FinalDesign" class="internal">Final Design Criteria</a> *</li>
			<li>4.4. <a href="#Mapping" class="internal">Syntactic Mapping Scheme</a> *</li>
			<li>4.5. <a href="#Examples" class="internal">Examples Using Content Pseudo-TeX</a> *</li>
			<li>4.6. <a href="#Elements" class="internal">Elements of Content MathML Not Covered by Content Pseudo-TeX</a> *</li>
		</ul>
	</li>
	<li>5. <a href="#Limitations" class="internal">Limitations of Content Mark-up</a></li>
	<li>6. <a href="#Recommendations" class="internal">Further Recommendations</a></li>
</ul>

<p>[* Note:  Much of the material in these sections also appears in the documentation page for the translator applet.] </p>

<h4>Translator and Documentation Links</h4>

<ul>
	<li><a href="http://cs.jsu.edu/mcis/faculty/leathrum/mathtrans/mathtrans.xml" target="_blank" class="external" title="Open in a new window">Translator applet page</a></li>
	<li><a href="http://cs.jsu.edu/mcis/faculty/leathrum/mathtrans/mathtransdoc.xml" target="_blank" class="external" title="Open in a new window">Documentation page</a></li>
</ul>
</div>

<div class="keywords">
<h4>Keywords</h4>

<ul class="keywords">
	<li class="keyword">MathML</li>
	<li class="keyword">TeX</li>
	<li class="keyword">authoring tool</li>
	<li class="keyword">mathematical notation</li>
</ul>
</div>

<div class="technologies">
<h4>Technical requirements</h4>

<p>This article uses MathML, so it requires a MathML-enabled browser, such as <a href="http://www.mozilla.org" target="_blank" class="external" title="Open in a new window">Firefox</a> 1.5 or later, with the <a href="http://www.mozilla.org/projects/mathml/fonts/" target="_blank" class="external" title="Open in a new window">MathML fonts </a> installed, or Internet Explorer with the  <a href="http://www.dessci.com/en/products/mathplayer/" class="external" title="Open external site in a new window" target="_blank">MathPlayer plug-in</a> from <a href="http://www.dessci.com/" target="_blank" class="external" title="Open in a new window">Design Science</a>. </p>

<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" target="_blank" class="external" title="Open in a new window">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>
</div>
</div>

<h2  id="Introduction">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 id="MathML">1. Presentation and Content</h2>

<p>The <a href="http://www.w3c.org" class="external" title="Open external site in a new window" target="_blank">W3C's</a> proposed (but so far only sporadically accepted) standard for presenting technical mathematics formulas in Web pages is <a href="http://www.w3c.org/Math/" class="external" title="Open external site in a new window" target="_blank">MathML</a>, a mark-up language based on the very broad standard known as <a href="http://www.w3c.org/XML/" class="external" title="Open external site in a new window" target="_blank">XML</a>, 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 <span class="math">[<var>a</var>,<var>b</var>]</span>, and an open interval is <span class="math">(<var>a</var>,<var>b</var>)</span>. In most of Europe, Africa, the Middle East, and India, however, an open interval is written <span class="math">]<var>a</var>,<var>b</var>[</span>. </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 <a href="http://www.w3c.org/Style/CSS/" class="external" title="Open external site in a new window" target="_blank">CSS</a> or the newer <a href="http://www.w3c.org/Style/XSL/" class="external" title="Open external site in a new window" target="_blank">XSL</a>, 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 <span class="math">(<var>a</var>,<var>b</var>)</span>, and ordered pairs, as in <span class="math">(<var>a</var>,<var>b</var>)</span>. 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 id="Basics">2. Basics of Content MathML</h2>

<h3 id="Notation">2.1. Introduction to Notation</h3>

<p>A MathML expression must be enclosed within a <code>&lt;math&gt;...&lt;/math&gt;</code> environment, similar to using <code>$</code> or <code>$$</code> to delimit expressions in TeX, or the LaTeX environments <code>\(</code>...<code>\)</code> and <code>\[</code>...<code>\]</code>.  Within a <code>\&lt;math&gt;</code> 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: <code>&lt;cn&gt;</code>...<code>&lt;/cn&gt;</code> for numerals (so you cannot simply write <code>2</code> in a Content MathML expression, you must write <code>&lt;cn&gt;2&lt;/cn&gt;</code>), <code>&lt;ci&gt;</code>...<code>&lt;/ci&gt;</code> for identifiers (the variable <var>x</var> must be represented <code>&lt;ci&gt;x&lt;/ci&gt;</code>), and <code>&lt;csymbol&gt;</code>...<code>&lt;/csymbol&gt;</code> for more advanced mathematical symbols (the contents of a <code>&lt;csymbol&gt;</code> 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 <code>&lt;infinity/&gt;</code> and <code>&lt;pi/&gt;</code>. </p>

<p>More complicated expressions in Content MathML are composed using prefix notation, with the operator and its arguments expressly delimited within an <code>&lt;apply&gt;</code>...<code>&lt;/apply&gt;</code> environment. This makes a certain sense for functions --  for example, <span class="math"><var>f</var>(<var>x</var>,<var>y</var>)</span> 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 <code>&lt;apply&gt;</code> environment (<code>&lt;ci&gt;f&lt;/ci&gt;</code>) is the function <var>f</var>, and the other children (<code>&lt;ci&gt;x&lt;/ci&gt;</code> and <code>&lt;ci&gt;y&lt;/ci&gt;</code>) 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 <code>&lt;apply&gt;</code> 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 <span class="math"><var>x</var> + <var>y</var></span> -- 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 <code>&lt;plus/&gt;</code> entity, representing the addition operator, must be the first item in the list of children in the <code>&lt;apply&gt;</code> 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 <code>&lt;plus/&gt;</code> entity above), exponential and logarithmic functions (e.g. <code>&lt;ln/&gt;</code>), trigonometric functions (e.g. <code>&lt;sin/&gt;</code>), calculus (e.g. <code>&lt;int/&gt;</code>), statistics (e.g. <code>&lt;sdev/&gt;</code>), set theory (e.g. <code>&lt;union/&gt;</code>), and others, but these all must be used within the context of an <code>&lt;apply&gt;</code> 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 <code>&lt;div/&gt;</code>, <code>&lt;grad/&gt;</code>, <code>&lt;curl/&gt;</code>, etc.). </p>

<p>For certain operators, the list of children in the <code>&lt;apply&gt;</code> 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" display="block">
<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 <code>&lt;bvar&gt;</code> (for identifying the bound variable for the integral, i.e. the variable <var>x</var> for the <var>dx</var> part of the expression), <code>&lt;lowlimit&gt;</code> (the lower limit), and <code>&lt;uplimit&gt;</code> (the upper limit) are the qualifiers for the <code>&lt;int/&gt;</code> operator.  This example also demonstrates how <code>&lt;apply&gt;</code> tags can be nested -- the inner <code>&lt;apply&gt;</code>, containing the expression for <span class="math">sin(<var>x</var>)</span>, is the last child element in the outer <code>&lt;apply&gt;</code>. </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 <code>&lt;interval&gt;</code>...<code>&lt;/interval&gt;</code> environment. The opening <code>&lt;interval&gt;</code> tag can take a <code>closure</code> attribute to specify what sort of interval to represent.  For example, the closed interval <span class="math">[<var>a</var>, <var>b</var>]</span> would be written in Content MathML as follows: </p>

<pre><![CDATA[<interval closure="closed">
 <ci>a</ci>
 <ci>b</ci>
</interval>]]></pre>

<h3 id="Verbosity">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 <code>&lt;equal/&gt;</code> entity, which must be used within the context of an <code>&lt;apply&gt;</code> 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 id="TeX">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 <a href="http://en.wikipedia.org/wiki/TeX" class="external" title="Open external site in a new window" target="_blank">TeX</a>. 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 <code>^</code> operator in TeX. In some contexts, such as <code>$x^2$</code>, it is interpreted as an exponent; in other contexts, such as <code>$\sum_{n=1}^\infty\frac1n$</code>, 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 id="ContentTeX">4. A Content-Oriented TeX-Like Syntax</h2>

<h3 id="Syntax">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 <code>\sum</code>, <code>\int</code>, <code>\frac</code>, and <code>\sqrt</code>. Other syntactic elements in particular familiar to users of LaTeX would include square-bracket delimited optional arguments, as in <code>\sqrt[3]{x}</code>, and environments using <code>\begin{</code><var>identifier</var><code>}</code> and <code>\end{</code><var>identifier</var><code>}</code>. </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 <code>&lt;apply&gt;</code> 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 id="Design">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 <code>\begin{id}</code>...<code>\end{id}</code> could map directly to a Content MathML environment <code>&lt;id&gt;</code>...<code>&lt;/id&gt;</code> without the software translator knowing anything about the <code>id</code> identifier.  Similarly, <code>\id{</code>...<code>}</code> could map directly to <code>&lt;apply&gt;&lt;id/&gt;</code>...<code>&lt;/apply&gt;</code>. 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, <code>x+y</code> can map to <code><![CDATA[<apply><plus/><ci>x</ci><ci>y</ci></apply>]]></code>. In Content MathML, grouping is explicit with the <code>&lt;apply&gt;</code> 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 <code>&lt;infinity/&gt;</code> (which generally do not appear as the first child in an <code>&lt;apply&gt;</code> environment), and for binary relations which do not have simple keyboard equivalents, such as the TeX <code>\in</code> relation (as in <code>$x\in A$</code>).  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, <code>\id;</code> maps to <code>&lt;id/&gt;</code> (without any <code>&lt;apply&gt;</code> tags), and <code>x\id|y</code> maps to <code><![CDATA[<apply><id/><ci>x</ci><ci>y</ci></apply>]]></code>, again without the translator knowing anything about the <code>id</code> 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 <code>&lt;bvar&gt;</code> qualifier provides information about a bound variable, as for an integral, so that <code><![CDATA[<apply><int/><bvar><ci>x</ci></bvar>]]></code>...<code>&lt;/apply&gt;</code> 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 <code>[v:</code>...<code>]</code> provides the <code>&lt;bvar&gt;</code>...<code>&lt;/bvar&gt;</code> 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 <code>&lt;interval&gt;</code> environment in Content MathML supports the <code>closure</code> attribute, by which an interval can be described as <code>open</code>, <code>closed</code>, or the mixed closures <code>open-closed</code> or <code>closed-open</code>.  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 <code>@</code> character, so that <code>\begin{interval}@open a b\end{interval}</code> maps to <code><![CDATA[<interval closure="open"><ci>a</ci><ci>b</ci></interval>]]></code> 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 <code>&lt;cn&gt;</code> environment, which supports both the <code>type</code> and <code>base</code> attributes.  In this situation, I had to decide which attribute would be more useful in general, so the <code>@</code> construct in the TeX-like syntax maps to the <code>type</code> attribute for the <code>&lt;cn&gt;</code> environment. </p>

<h3 id="FinalDesign">4.3. Final Design Criteria</h3>

<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:</li>
		<ul>
			<li> Backslash-escaped "macros" (although there will be a few different forms of them);</li>
			<li> Curly brackets <code>{</code>...<code>}</code> for most grouping;</li>
			<li> Square brackets <code>[</code>...<code>]</code> (as in LaTeX) for optional arguments (here will correspond to Content MathML "qualifiers");</li>
			<li> Environments similar to LaTeX: <code>\begin{foo}</code>...<code>\end{foo}</code>.</li>
		</ul>
	<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 <code>foo</code> identifier, then e.g. <code>\foo</code> source should yield (syntactically correct) <code>&lt;foo/&gt;</code> element, even if renderer doesn't recognize <code>&lt;foo/&gt;</code>. 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, <code>^</code> in TeX can be used for either exponents or superscripts, but Content MathML doesn't use superscripts <em>per se</em> at all; here, <code>^</code> will be used only for exponents, and <code>_</code> 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 id="Mapping">4.4. Syntactic Mapping Scheme</h3>

<p>The resulting syntactic mapping scheme worked out as follows:</p>

<table>
	<tr>
		<th>Source</th>
		<th>Content MathML</th>
	</tr>
	<tr>
		<td>Source:</td>
		<td>Content MathML:</td>
	</tr>
	<tr>
		<td><code>foo(...)</code></td>
		<td><code><![CDATA[<apply><ci>foo</ci> ... </apply>]]></code></td>
	</tr>
	<tr>
		<td><code>\foo;</code></td>
		<td><code>&lt;foo/&gt;</code></td>
	</tr>
	<tr>
		<td><code>x\foo|y</code></td>
		<td><code><![CDATA[<apply> <foo/> x y </apply>]]></code></td>
	</tr>
	<tr>
		<td><code>x\foo@bar|y</code></td>
		<td><code><![CDATA[<apply> <foo type="bar"/> x y </apply>]]></code></td>
	</tr>
	<tr>
		<td><code>&amp;foo;</code></td>
		<td><code><![CDATA[<ci>&foo;</ci>]]></code></td>
	</tr>
	<tr>
		<td><code>\foo{...}</code></td>
		<td><code><![CDATA[<apply> <foo/> ... </apply>]]></code></td>
	</tr>
	<tr>
		<td><code>\foo@bar{...}</code></td>
		<td><code><![CDATA[<apply> <foo type="bar"/> ... </apply>]]></code></td>
	</tr>
	<tr>
		<td><code>\begin{foo}...\end{foo}</code></td>
		<td><code><![CDATA[<foo> ... </foo>]]></code></td>
	</tr>
	<tr>
		<td><code>\begin{foo}@bar...\end{foo}</code></td>
		<td><code><![CDATA[<foo type="bar"> ... </foo>]]></code></td>
	</tr>
</table>

<p>Qualifiers are specified as given in the following table:</p>

<ul>
	<li> <code>[v:...]</code> = <code>&lt;bvar&gt;...&lt;/bvar&gt;</code></li>
	<li> <code>[u:...]</code> = <code>&lt;uplimit&gt;...&lt;/uplimit&gt;</code></li>
	<li> <code>[l:...]</code> = <code>&lt;lowlimit&gt;...&lt;/lowlimit&gt;</code></li>
	<li> <code>[i:...]</code> = <code>&lt;interval&gt;...&lt;/interval&gt;</code></li>
	<li> <code>[c:...]</code> = <code>&lt;condition&gt;...&lt;/condition&gt;</code></li>
	<li> <code>[d:...]</code> = <code>&lt;domainofapplication&gt;...&lt;/domainofapplication&gt;</code></li>
	<li> <code>[b:...]</code> = <code>&lt;logbase&gt;...&lt;/logbase&gt;</code></li>
	<li> <code>[n:...]</code> = <code>&lt;degree&gt;...&lt;/degree&gt;</code></li>
	<li> <code>[m:...]</code> = <code>&lt;momentabout&gt;...&lt;/momentabout&gt;</code></li>
	<li> <code>[s:...]</code> = <code>&lt;list&gt;...&lt;/list&gt;</code></li>
</ul>

<p>Attributes are specified using the special character "@" as follows:</p>

<table>
	<tr>
		<th>Element</th>
		<th>Attribute</th>
		<th>Allowed values</th>
	</tr>
	<tr>
		<td><code>cn</code></td>
		<td><code>type</code></td>
		<td>real, integer, rational, e-notation, complex-cartesian, complex-polar</td>
	</tr>
	<tr>
		<td><code>ci</code></td>
		<td><code>type</code></td>
		<td>many -- see <a href="http://www.w3.org/TR/2003/REC-MathML2-20031021/chapter4.html" class="external" target="_blank" title="Open in a new window">W3C documentation</a> (generally do not affect rendering)</td>
	</tr>
	<tr>
		<td><code>tendsto</code></td>
		<td><code>type</code></td>
		<td>two-sided, above, below</td>
	</tr>
	<tr>
		<td><code>set</code></td>
		<td><code>type</code></td>
		<td>normal, multiset</td>
	</tr>
	<tr>
		<td><code>interval</code></td>
		<td><code>closure</code></td>
		<td>closed, open, open-closed, closed-open</td>
	</tr>
	<tr>
		<td><code>list</code></td>
		<td><code>order</code></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="http://cs.jsu.edu/mcis/faculty/leathrum/mathtrans/mathtransdoc.xml" target="_blank" class="external" title="Open in a new window">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 id="Examples">4.5. Examples Using Content Pseudo-TeX</h3>

<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>
	<tr>
		<th>Source</th>
		<th>Content MathML</th>
		<th>Rendered</th>
	</tr>
	<tr>
		<td><code>\int[v:x][l:0][u:\pi;]{\sin{x}}=2</code></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><code>\limit[c:{x\tendsto@above|0}]{\sin{x}/x}=1</code></td>
		<td>
<pre>
<![CDATA[<apply>
 <eq/>
 <apply>
  <limit/>
  <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/>
			  <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><code>x_1=(-b+\root{b2-4a*c})/2a</code></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><code>\sum[v:n][l:1][u:\infinity;]{1/n2}=\pi;^2/6</code></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{-(x2)}}=\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 id="Elements">4.6. Elements of Content MathML Not Covered by Content Pseudo-TeX</h3>

<p>The list below gives the elements of Content MathML which cannot be generated in any usable way by the translator applet. </p>

<dl>
	<dt> <code>type="constant"</code> for <code>&lt;cn&gt;</code> tag</dt>
	<dd>Work-around: use defined stand-alone elements instead.</dd>

	<dt> <code>base</code> attribute for <code>&lt;cn&gt;</code> tag</dt>
	<dd>No work-around available</dd>

	<dt> <code>&lt;csymbol&gt;</code>, <code>&lt;semantics&gt;</code>, <code>&lt;declare&gt;</code>, <code>&lt;annotation&gt;</code>, and <code>&lt;annotation-xml&gt;</code> elements</dt>
	<dd>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</dd>

	<dt> <code>definitionURL</code> and <code>encoding</code> attributes</dt>
	<dd>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</dd>

	<dt> <code>class</code>, <code>id</code>, <code>style</code>, <code>href</code>, <code>xref</code>, and <code>other</code> attributes</dt>
	<dd> 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</dd>
</dl>

<h2 id="Limitations">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 <code>&lt;plus/&gt;</code> in one of the expressions and <code>&lt;minus/&gt;</code> 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>
	<tr>
		<th colspan="2">Separate</th>
		<th>Combined</th>
	</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{&amp;alpha;}*\cos{&amp;beta;}-
\sin{&amp;alpha;}*\sin{&amp;beta;}</pre>
		</td>
		<td>
<pre>\cos{&amp;alpha;-&amp;beta;}=
\cos{&amp;alpha;}*\cos{&amp;beta;}+
\sin{&amp;alpha;}*\sin{&amp;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 <code>&lt;semantics&gt;</code> 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 id="Recommendations">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 <code>&lt;br&gt;</code>, <code>&lt;b&gt;</code>, and <code>&lt;i&gt;</code>. (In place of the presentation tags <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code>, there are corresponding content-level tags <code>&lt;strong&gt;</code> and <code>&lt;em&gt;</code>.) It is worth noting that XHTML does not support the HTML <code>&lt;font&gt;</code> 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 <code>&lt;theorem&gt;</code>...<code>&lt;/theorem&gt;</code> XML environment analogous to the LaTeX <code>\begin{theorem}</code>...<code>\end{theorem}</code> 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" class="external" target="_blank" title="Open in a new window">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>



