Forum How do I...?

… align MathML correctly?

ProfLogic
<?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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>MathML</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
	<p>
		The equation
		<math xmlns="http://www.w3.org/1998/Math/MathML" style="vertical-align: baseline">
			<mrow>
				<msup>
					<mi style="prince-math-baseline: baseline">x</mi>
					<mn>2</mn>
				</msup>
				<mo>=</mo>
				<mfrac>
					<mn>1</mn>
					<mn>2</mn>
				</mfrac>
			</mrow>
		</math>
		should be aligned correctly.
	</p>
</body>
</html>


The result in Prince 7.1 is misaligned as you can see in the attached file.
  1. index.png2.9 kB
    result
mikeday
This will be fixed in the next release of Prince.
floba
What is the current status? The roadmap http://www.princexml.com/roadmap/ actually says:

Calculate the baseline of MathML chunks in order to vertically align them to the baseline of the surrounding block. (ref, ref, ref)
*Done* 2010-03-03


If there was a batter math support, you could blow away the (more or less) good old LaTeX :-)

Thanks for reply!
mikeday
The bug fix will be in the next release, but I think we still have more work to do on making maths look better before we can seriously challenge LaTeX. :D
mikeday
Prince 8.0 is now out in beta, and includes correct baseline alignment of MathML.
annadurai
the equations are exceed from the page
mikeday
Can you attach an example showing the problem?