~ubuntu-branches/ubuntu/precise/dblatex/precise

« back to all changes in this revision

Viewing changes to docs/xhtml/manual/ch03s06.html

  • Committer: Package Import Robot
  • Author(s): Andreas Hoenen
  • Date: 2011-07-09 15:20:37 UTC
  • mfrom: (0.8.1) (0.6.2) (8.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: package-import@ubuntu.com-20110709152037-8ao9l07dmgyjn6vn
* New upstram release
* New upstream release fixes the following open Debian BTS issues:
  + Don't crash on XeTeX backend compilation of spanish documents with an
    <appendix> element.  Thanks to W. Martin Borgert for reporting.
    Closes: #629110
* Remove patches that have been integrated upstream:
  + 20_filename_replaceable.patch (#623590)
* Take over actualized copyright period of upstream COPYRIGHT to
  debian/copyright.
* Replace python build helper dh_pysupport with dh_python2.
* In draft mode set draft watermark for XeTeX backend, too.  Thanks to W.
  Martin Borgert for reporting and for the patch.  Closes: #629514

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
 
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Writing Mathematics</title><link rel="stylesheet" href="manual.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="DocBook to LaTeX Publishing" /><link rel="up" href="ch03.html" title="Chapter 3. Using dblatex" /><link rel="prev" href="sec-table.html" title="Creating Tables" /><link rel="next" href="sec-verbatim.html" title="Extending the Verbatim Rendering" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing Mathematics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-table.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using dblatex</th><td width="20%" align="right"> <a accesskey="n" href="sec-verbatim.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3408029"></a>Writing Mathematics</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ch03s06.html#id3408356">Writing LaTeX Mathematical Equations</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3408075">
 
3
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Writing Mathematics</title><link rel="stylesheet" href="manual.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="DocBook to LaTeX Publishing" /><link rel="up" href="ch03.html" title="Chapter 3. Using dblatex" /><link rel="prev" href="sec-table.html" title="Creating Tables" /><link rel="next" href="sec-verbatim.html" title="Extending the Verbatim Rendering" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing Mathematics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-table.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using dblatex</th><td width="20%" align="right"> <a accesskey="n" href="sec-verbatim.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id3408309"></a>Writing Mathematics</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ch03s06.html#id3409386">Writing LaTeX Mathematical Equations</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3409902">
4
4
   Writing MathML equations
5
 
  </a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3408356"></a>Writing LaTeX Mathematical Equations</h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ch03s06.html#id3408165">Presentation</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3408514">Implementation choice</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3408919">Compatibility</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3408846">Examples</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3408165"></a>Presentation</h4></div></div></div><p>DocBook doesn't define elements for writing mathematical equations. Only
 
5
  </a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3409386"></a>Writing LaTeX Mathematical Equations</h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ch03s06.html#id3409334">Presentation</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3409039">Implementation choice</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3409964">Compatibility</a></span></dt><dt><span class="section"><a href="ch03s06.html#id3408590">Examples</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3409334"></a>Presentation</h4></div></div></div><p>DocBook doesn't define elements for writing mathematical equations. Only
6
6
few elements exist that tell how equation should be displayed (inlined,
7
7
block):</p><div class="itemizedlist"><ul type="disc"><li><p><code class="sgmltag-element">inlineequation</code> tells that the equation is
8
8
inlined,</p></li><li><p><code class="sgmltag-element">informalequation</code> tells that the equation is displayed
9
9
as a block, without a title.</p></li><li><p><code class="sgmltag-element">equation</code> tells that the equation is displayed as a
10
10
block, with or without a title.</p></li></ul></div><p>These tags include a graphic (<code class="sgmltag-element">graphic</code> or
11
11
<code class="sgmltag-element">mediaobject</code>) or an alternative text equation, as shown by
12
 
the example.</p><div class="example"><a id="id3408728"></a><p class="title"><b>Example 3.5. Equation taken from TDG</b></p><div class="example-contents"><pre class="programlisting">
 
12
the example.</p><div class="example"><a id="id3408838"></a><p class="title"><b>Example 3.5. Equation taken from TDG</b></p><div class="example-contents"><pre class="programlisting">
13
13
&lt;equation&gt;&lt;title&gt;Last Theorem of Fermat&lt;/title&gt; 
14
14
  &lt;alt&gt;x^n + y^n &amp;ne; z^n &amp;forall; n &amp;ne; 2&lt;/alt&gt;
15
15
  &lt;graphic fileref="figures/fermat"&gt;&lt;/graphic&gt;
16
16
&lt;/equation&gt;
17
 
   </pre></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3408514"></a>Implementation choice</h4></div></div></div><p>The principle is to use only the <code class="sgmltag-element">alt</code> element. If
 
17
   </pre></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3409039"></a>Implementation choice</h4></div></div></div><p>The principle is to use only the <code class="sgmltag-element">alt</code> element. If
18
18
initially <code class="sgmltag-element">alt</code> contains actually the text to print, it is
19
19
chosen to use this element to embed LaTeX mathematical equations. This choice
20
20
has the following advantages:</p><div class="itemizedlist"><ul type="disc"><li><p>The translation done by dblatex is really easy, since the equation is
22
22
formulas.</p></li><li><p>One doesn't need to write the equations in MathML.</p></li><li><p>This method isn't specific to this tool (see the following
23
23
section).</p></li></ul></div><p>Besides, the implementation is as light as possible. This is why it is
24
24
up to the writer to properly use the mathematical delimiters ($, \(, \), \[,
25
 
\]). By this way the writer fully controls how he writes equations.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3408919"></a>Compatibility</h4></div></div></div><p>This implementation is not contradictory nor specific. In particular,
 
25
\]). By this way the writer fully controls how he writes equations.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3409964"></a>Compatibility</h4></div></div></div><p>This implementation is not contradictory nor specific. In particular,
26
26
the <a class="ulink" href="http://ricardo.ecn.wfu.edu/~cottrell/dbtexmath/" target="_top">DBTeXMath</a>
27
27
proposal to extend the DSSSL stylesheets used by jade follows the same
28
 
