aboutsummaryrefslogtreecommitdiffstats
path: root/VES5.0/doxygen-1.8.12/html/formulas.html
blob: 447970edc6f8f6decbaa1f3c03081520425460c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: Including formulas</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen_manual.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('formulas.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Including formulas </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Doxygen allows you to put <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> formulas in the output (this works only for the HTML and <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> output, not for the RTF nor for the man page output). To be able to include formulas (as images) in the HTML documentation, you will also need to have the following tools installed </p><ul>
<li>
<code>latex:</code> the <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> compiler, needed to parse the formulas. To test I have used the teTeX 1.0 distribution. </li>
<li>
<code>dvips:</code> a tool to convert DVI files to PostScript files I have used version 5.92b from Radical Eye software for testing. </li>
<li>
<code>gs:</code> the GhostScript interpreter for converting PostScript files to bitmaps. I have used Aladdin GhostScript 8.0 for testing. </li>
</ul>
<p>For the HTML output there is also an alternative solution using <a href="http://www.mathjax.org">MathJax</a> which does not require the above tools. If you enable <a class="el" href="config.html#cfg_use_mathjax">USE_MATHJAX</a> in the config then the latex formulas will be copied to the HTML "as is" and a client side javascript will parse them and turn them into (interactive) images.</p>
<p>There are three ways to include formulas in the documentation. </p><ol>
<li>
<p class="startli">Using in-text formulas that appear in the running text. These formulas should be put between a pair of \f$ commands, so </p><pre class="fragment">  The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is 
  \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
</pre><p> results in:</p>
<p class="endli">The distance between <img class="formulaInl" alt="$(x_1,y_1)$" src="form_1.png"/> and <img class="formulaInl" alt="$(x_2,y_2)$" src="form_2.png"/> is <img class="formulaInl" alt="$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$" src="form_3.png"/>. <br />
 </p>
</li>
<li>
Unnumbered displayed formulas that are centered on a separate line. These formulas should be put between \f[ and \f] commands. An example: <pre class="fragment">  \f[
    |I_2|=\left| \int_{0}^T \psi(t) 
             \left\{ 
                u(a,t)-
                \int_{\gamma(t)}^a 
                \frac{d\theta}{k(\theta,t)}
                \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
             \right\} dt
          \right|
  \f]
</pre> results in: <p class="formulaDsp">
<img class="formulaDsp" alt="\[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \]" src="form_4.png"/>
</p>
 </li>
<li>
Formulas or other latex elements that are not in a math environment can be specified using \f{environment}, where <code>environment</code> is the name of the <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> environment, the corresponding end command is \f}. Here is an example for an equation array <pre class="fragment">   \f{eqnarray*}{
        g &amp;=&amp; \frac{Gm_2}{r^2} \\ 
          &amp;=&amp; \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\,
              \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ 
          &amp;=&amp; 9.82066032\,\mbox{m/s}^2
   \f}
</pre> which results in: <p class="formulaDsp">
<img class="formulaDsp" alt="\begin{eqnarray*} g &amp;=&amp; \frac{Gm_2}{r^2} \\ &amp;=&amp; \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\, \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ &amp;=&amp; 9.82066032\,\mbox{m/s}^2 \end{eqnarray*}" src="form_5.png"/>
</p>
 </li>
</ol>
<p>For the first two commands one should make sure formulas contain valid commands in <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/>'s math-mode. For the third command the section should contain valid command for the specific environment.</p>
<dl class="section warning"><dt>Warning</dt><dd>Currently, doxygen is not very fault tolerant in recovering from typos in formulas. It may be necessary to remove the file <code>formula.repository</code> that is written to the html directory to get rid of an incorrect formula.</dd></dl>
<p> 
Go to the <a href="tables.html">next</a> section or return to the
 <a href="index.html">index</a>.
 </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>