tbook: DTD Element View | [User Element View] |
[Home] [Elements] [Entities] | [Prev] [Next] |
(#PCDATA)
Name | Type | Default Value |
---|---|---|
xmlns | CDATA | "" (fixed) |
style | CDATA | None |
class | CDATA | None |
id | ID | None |
The following parameter entities contain m: indexinline, inline
Corresponds to $...$ in LaTeX, but uses a somewhat different expression syntax, see below. Attention: If it has an id, it's becoming a displayed Formula, with a number.
You can use <m> inside MathML's <math>. The same applies to <ch> and <unit>.
In principle, you can use <m> wherever you can use <mrow>. However, sometimes it may be necessary to enclose <m> and friends with <mrow>, because they may expand to multiple MathML elements.
You can use directly MathML's presentation markup in tbook files. For this, insert <math> elements without worrying about namespaces. But except for not too complicated equations this is quite longish.
tbook's formula elements <m> and friends use simplified LaTeX syntax. You may use roots, fractions, standard functions like “$\sin$”, stretchable braces, sub- and superscripts and accents. You may nest these structures so deep until your XSLT processor complains. And you can use these elements inside MathML to get the best of both worlds. (However HTML output only contains valid MathML.)
Roots work with \sqrt, fractions with \frac, just as in LaTeX. Human text is included via \text that is known from AmSTeX. Standard functions are typed without a `\'. Stretchable braces are all braces immediately within a {...} grouping. Sub- and superscrips as in LaTeX, but always a possible subscript before the superscript. Accents are just written immediately before the accented variable or group, they're made wide accents if necessary. If you make a space between accent and anything that follows, the accent is treated as an operator. (So, a \vec becomes a \to.)
Here an example:
<m>^{1-x_{\text{eff}}} ≠ {( ∫_0^∞ sin(˜x) \frac{\sqrt[3]{1/e}}β dx )} ≠ lim_{x → ∞}\frac1x</m>
becomes
For HTML output, the responsible stylesheet produces:
<math><mover accent="true"><mrow><mn>1</mn><mo>-</mo><msub><mi>x</mi> <mrow><mtext>eff</mtext></mrow></msub></mrow> <mo>^</mo></mover><mo>≠</mo><mrow><mo>(</mo> <munderover><mo>∫</mo><mn>0</mn><mo>∞</mo></munderover> <mi>sin</mi><mo stretchy="false">(</mo><mover accent="true"> <mi>x</mi><mo>~</mo></mover><mo stretchy="false">)</mo> <mfrac><mrow><mroot><mrow><mn>1</mn><mo>/</mo><mi>e</mi></mrow> <mn>3</mn></mroot></mrow><mi>&beta</mi></mfrac><mi>d</mi><mi>x</mi> <mo>)</mo></mrow><mo>≠</mo><munder><mi>lim</mi><mrow><mi>x</mi> <mo>→</mo><mo>∞</mo></mrow></munder><mfrac><mn>1</mn> <mi>x</mi></mfrac></math>
Lucky us.
Notice that you can use <m>, <ch> and <unit> within MathML constructs. If you use these elements within a MathML equation array, you can generate alignment markers (in LaTeX known as `&' signs) with `#' signs, because this is shorter than &. Put them where they would be in LaTeX. Although MathML requires such a marker at the very beginning of an equation row, this is not true for LaTeX, and not true for tbook.
In this context some words about MathML. You may use it if you want, for more complicated formulas you must use it, unfortunately. It's always enclosed by <math>...</math>, but only presentation markup can be transformed to LaTeX yet.
tbook treats a <math> element as an equation array, if it consists of only one <mtable>, with a groupalign attribute or one or more <mlabledtr> rows. If you set groupalign="right center left", this leads to an eqnarray in LaTeX, and where `&' are in LaTeX, you have to use <maligngroup/> in MathML. Else the equations are just stacked and not aligned. But as already mentioned, you can also use <m> inside <math>, which is very helpful for equation arrays:
<math> <mtable groupalign="right center left"> <mtr> <mtd id="test"> <m> 1+1 #=# 2 </m> </mtd> <mtd> <m> 4 #=# 2 · 2 </m> </mtd> </mtr> </mtable> </math>
which is the same as LaTeX's
\begin{eqnarray} 1+1 &=& 2 \label{Test} \\ 4 &=& 2 \cdot 2 \nonumber \\ \end{eqnarray}
and you don't want to see the HTML/MathML output tbook must create for that. By the way, being the only child element of an <mtd>, <m> is implicitly surrounded by an <mrow> which is necessary in this context.
A tricky point is equation labelling and numbering. tbook supports three ways of giving an equation a label:
You may use the <ref> element to refer to such equations, but for the contents of the <mtd> element in the third case, you have to use <mathref>. I would recommend you to use only 1. and 2. See the MathML specs at the W3C for more information.
aphorism, caption, cell, cite, closing, em, footnote, heading, idx, item, ix, ix2, legalnotice, mathref, multipar, opening, p, pageref, proof, psfrag, quote, ref, subject, subtitle, term, theorem, title, to, verse, visual, vref, wrap