HelpOnMaths - Atlas of Economic Models
 

Help On Maths

The maths mark-up (closely related to LaTeX) is distinguished from normal text by enclosing it with double dollar signs. It can either be written in line with normal text or on a line of its own. However, as with normal text at the same indent, maths will run on the same line unless a line break [[BR]] is inserted at the end of the line or a blank line is left between equations.

Below are several examples, and others can be found by viewing the "Raw Text" of various existing model pages.

NB

  • If using Internet Explorer, in order to display maths correctly you will be prompted to download the MathPlayer plug-in.

  • Some maths mark-up will not display properly if the page is in #format wiki, so check that it has not been included as part of the page template in the 'raw text' right at the top of the page (it is not part of the AtlasModelTemplate).

The basics

Maths enclosed by double dollar signs

$$ a+b=c $$ and $$ x-y = z $$

$$ a+b=c $$ and $$ x-y = z $$

Sub and superscripts

  • _ for subscript - note the difference from 'normal' Wiki formatting (see HelpOnFormatting for regular text)

  • ^ for superscript

$$ x_i $$ and $$ x^j $$

$$ x_i $$ and $$ x^j $$

  • If both subscript and superscript then subscript first

$$ x_i^j $$ not $$ x^j_i $$

$$ x_i^j $$ not $$ x^j_i $$

  • Use {} to enclose sub and superscript of longer than one character

$$ x_{high} $$ not $$ x_high $$

$$ x_{high} $$ not $$ x_high $$

$$ x^{2y} $$ not $$ x^2y $$

$$ x^{2y} $$ not $$ x^2y $$

Fractions

  • Single fractions

$$ \frac{x}{y} $$ and $$ \frac{2x+3}{3x+2} $$

$$ \frac{x}{y} $$ and $$ \frac{2x+3}{3x+2} $$

  • Multiple fractions - remember to get the right number of {} enclosing each part of the fraction

$$ \frac{2x+3}{\frac{3x+2}{4x+3}} $$

$$ \frac{2x+3}{\frac{3x+2}{4x+3}} $$

  • Long brackets make fractions clearer - use \left( and \right) rather than ( and ) to elongate brackets

$$ \frac{2x+3}{\left(\frac{3x+2}{4x+3}\right)} $$ not $$ \frac{2x+3}{(\frac{3x+2}{4x+3})} $$

$$ \frac{2x+3}{\left(\frac{3x+2}{4x+3}\right)} $$ not $$ \frac{2x+3}{(\frac{3x+2}{4x+3})} $$

Special characters

To form the special characters simply put double dollar signs either side of the 'markup' code (which will begin with \). Other characters follow straight afterwards.

$$ \alphax + \betay = \gammaz $$ $$

$$ \alphax + \betay = \gammaz $$

Greek letters

Markup

Display

Markup

Display

Markup

Display

Markup

Display

\alpha

$$ \alpha $$

\beta

$$ \beta

\gamma

$$ \gamma $$

\delta

$$ \delta $$

\epsilon

$$ \epsilon $$

\varepsilon

$$ \varepsilon $$

\eta

$$ \eta $$

\theta

$$ \theta $$

\lambda

$$ \lambda $$

\mu

$$ \mu $$

\pi

$$ \pi $$

\rho

$$ \rho $$

\sigma

$$ \sigma $$

\tau

$$ \tau $$

\phi

$$ \phi $$

\chi

$$ \chi $$

\psi

$$ \psi $$

\omega

$$ \omega $$

\Delta

$$ \Delta $$

\Pi

$$ \Pi $$

Symbols

Markup

Display

Markup

Display

Markup

Display

\le

$$ \le $$

\neq

$$ \neq $$

\ge

$$ \ge $$

\sim

$$ \sim $$

\simeq

$$ \simeq $$

\equiv

$$ \equiv $$

\prec

$$ \prec $$

\succ

$$ \succ $$

\preceq

$$ \preceq $$

\succeq

$$ \succeq $$

\in

$$ \in $$

\forall

$$ \forall $$

\partial

$$ \partial $$

\infty

$$ \infty $$

\sqrt

$$ \sqrt $$

Miscellaneous

Markup

Display

Markup

Display

Markup

Display

Markup

Display

\hat{x}

$$ \hat{x} $$

\bar{x}

$$ \bar{x} $$

\dot{x}

$$ \dot{x} $$

\tilde{x}

$$ \tilde{x} $$

\arg

$$ \arg $$

\max

$$ \max $$

\log

$$ \log $$

\lim

$$ \lim $$

\leftarrow

$$ \leftarrow $$

\rightarrow

$$ \rightarrow $$

\Leftarrow

$$ \Leftarrow $$

\Rightarrow

$$ \Rightarrow $$

$$ \sum_{a}^{b} $$ and $$ \int_{a}^{b} $$

$$ \sum_{a}^{b} $$ and $$ \int_{a}^{b} $$

For a more comprehensive list of LaTeX symbols and commands click here or search for another of the numerous online reference sites.

Multiple line equations

  • For multiple lines use the & sign around the central character and \\ to indicate the end of a line

$$ \begin{eqnarray}
\frac{4y}{2} & = & (x+1)(x+2) \\
2y & = & x^{2} +2x + x + 2 \\
& = & x^{2} + 3x + 2
\end{eqnarray} $$

$$ \begin{eqnarray} \frac{4y}{2} & = & (x+1)(x+2) \\ 2y & = & x^{2} +2x + x + 2 \\ & = & x^{2} + 3x + 2 \end{eqnarray} $$

  • Similar principles for an array with \\ indicating the end of a line and . the end of the array

$$ \[
f(x) = \left\{\begin{array}{l l}
x^2 & \textrm{if } x > 5, \\
x - 3 & \textrm{if} 0 < x \le 5, \\
0 & \textrm{if } x \le 0 .
\end{array}\right. \] $$

$$ \[ f(x) = \left\{\begin{array}{l l} x^2 & \textrm{if } x > 5, \\ x - 3 & \textrm{if} 0 < x \le 5, \\ 0 & \textrm{if } x \le 0 . \end{array}\right. \] $$