DocBook does not have elements to describe mathematics. DocBook does provide two container elements for mathematics: equation
to format the math as a block (with or without a title), and inlinequation
to include math within a paragraph or other inline context. You have several alternatives for what you put in the container element:
Plain text for simple math.
Capture a representation of the mathematics as a bitmap image.
Model the mathematics with Scalable Vector Graphics (SVG). This solution is only for output formats that can handle SVG.
Model the mathematics in TeX if a downstream process can handle TeX.
Model the mathematics in MathML if a downstream processor can handle MathML.
Some mathematics can be expressed as straight text, using characters from the keyboard and special characters entered as entities. You might think you could put the text in an inlineequation
element, but its content model does not permit bare text.
The only solution seems to be to use phrase
with a role="math"
attribute for inline instances. The stylesheets don't apply any special formatting to phrase
by default, so you would have to create a stylesheet customization if you want special formatting. This example makes the math italic:
<xsl:template match="phrase[@role = 'math']"> <xsl:call-template name="inline.italicseq"/> </xsl:template>
The math you can display this way is limited to a linear sequence of text and symbols, with superscript
and subscript
as the only modifiers.
DocBook XSL: The Complete Guide - 3rd Edition | PDF version available | Copyright © 2002-2005 Sagehill Enterprises |