Forum Bugs

Content mathml annoyance


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" "">
<html xmlns="" xml:lang="en" lang="en">
<math mode="display" xmlns=""><cn>1</cn></math>
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.
Really? That's strange..

I'm using the linux version, could that have something to do with it?
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.
Very nice, thank you!
Prince 7.0 is out now and will not print the base for decimal numbers.