Orb/Doxygen/doc/formulas.doc
changeset 0 42188c7ea2d9
equal deleted inserted replaced
-1:000000000000 0:42188c7ea2d9
       
     1 /******************************************************************************
       
     2  *
       
     3  * 
       
     4  *
       
     5  * Copyright (C) 1997-2008 by Dimitri van Heesch.
       
     6  *
       
     7  * Permission to use, copy, modify, and distribute this software and its
       
     8  * documentation under the terms of the GNU General Public License is hereby 
       
     9  * granted. No representations are made about the suitability of this software 
       
    10  * for any purpose. It is provided "as is" without express or implied warranty.
       
    11  * See the GNU General Public License for more details.
       
    12  *
       
    13  * Documents produced by Doxygen are derivative works derived from the
       
    14  * input used in their production; they are not affected by this license.
       
    15  *
       
    16  */
       
    17 /*! \page formulas Including formulas 
       
    18 
       
    19 Doxygen allows you to put \f$\mbox{\LaTeX}\f$ formulas in the
       
    20 output (this works only for the HTML and \f$\mbox{\LaTeX}\f$ output, 
       
    21 not for the RTF nor for the man page output). To be able to include 
       
    22 formulas (as images) in the HTML documentation, you will also need to 
       
    23 have the following tools installed
       
    24 <ul>
       
    25 <li>\c latex: the \f$\mbox{\LaTeX}\f$ compiler, needed to parse the formulas. 
       
    26     To test I have used the teTeX 1.0 distribution.
       
    27 <li>\c dvips: a tool to convert DVI files to PostScript files 
       
    28     I have used version 5.92b from Radical Eye software for testing.
       
    29 <li>\c gs: the GhostScript interpreter for converting PostScript files 
       
    30     to bitmaps. I have used Aladdin GhostScript 8.0 for testing.
       
    31 </ul>
       
    32 
       
    33 There are three ways to include formulas in the documentation.
       
    34 <ol>
       
    35 <li>Using in-text formulas that appear in the running text. 
       
    36     These formulas should be put between a pair of \\f\$ 
       
    37     commands, so
       
    38 \verbatim
       
    39   The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is 
       
    40   \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
       
    41 \endverbatim results in:
       
    42 
       
    43   The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is 
       
    44   \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
       
    45 <br>
       
    46 <li>Unnumbered displayed formulas that are centered on a separate line.
       
    47     These formulas should be put between \\f[ and \\f] commands.
       
    48     An example:
       
    49 \verbatim
       
    50   \f[
       
    51     |I_2|=\left| \int_{0}^T \psi(t) 
       
    52              \left\{ 
       
    53                 u(a,t)-
       
    54                 \int_{\gamma(t)}^a 
       
    55                 \frac{d\theta}{k(\theta,t)}
       
    56                 \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
       
    57              \right\} dt
       
    58           \right|
       
    59   \f]
       
    60 \endverbatim
       
    61   results in:
       
    62   \f[
       
    63     |I_2|=\left| \int_{0}^T \psi(t) 
       
    64              \left\{ 
       
    65                 u(a,t)-
       
    66                 \int_{\gamma(t)}^a 
       
    67                 \frac{d\theta}{k(\theta,t)}
       
    68                 \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
       
    69              \right\} dt
       
    70           \right|
       
    71   \f]
       
    72 <li>Formulas or other latex elements that are not in a math 
       
    73     environment can be specified using \\f{environment}, where
       
    74     \c environment is the name of the \f$\mbox{\LaTeX}\f$ environment, 
       
    75     the corresponding end command is \\f}. Here is an example for an 
       
    76     equation array
       
    77 \verbatim
       
    78    \f{eqnarray*}{
       
    79         g &=& \frac{Gm_2}{r^2} \\ 
       
    80           &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\,
       
    81               \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ 
       
    82           &=& 9.82066032\,\mbox{m/s}^2
       
    83    \f}
       
    84 \endverbatim
       
    85   which results in:
       
    86    \f{eqnarray*}
       
    87         g &=& \frac{Gm_2}{r^2} \\ 
       
    88           &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\,
       
    89               \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ 
       
    90           &=& 9.82066032\,\mbox{m/s}^2
       
    91    \f}
       
    92 </ol>
       
    93 For the first two commands one should make sure formulas contain 
       
    94 valid commands in \f$\mbox{\LaTeX}\f$'s math-mode. For the third command
       
    95 the section should contain valid command for the specific environment.
       
    96 
       
    97 \warning Currently, doxygen is not very fault tolerant in recovering 
       
    98 from typos in formulas. It may be necessary to remove the
       
    99 file <code>formula.repository</code> that is written to the html directory to 
       
   100 get rid of an incorrect formula.
       
   101 
       
   102 \htmlonly
       
   103 Go to the <a href="diagrams.html">next</a> section or return to the
       
   104  <a href="index.html">index</a>.
       
   105 \endhtmlonly
       
   106 
       
   107 */