Click [slideshow] to begin presentation.

 

Page Zero

Mathematics!

  • Inline and displayed mathematics
  • Equation arrays
  • Labelling and Referencing Equations
  • Where to find more examples



This is where LaTeX really shines!




Mathematics

Inline Equations

  • Inline mathematics has should be placed between single dollar signs or \( and \):
        Add $a$ squared to $b$ squared to get $c$ squared, i.e.,
        $a^2 + b^2 = c^2$.




Mathematics

Displayed Equations

  • Mathematics can also be ``displayed'', like this:
      Add $a$ squared to $b$ squared to get $c$ squared, i.e.,
      $$ a^2 + b^2 = c^2, $$
      in (Plain) TeX.
  • In LaTeX, we use
      Add $a$ squared to $b$ squared to get $c$ squared, i.e.,
      \begin{displaymath} 
          a^2 + b^2 = c^2,
      \end{displaymath} 
      or \[ \], or
      \begin{equation} 
          a^2 + b^2 = c^2.
      \end{equation}
    
    The latter gives an equation number on the r.h.s.




Mathematics

Equation Arrays

Sometimes we have groups of equations that we want lined up nicely:
\begin{eqnarray}
  \epsilon \frac {{\rm d}^2\psi} {{\rm d}t^2} & = & - \psi \\
  q \frac{\partial p} {\partial t} 
      & = & - \nabla . J_{p} - qR 
\end{eqnarray}
or
\begin{eqnarray}
  & & \epsilon \frac {{\rm d}^2\psi} {{\rm d}t^2} = - \psi \\
  & & q \frac{\partial p} {\partial t}  
          =  - \nabla . J_{p} - qR 
\end{eqnarray}




Mathematics

Arrays: Matrices

\begin{displaymath}
  \mathbf{X} = \left(
                 \begin{array}{ccc}
                   x_{11} & x_{12} & \ldots \\
                   x_{21} & x_{22} & \ldots \\
                   \vdots & \vdots & \ddots
                 \end{array}
               \right)
\end{displaymath}




Mathematics

Labeling and Referencing Equations

  \begin{equation}
  \label{eq:myeq}
      \epsilon > 0
  \end{equation}
  From equation (\ref{eq:myeq}) we see that\ldots




Mathematics

An Extended Example




Mathematics

More

  • The Not So Short Introduction to LaTeX has a good introduction to typesetting mathematics in LaTeX postscript (gzipped), dvi.




Mathematics

Hands On

  1. Download maths_questions.pdf — choose save file.
  2. Preview the PDF, then begin a new LaTeX document using Kile, or your favourite editor: attempt to copy the equations you see in the PDF.