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] HOW TO: format formula in docbook 5

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 

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>
         <imageobject role="fo">
           <imagedata fileref="formulas/meter-diameter.pdf"/>
         <imageobject role="html">
           <imagedata fileref="formulas/meter-diameter.png"/>
           <phrase>d = 2 times the square root of A p over pi</phrase>

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.

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