docbook-apps

  • 1.  db5: 1] Admon graphics in fo output + 2] MathML

    Posted 11-18-2006 10:02
    Hello,

    1] Admon graphics in fo output (no solutions in docbook-xsl-1.71.1 OR
    docbook5ns-xsl-1.71.0) :
    db5: Admon graphics FAILED, thanks a lot for your answers but it's don't work
    (full path or good path before doing a fo file) ...

    So, i test with the file : howto.xml (docbook-5.0b9/docs/howto.xml), but it y
    already of the errors of validation :
    xmllint --noout --relaxng ../libs/docbook-5.0b9/custom_rng.rng howto.xml

    howto.xml:8: element article: Relax-NG validity error : Expecting element set,
    got article
    howto.xml:9: element info: Relax-NG validity error : Expecting an element
    abstract, got nothing
    howto.xml:31: element note: Relax-NG validity error : Did not expect element
    note there
    howto.xml:32: element para: Relax-NG validity error : Element article has
    extra content: para
    howto.xml:8: element article: Relax-NG validity error : Did not expect element
    article there
    howto.xml fails to validate

    => howto.xml line 8 :
    version="5.0" xml:lang="fr" >

    I wonder whether there is not a bond with the admon ?
    Have you an idea ?


    2] MathML, fop 0.92 :
    ant all
    [echo] Jimi Support NOT Present
    [echo] JAI Support PRESENT
    [echo] JCE Support PRESENT
    [echo] JUnit Support PRESENT
    [echo] XMLUnit Support PRESENT

    => When i use it :
    18 nov. 2006 13:54:56 org.apache.fop.fo.ElementMappingRegistry findFOMaker
    ATTENTION: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    18 nov. 2006 13:54:56 org.apache.fop.fo.ElementMappingRegistry findFOMaker
    ATTENTION: Unknown formatting object http://www.w3.org/1998/Math/MathML^mrow
    18 nov. 2006 13:54:56 org.apache.fop.fo.ElementMappingRegistry findFOMaker

    In my xml docbook file :


    ]>
    xmlns:xl="http://www.w3.org/1999/xlink"
    xmlns:mml="http://www.w3.org/1998/Math/MathML"
    version="5.0" xml:lang="fr" >
    ....
    ....
    ....

    <para>
    <informalequation>
    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
    <mml:mrow>
    <mml:mi>A</mml:mi>
    <mml:mo>=</mml:mo>
    <mml:mfenced open="[" close="]">
    <mml:mtable>
    <mml:mtr>
    <mml:mtd><mml:mi>x</mml:mi></mml:mtd>
    <mml:mtd><mml:mi>y</mml:mi></mml:mtd>
    </mml:mtr>
    <mml:mtr>
    <mml:mtd><mml:mi>z</mml:mi></mml:mtd>
    <mml:mtd><mml:mi>w</mml:mi></mml:mtd>
    </mml:mtr>
    </mml:mtable>
    </mml:mfenced>
    </mml:mrow>
    <mml:mtext>.</mml:mtext>
    </mml:math>
    </informalequation>
    </para>

    => In my pdf output : no the mathematical equation
    Have you an idea ?

    Best regards,
    Bruno

    PS :
    My config :
    ----------------
    XML_CATALOG_FILES="/etc/xml/catalog ../libs/docbook-5.0b9/catalog.xml ../libs/docbook5ns-xsl-1.71.0/catalog.xml"
    I use : fop (SVN Trunk)

    xsltproc -V
    Using libxml 20626-CVS2819, libxslt 10117-CVS1065 and libexslt 813-CVS1065
    xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813
    libxslt 10117 was compiled against libxml 20626
    libexslt 813 was compiled against libxml 20626

    --
    Ainsi toute connaissance humaine commence avec des intuitions, passe de là aux
    concepts et s'achève avec les idées.
    Emmanuel Kant



  • 2.  Re: [docbook-apps] db5: 1] Admon graphics in fo output + 2] MathML

    Posted 11-18-2006 11:34
    I don't put MathML directly beneath <informalequation>, so I can't say
    for sure. However, I think the DocBook stylesheets may not be placing
    <fo:instream-foreign-object> tags around your MathML.

    If that is the case, you could fix it by including something like the
    following (untested) template in your customization layer:

    <xsl:template match="equation|informalequation|inlineequation">
    <xsl:choose>
    <xsl:when xmlns:mml="http://www.w3.org/1998/Math/MathML" test="mml:*">
    <fo:instream-foreign-object>
    <xsl:apply-templates/>
    </fo:instream-foreign-object>
    </xsl:when>
    <xsl:otherwise>
    <xsl:apply-imports/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>

    That still probably won't fix the problems with FOP not rendering your
    MathML because, AFAIK, FOP doesn't handle MathML natively.

    One option I am experimenting with (and will use if I can't make EPS
    exports work the way I want them) is MathML->SVG conversion using
    SVGMath[1].

    Beware the default configuration file in SVGMath. It references the
    Mathematica 7 True Type font from the MIT MathML fonts package for
    FireFox. That font is not unicode compatable and will crash SVGMath.
    The author, Nikolai Grigoriev, has modified his font file to be
    Unicode compatible, so that is how it slipped into the config file. He
    provided me with an alternate config file that doesn't use
    Mathematica7 (but that also can't draw most double struck characters).
    If he says it's okay, I could send it to you.

    [1] http://www.grigoriev.ru/svgmath/

    On 11/18/06, Bruno GUEGAN <bruno_guegan@yahoo.fr> wrote:
    > Hello,
    >
    > 1] Admon graphics in fo output (no solutions in docbook-xsl-1.71.1 OR
    > docbook5ns-xsl-1.71.0) :
    > db5: Admon graphics FAILED, thanks a lot for your answers but it's don't work
    > (full path or good path before doing a fo file) ...
    >
    > So, i test with the file : howto.xml (docbook-5.0b9/docs/howto.xml), but it y
    > already of the errors of validation :
    > xmllint --noout --relaxng ../libs/docbook-5.0b9/custom_rng.rng howto.xml
    >
    > howto.xml:8: element article: Relax-NG validity error : Expecting element set,
    > got article
    > howto.xml:9: element info: Relax-NG validity error : Expecting an element
    > abstract, got nothing
    > howto.xml:31: element note: Relax-NG validity error : Did not expect element
    > note there
    > howto.xml:32: element para: Relax-NG validity error : Element article has
    > extra content: para
    > howto.xml:8: element article: Relax-NG validity error : Did not expect element
    > article there
    > howto.xml fails to validate
    >
    > => howto.xml line 8 :
    > version="5.0" xml:lang="fr" >
    >
    > I wonder whether there is not a bond with the admon ?
    > Have you an idea ?
    >
    >
    > 2] MathML, fop 0.92 :
    > ant all
    > [echo] Jimi Support NOT Present
    > [echo] JAI Support PRESENT
    > [echo] JCE Support PRESENT
    > [echo] JUnit Support PRESENT
    > [echo] XMLUnit Support PRESENT
    >
    > => When i use it :
    > 18 nov. 2006 13:54:56 org.apache.fop.fo.ElementMappingRegistry findFOMaker
    > ATTENTION: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    > 18 nov. 2006 13:54:56 org.apache.fop.fo.ElementMappingRegistry findFOMaker
    > ATTENTION: Unknown formatting object http://www.w3.org/1998/Math/MathML^mrow
    > 18 nov. 2006 13:54:56 org.apache.fop.fo.ElementMappingRegistry findFOMaker
    >
    > In my xml docbook file :
    >
    > >
    > ]>
    >
    > xmlns:xl="http://www.w3.org/1999/xlink"
    > xmlns:mml="http://www.w3.org/1998/Math/MathML"
    > version="5.0" xml:lang="fr" >
    > ....
    > ....
    > ....
    >
    > <para>
    > <informalequation>
    > <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
    > <mml:mrow>
    > <mml:mi>A</mml:mi>
    > <mml:mo>=</mml:mo>
    > <mml:mfenced open="[" close="]">
    > <mml:mtable>
    > <mml:mtr>
    > <mml:mtd><mml:mi>x</mml:mi></mml:mtd>
    > <mml:mtd><mml:mi>y</mml:mi></mml:mtd>
    > </mml:mtr>
    > <mml:mtr>
    > <mml:mtd><mml:mi>z</mml:mi></mml:mtd>
    > <mml:mtd><mml:mi>w</mml:mi></mml:mtd>
    > </mml:mtr>
    > </mml:mtable>
    > </mml:mfenced>
    > </mml:mrow>
    > <mml:mtext>.</mml:mtext>
    > </mml:math>
    > </informalequation>
    > </para>
    >
    > => In my pdf output : no the mathematical equation
    > Have you an idea ?
    >
    > Best regards,
    > Bruno
    >
    > PS :
    > My config :
    > ----------------
    > XML_CATALOG_FILES="/etc/xml/catalog ../libs/docbook-5.0b9/catalog.xml ../libs/docbook5ns-xsl-1.71.0/catalog.xml"
    > I use : fop (SVN Trunk)
    >
    > xsltproc -V
    > Using libxml 20626-CVS2819, libxslt 10117-CVS1065 and libexslt 813-CVS1065
    > xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813
    > libxslt 10117 was compiled against libxml 20626
    > libexslt 813 was compiled against libxml 20626
    >
    > --
    > Ainsi toute connaissance humaine commence avec des intuitions, passe de là aux
    > concepts et s'achève avec les idées.
    > Emmanuel Kant
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >


    --
    http://chris.chiasson.name/