]> MathToWeb (MathML example)

MathML generated by MathToWeb

A MathML example displaying the AMS-Latex math environment align being used to annotate an equation line-by-line with cross-references to other equations being made from within. MathToWeb treats references (which are, in fact, just links) that are inside MathML differently that those that are outside. Looking at the MathML code below (we have set the pertinent code in bold), we see that the hyperlinks that represent the cross-references are actually XML xlink calls made from <mrow> tags, for example,
<mrow xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="#align-eq1">1.6</mrow>, rather than normal HTML hyperlinks <a href="#align-eq1">1.6</a>. The former is necessary for links inside MathML because it is, after all, an XML application.

\begin{align}
y& = x_0+x_1-x_2+x_3-\dotsb  && \text{by \ref{align-eq1}}    \tag{1.9}\label{align-eq4}\\
 & = y_0+y_1                 && \text{by \eqref{align-eq2}}  \notag \\
 & = q_0-q_1+q_2             && \text {by Axiom 4.}          \tag{2.0}\label{align-eq5}
\end{align}
                  
y = x 0 + x 1 - x 2 + x 3 - by 1.6 = y 0 + y 1 by (1.7) = q 0 - q 1 + q 2 by Axiom 4. (1.9)
()
(2.0)

Note:  The two equations to which the above example makes reference (i.e. 1.6 and 1.7) are below.
They have equation numbers that resemble the following:   <a id="align-eq1">(1.6)</a>.

a = b A = B x = y + z c d = e f C D = E F k = m g + h = i + j G + H = I + J n q = r s (1.6)
(1.7)
(1.8)


<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
	<mtable class="m-align">
		<mtr>
			<mtd columnalign="right">
				<mi>y</mi>
			</mtd>
			<mtd columnalign="left">
				<mo>=</mo>
				<msub>
					<mi>x</mi>
					<mn>0</mn>
				</msub>
				<mo>+</mo>
				<msub>
					<mi>x</mi>
					<mn>1</mn>
				</msub>
				<mo>-</mo>
				<msub>
					<mi>x</mi>
					<mn>2</mn>
				</msub>
				<mo>+</mo>
				<msub>
					<mi>x</mi>
					<mn>3</mn>
				</msub>
				<mo>-</mo>
				<mo>&ctdot;</mo>
			</mtd>
			<mtd>
				<mspace width="1em" />
			</mtd>
			<mtd columnalign="right">
			</mtd>
			<mtd columnalign="left">
				<mtext>by&nbsp;<mrow xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="#align-eq1">1.6</mrow>
				</mtext>
			</mtd>
		</mtr>
		<mtr>
			<mtd columnalign="right">
			</mtd>
			<mtd columnalign="left">
				<mo>=</mo>
				<msub>
					<mi>y</mi>
					<mn>0</mn>
				</msub>
				<mo>+</mo>
				<msub>
					<mi>y</mi>
					<mn>1</mn>
				</msub>
			</mtd>
			<mtd>
				<mspace width="1em" />
			</mtd>
			<mtd columnalign="right">
			</mtd>
			<mtd columnalign="left">
				<mtext>by&nbsp;(<mrow xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="#align-eq2">1.7</mrow>)
				</mtext>
			</mtd>
		</mtr>
		<mtr>
			<mtd columnalign="right">
			</mtd>
			<mtd columnalign="left">
				<mo>=</mo>
				<msub>
					<mi>q</mi>
					<mn>0</mn>
				</msub>
				<mo>-</mo>
				<msub>
					<mi>q</mi>
					<mn>1</mn>
				</msub>
				<mo>+</mo>
				<msub>
					<mi>q</mi>
					<mn>2</mn>
				</msub>
			</mtd>
			<mtd>
				<mspace width="1em" />
			</mtd>
			<mtd columnalign="right">
			</mtd>
			<mtd columnalign="left">
				<mtext>by Axiom 4.</mtext>
			</mtd>
		</mtr>
	</mtable>
</mrow>
</math>