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: Re: [docbook] Need help using MathML ("Unknown formatting object "{http://www.w3.org/1998/Math/MathML}math" encountered")


On 12/06/2013 05:20 AM, Daniel Bishop wrote:
> 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>
> --------------------------------------------------------

that looks good...

>
> 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
> $
> --------------------------------------------------------

You should use namespace-aware stylesheets to process this input (see
http://docbook.org/docs/howto/).

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

I'm observing the same. I'm not exactly sure why FF is behaving that
way, but when I produce XHTML instead of HTML, and use the .xhtml
extension for the generated files, the superscript displays fine.



>
> 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.
> $
> --------------------------------------------------------

Again, use namespace-aware stylesheets.

In addition, I had to patch my fop installation to make it handle MathML
correctly. Whether that is an actual problem for you depends on the
platform you are on, as well as the specific FOP version you are using.

Hope this helps,

        Stefan


>
> 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


-- 

      ...ich hab' noch einen Koffer in Berlin...



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