<?xml version="1.0" encoding="utf-8"?>

<!-- It seems the below code is required to display greek chars like &mu; , &nbsp; etc. -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
      <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
   ]>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>MathToWeb (MathML example)</title>
	<link rel="stylesheet" href="./../../css/mathtoweb_web.css" type="text/css" />
	<link rel="shortcut icon" href="./images/mathtoweb16x16.ico" />
</head>

<body>

<p class="Small">
MathML generated by <a href="http://www.mathtoweb.com">MathToWeb</a><br/>
A MathML example displaying the <a href="http://www.ams.org/tex/amslatex.html">AMS-Latex</a> pairing
delimiters <span class="code">\lvert</span> and <span class="code">\rvert</span>.<br/>
The commands <span class="code">\left</span> and <span class="code">\right</span> instruct Latex
and MathToWeb to automatically size the delimiters to properly encompass whatever expression
they enclose.
</p>

<p>
<!-- (your Latex) $1 = \sum_n \lvert u_n \rangle \langle u_n \rvert$ -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
	<mn>1</mn>
	<mo>=</mo>
	<mstyle displaystyle="true">
		<munder>
			<mo>&sum;</mo>
			<mi>n</mi>
		</munder>
	</mstyle>
	<mo maxsize="1.00 em">&verbar;</mo>
	<msub>
		<mi>u</mi>
		<mi>n</mi>
	</msub>
	<mo maxsize="1.00 em">&rang;</mo>
	<mo maxsize="1.00 em">&lang;</mo>
	<msub>
		<mi>u</mi>
		<mi>n</mi>
	</msub>
	<mo maxsize="1.00 em">&verbar;</mo>
</mrow>
</math>

<span style="padding-left: 3em;"></span>
<span class="latex"><code>$1 = \sum_n \lvert u_n \rangle \langle u_n \rvert$</code></span>
<br/>
<div class="Small">In this example, we have matched a <span class="code">\lvert</span>
delimiter (on the left), to a <span class="code">\rangle</span> delimiter (on the right) and vise versa, 
demonstrating the point that any left pairing delimiter can, in fact, be matched to any right pairing
delimiter.</div>
</p>


<p>
<code>
<pre>

&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
&lt;mrow&gt;
	&lt;mn&gt;1&lt;/mn&gt;
	&lt;mo&gt;=&lt;/mo&gt;
	&lt;mstyle displaystyle="true"&gt;
		&lt;munder&gt;
			&lt;mo&gt;&amp;sum;&lt;/mo&gt;
			&lt;mi&gt;n&lt;/mi&gt;
		&lt;/munder&gt;
	&lt;/mstyle&gt;
	&lt;mo maxsize="1.00 em"&gt;&amp;verbar;&lt;/mo&gt;
	&lt;msub&gt;
		&lt;mi&gt;u&lt;/mi&gt;
		&lt;mi&gt;n&lt;/mi&gt;
	&lt;/msub&gt;
	&lt;mo maxsize="1.00 em"&gt;&amp;rang;&lt;/mo&gt;
	&lt;mo maxsize="1.00 em"&gt;&amp;lang;&lt;/mo&gt;
	&lt;msub&gt;
		&lt;mi&gt;u&lt;/mi&gt;
		&lt;mi&gt;n&lt;/mi&gt;
	&lt;/msub&gt;
	&lt;mo maxsize="1.00 em"&gt;&amp;verbar;&lt;/mo&gt;
&lt;/mrow&gt;
&lt;/math&gt;

</pre>
</code>
</p>

</body>
</html>

