On 6/7/2010 9:43 AM, Rowland, Larry wrote:
or simply use a PNG of the expression
That's good if your output is HTML or something else where bitmap images
are appropriate.
If your output is PDF or PostScript, better to use a vector graphics
form of the equation: PS, PDF, SVG... whatever your XSL-FO formatter can
accept.
I use both vector and bitmap equations in this manual, because I publish
it in HTML and PDF formats:
http://fcalc.net/manual/ (HTML version)
http://fcalc.net/manual.pdf (PDF version of same)
The code for each equation looks like this:
<equation id="spot-diam-eq">
<title>spot meter diameter</title>
<mediaobject>
<imageobject role="fo">
<imagedata fileref="formulas/meter-diameter.pdf"/>
</imageobject>
<imageobject role="html">
<imagedata fileref="formulas/meter-diameter.png"/>
</imageobject>
<textobject>
<phrase>d = 2 times the square root of A p over pi</phrase>
</textobject>
</mediaobject>
</equation>
That particular equation's here: http://fcalc.net/manual/spotmeter.html
The differing "role" attributes ensures that each version of the manual
gets only the equation graphic type appropriate to it.
I generate both versions from a single LaTeX file using standard Unix
"small parts loosely joined" techniques. The manual is built with Make,
so adding a prerequisite step that turns these LaTeX files into PDF and
PNG files is trivial.
I chose this method over MathML because I'm only aware of one XSL-FO
formatter that will accept it, MathML support is an optional feature at
extra cost for that formatter, and I don't own a license for that
formatter anyway.
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-h...@lists.oasis-open.org