OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Need help using MathML ("Unknown formatting object "{http://www.w3.org/1998/Math/MathML}math" encountered")


Hello,
I am rather new to docbook, but I have been successful using docbook (installed in Ubuntu 13.10) except for MathML content. Any math formatting is missing in the html output, and the pdf output is totally lacking the math content (not only the formatting).

Can you please check the detailed description below and suggest how I can start working with MathML content to produce both html pages and printed documents with nicely formatted formulas?

I have installed the following packages in ubuntu 13.10:
$sudo apt-get install xsltproc docbook-xsl docbook-defguide fop docbook-xsl-doc-pdf docbook-mathml

I am trying to process the following example (from http://www.docbook.org/tdg5/en/html/_any.mml.html) into html and pdf:

test.xml:
--------------------------------------------------------
<article xmlns='http://docbook.org/ns/docbook'
      xmlns:mml="http://www.w3.org/1998/Math/MathML">
    <title>Example mml-math</title>
 
    <informalequation>
    <mml:math>
      <mml:msup>
        <mml:mi>x</mml:mi>
        <mml:mn>3</mml:mn>
      </mml:msup>
    </mml:math>
    </informalequation>
   
</article>
--------------------------------------------------------

First I process test.xml into test.html with the following output:
--------------------------------------------------------
$ xsltproc -o test.html /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl test.xml
Note: namesp. cut : stripped namespace before processing           Example mml-math
Note: namesp. cut : processing stripped document                   Example mml-math
$
--------------------------------------------------------

The equation shows as "x 3" in test.html (the superscript is ignored). Other MathML pages appear correctly in my firefox browser.

Next, I process test.xml into test.pdf with the following output:
--------------------------------------------------------
$ xsltproc -o test.fo /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl test.xml
Note: namesp. cut : stripped namespace before processing           Example mml-math
Note: namesp. cut : processing stripped document                   Example mml-math
Making portrait pages on USletter paper (8.5inx11in)
$ fop -pdf test.pdf -fo test.fo
Unknown formatting object "{http://www.w3.org/1998/Math/MathML}math" encountered (a child of fo:instream-foreign-object}. (See position 2:29495)
Unknown formatting object "{http://www.w3.org/1998/Math/MathML}msup" encountered (a child of math}. (See position 3:17)
Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mi" encountered (a child of msup}. (See position 4:17)
Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mn" encountered (a child of msup}. (See position 5:17)
Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
Font "ZapfDingbats,normal,700" not found. Substituting with "ZapfDingbats,normal,400".
The intrinsic dimensions of an instream-foreign-object could not be determined. (See position 2:29438)
Rendered page #1.
$
--------------------------------------------------------

The pdf file shows nothing but the title.

What is wrong? Do I need to install additional packages? Can you show a MathML example that renders correctly with the described setup?

Thank you
Daniel


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]