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

*Subject*: **Re: [docbook] HOW TO: format formula in docbook 5**

*From*:**Warren Young <warren@etr-usa.com>***To*: DocBook Mail List <docbook@lists.oasis-open.org>*Date*: Mon, 07 Jun 2010 10:36:35 -0600

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.

**References**:**HOW TO: format formula in docbook 5***From:*David Gao <gao_jianmin@vanceinfo.com>

**Re: [docbook] HOW TO: format formula in docbook 5***From:*David Gao <gao_jianmin@vanceinfo.com>

**RE: [docbook] HOW TO: format formula in docbook 5***From:*"Rowland, Larry" <larry.rowland@hp.com>

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