approach, and is integrated in the Norman Walsh XSL stylesheets.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3408846"></a>Examples</h4></div></div></div><p>The following examples show how to write the equations.</p><div class="example"><a id="id3408818"></a><p class="title"><b>Example 3.6. Inlined Equation</b></p><div class="example-contents"><p>The formula 
 
28
approach, and is integrated in the Norman Walsh XSL stylesheets.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id3408590"></a>Examples</h4></div></div></div><p>The following examples show how to write the equations.</p><div class="example"><a id="id3409979"></a><p class="title"><b>Example 3.6. Inlined Equation</b></p><div class="example-contents"><p>The formula 
29
29
  <img src="figures/eq1.png" />
30
30
is inlined in the paragraph. Its XML source is:</p><pre class="programlisting">
31
31
&lt;para&gt;The formula 
35
35
  &lt;/inlineequation&gt;
36
36
is inlined in the paragraph. Its XML source is:&lt;/para&gt;
37
37
 
38
 
</pre></div></div><br class="example-break" /><div class="example"><a id="id3408850"></a><p class="title"><b>Example 3.7. Equation in a block</b></p><div class="example-contents"><p>The following formula:
 
38
</pre></div></div><br class="example-break" /><div class="example"><a id="id3409897"></a><p class="title"><b>Example 3.7. Equation in a block</b></p><div class="example-contents"><p>The following formula:
39
39
  </p><div class="informalequation"><div><img src="figures/eq1.png" /></div></div><p>
40
40
is displayed in a separate block. The XML source is:</p><pre class="programlisting">
41
41
&lt;para&gt;The following formula:
45
45
  &lt;/informalequation&gt;
46
46
is displayed in a separate block. The XML source is:&lt;/para&gt;
47
47
 
48
 
</pre></div></div><br class="example-break" /><div class="example"><a id="id3408822"></a><p class="title"><b>Example 3.8. Equation in a float</b></p><div class="example-contents"><p>The formula <a class="xref" href="ch03s06.html#eq-with-title" title="Equation 3.1. Simple Formula">Equation 3.1, “Simple Formula”</a> below:
 
48
</pre></div></div><br class="example-break" /><div class="example"><a id="id3409985"></a><p class="title"><b>Example 3.8. Equation in a float</b></p><div class="example-contents"><p>The formula <a class="xref" href="ch03s06.html#eq-with-title" title="Equation 3.1. Simple Formula">Equation 3.1, “Simple Formula”</a> below:
49
49
  </p><div class="equation"><a id="eq-with-title"></a><p class="title"><b>Equation 3.1. Simple Formula</b></p><div class="equation-contents"><div><img src="figures/eq1.png" /></div></div></div><p><br class="equation-break" />
50
50
is displayed in a block with a title. Its XML source is:</p><pre class="programlisting">
51
51
&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
59
59
  &lt;/equation&gt;
60
60
is displayed in a block with a title. Its XML source is:&lt;/para&gt;
61
61
 
62
 
</pre></div></div><br class="example-break" /><div class="example"><a id="id3408313"></a><p class="title"><b>Example 3.9. Equation without a title</b></p><div class="example-contents"><p>The formula <a class="xref" href="ch03s06.html#eq-with-no-title" title="Equation 3.1. ">Equation 3.1, “”</a> below:
 
62
</pre></div></div><br class="example-break" /><div class="example"><a id="id3410103"></a><p class="title"><b>Example 3.9. Equation without a title</b></p><div class="example-contents"><p>The formula <a class="xref" href="ch03s06.html#eq-with-no-title" title="Equation 3.1. ">Equation 3.1, “”</a> below:
63
63
  </p><div class="equation"><a id="eq-with-no-title"></a><p class="title"><b>Equation 3.1. </b></p><div class="equation-contents"><div><img src="figures/eq4.png" /></div></div></div><p><br class="equation-break" />
64
64
is displayed as a latex equation with its own equation numbering.
65
65
Its XML source is:</p><pre class="programlisting">
74
74
is displayed as a latex equation with its own equation numbering.
75
75
Its XML source is:&lt;/para&gt;
76
76
 
77
 
</pre></div></div><br class="example-break" /></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3408075"></a>
 
77
</pre></div></div><br class="example-break" /></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id3409902"></a>
78
78
   Writing MathML equations
79
79
  </h3></div></div></div><p>
80
80
   You can write MathML equations in a DocBook based document, by using the <a class="ulink" href="http://www.oasis-open.org/docbook/xml/mathml/index.1.shtml" target="_top">MathML Module for DocBook XML</a> instead of the DocBook DTD.