3 Typesetting Mathematics: Part II

3.1 Text in Mathematics

3.2 Multiple Equations

Use the eqnarray environment:

Input:


  \begin{eqnarray}
     \frac{du}{dt} & = & u + v^2 \\
     \frac{dv}{dt} & = & v - u
  \end{eqnarray}

Output:

du           2
--- =   u + v                                   (1)
dt
dv- =   v - u                                   (2)
dt

eqnarray* works like the eqnarray environment, except equations are not numbered.

3.3 Multi-line Equation

Use the eqnarray environment for this as well:

Input:


  \begin{eqnarray}
     (x + y)^6
        & = & x^6 + 6 x^5 y + 15 x^4 y^2
              + 20 x^3 y^3 \nonumber \\
        &   & \mbox{} + 15 x^2 y^4
              + 6 x y^5 + y^6
  \end{eqnarray}

Output:

(x + y)6  =  x6 + 6x5y +  15x4y2 + 20x3y3
                    2 4      5    6
              + 15x  y + 6xy  +  y                            (3)

3.4 Subordinate Equation Numbering; Arbitrary Equation Numbers

Standard LaTeX provides equation numbers such as (3), (5.2), etc. But what about (3a), (3b), (5.2*)?

Use the amsmath package:

Input:


  \begin{subequations}
  \label{eq:group}
  \begin{align}
     \frac{du}{dt} &= u + v^2 \label{eq:part1} \\
     \frac{dv}{dt} &= v - u \label{eq:part2}
  \end{align}
  \end{subequations}
  The second equation is \eqref{eq:part2},
  while the entire group is \eqref{eq:group}.
  Here's an equation with an arbitray number:
  \begin{equation}
     a^{2} + b^{2} = c^{2} \tag{5*}
  \end{equation}

Output:

                                      du
                                      ---=  u + v2                                  (4a)
                                      dt
                                      dv-=  v-  u                                  (4b)
                                      dt

The  second  equation is (Equation 4b), while the entire group is (Equation 4). Here ’s an
equation with an arbitray number:

                                      a2 + b2 = c2                                  (5*)

3.5 Bold Greek Letters

3.5.1 Example 1

Input:


  \boldmath
  \[ f + 2^x \beta - \beta \]

Output:

f +  2xb -  b

3.5.2 Example 2

Input:


  \[ \mathbf{f}
     + 2^x \mbox{\boldmath $\beta$}
     - \beta \]

Output:

     x
f + 2 b - b

Define a new command:


  \newcommand{\bbeta}{\mbox{\boldmath $\beta$}}

Or more generic:


  \newcommand{\bm}[1]{\mbox{\boldmath $#1$}}

3.5.3 Example 3

Input:


  \[
     \bm{y} = \bbeta \cdot \bm{x}
        + \bm{\epsilon}
  \]

Output:

y =  b .x + e

Alternatively, use the \boldsymbol command of the amsmath package.

Input:


  \[
     A \boldsymbol{x} = \boldsymbol{b}
  \]

Output:

Ax  = b

_______________________________________________________
Last updated: October 27, 2002
Site maintained by: Clyde Clements clyde@mathstat.dal.ca
Return to my home page.