[xml/sgml-pkgs] Bug#454214: HOWTO: DocBook+MathML+SVG
Gordon Haverland
ghaverla at materialisations.com
Tue Dec 4 00:35:50 UTC 2007
Package: docbook-xml
Version: 4.5-5
Severity: wishlist
Tags: patch
In the past I've managed to shoehorn DocBook into doing MathML and
DocBook into dong SVG. And outside of DocBook-5 based stuff, it
still doesn't look like any of this is easy. (By the way, when is
DocBook-5 making its way into Debian?)
Anyway, I got restarted on an old project, which required MathML and SVG
in DocBook. I could not make this work using the dbmathml DTD, I had to
go back to the docbookx DTD. What works is:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
[
<!ENTITY % MATHML.prefixed "INCLUDE">
<!ENTITY % MATHML.prefix "mml">
<!ENTITY % equation.content "(alt?, (graphic+|mediaobject+|mml:math))">
<!ENTITY % inlineequation.content
"(alt?, (inlinegraphic+|inlinemediaobject+|mml:math))">
<!ENTITY % mathml PUBLIC "-//W3C//DTD MathML 2.0//EN"
"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
%mathml;
]
>
...
<mml:math>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mn>1</mml:mn>
</mml:mfrac>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mn>2</mml:mn>
</mml:mfrac>
</mml:math>
...
<mediaobject>
<imageobject>
<imagedata format="SVG" fileref="house.svg"/>
</imageobject>
</mediaobject>
I could not find a way to actually put SVG into the DocBook-XML source.
But perhaps a file could get added to the documentation telling people
how to do this magic in DocBook-4.x?
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.21 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages docbook-xml depends on:
ii sgml-base 1.26 SGML infrastructure and SGML catal
ii sgml-data 2.0.3 common SGML and XML data
ii xml-core 0.11 XML infrastructure and XML catalog
docbook-xml recommends no packages.
-- no debconf information
More information about the debian-xml-sgml-pkgs
mailing list