Forum Bugs

Content mathml annoyance

jsvendsen
Hi,

As seen when rendering the example below, prince always prints the base of a number enclosed in a cn-element, something which is not very nice looking when dealing with decimal numbers. This happens with both the most recent version 6 and the version 7 beta.

(Come to think of it, the "xhtml-math-svg-flat.dtd" is also not present in the prince package, despite it being the w3c-recommended dtd to use for this doctype. I had to copy it from the provided "xhtml-math-svg.dtd")

<?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-flat.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body>
<math mode="display" xmlns="http://www.w3.org/1998/Math/MathML"><cn>1</cn></math>
</body>
</html>
mikeday
Are you sure? Prince should only print the base when the base attribute is present on the <cn> element, and for your test case I only see the number "1" with no base subscript.
jsvendsen
Really? That's strange..

I'm using the linux version, could that have something to do with it?
mikeday
It seems that the xhtml-math-svg-flat.dtd is supplying a default value of "10" for the base attribute on <cn> elements, so every <cn> element appears to have this attribute. We'll change Prince not to print the base when it is decimal.
jsvendsen
Very nice, thank you!
mikeday
Prince 7.0 is out now and will not print the base for decimal numbers.