[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK: equations
I'd appreciate hints and references (tutorial?) on how to (if at all) including mathematical expressions in DocBook.Not knowing any better, I noticed that the DTD lists "tex" as a valid graphics extension for <graphics> and <imageobject>. I just added a bit to the print part of my customized copy of cygnus-both.dsl:
(define %graphic-extensions% '("jpg" "png" "tex" "gif")) ;;What is the default extension for graphics? (define %graphic-default-extension% "tex") (define preferred-mediaobject-notations (list "TEX" "JPG" "JPEG" "PNG" "linespecific")) (define preferred-mediaobject-extensions (list "tex" "jpg" "jpeg" "png")) (define acceptable-mediaobject-extensions (list "gif" "bmp")) (define acceptable-mediaobject-notations (list "GIF" "GIF87a" "GIF89a" "BMP"))Now I can simply put tex equations into a file, e.g.
\begin{displaymath} \int H(x,x')\psi(x')dx' = -\frac{\hbar^2}{2m}\frac{d^2}{dx^2} \psi(x)+V(x)\psi(x) \end{displaymath}and refer to the tex file as with any other graphics file:
<equation> <title>this is an equation</title> <mediaobject> <imageobject><imagedata format="tex" fileref="figures/eqn.tex"></imageobject> <imageobject><imagedata format="gif" fileref="figures/eqn.gif"></imageobject> </mediaobject> </equation>Pointing jade to the modified dsl, the tex backend renders the equations beautifully. I provide a gif for the sgml backend. No changes to the DTD and just a little added to the front of the dsl. For an example, see cator.hsc.edu/~kmd/docbook/equations/
-- Kevin M. Dunn kevinmd@hsc.edu Department of Chemistry Hampden-Sydney College HSC, VA 23943 (804) 223-6181 (804) 223-6374 (Fax)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC