XML technologies / DocBook / Block elements / Equations / Inserting as a block element
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
The elements equation and informalequation are used for equations that should appear as separate blocks in the output. With informalequation no title is required, whereas with equation one is required. (Note one detail: through DocBook version 4.2, the element title in equation is optional. This makes it practically equivalent to an informalequation. This is not true of other elements, such as table/ informaltable, example/ informalexample . DocBook 5 corrects this inconsistency. In practice, always provide a title in equation in your documents. If you do not need one, use informalequation.)
An equation consists of an optional alt and one or more mediaobject elements:
Example: Structure of a displayed equation (equation.xml)
<equation>
<title>Zerfallsgesetz</title>
<alt role="latex">N = N_0 e^{-\lambda t}</alt>
<mediaobject>
<imageobject role="html">
<imagedata fileref="zerfallsgesetz.png"/>
</imageobject>
<imageobject role="fo">
<imagedata fileref="zerfallsgesetz.svg"/>
</imageobject>
</mediaobject>
</equation>Line 3: Contains an alternative representation of the equation, here LaTeX.
Line 4: Contains the equation as an image.
The attribute role specifies the markup syntax of alt. LaTeX is very common. The XSLT stylesheets can take this into account. For more information, see Inserting mathematical formulas in (X)HTML.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top