# Moodle and LaTeX

## Moodle and $\LaTeX$

$\LaTeX$ is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. $\LaTeX$ is the de facto standard for the communication and publication of scientific documents. $\LaTeX$ is available as free software.
Moodle comes with the ability to handle $\LaTeX$. Check that your administrator has enabled it.
To include $\LaTeX$ code in Moodle, use the following:
$$Your-latex-Code$$
So $$A=\pi r^2$$
becomes
$A=\pi r^2$

## Symbols

If you type $$\alpha, \beta, \gamma$$ into Moodle you get $\alpha, \beta, \gamma$.
 Knowing this you can write formulas such as $$A = \pi r^2$$
Knowing this you can write formulas such as $A = \pi r^2$
Note the difference between $$\sigma and \Sigma$$.
Note the difference between $\sigma$ and $\Sigma$
You can guess the names of most of the symbols you need...$$\pm,\le, \neq, \ge$$
You can guess the names of most of the symbols you need… $\pm, \le, \neq, \ge$
There are lots of other symbols: $$\forall , \leftarrow, \Rightarrow, \infty$$, $$\cos (2\theta) = \cos^2 \theta - \sin^2 \theta$$
There are lots of other symbols: $\forall , \leftarrow, \Rightarrow, \infty$, $\cos (2\theta) = \cos^2 \theta - \sin^2 \theta$
Find more symbols here: http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Symbols

## Functions, Fractions and Derivatives

You’ve already seen how to write superscripts.  Use the underscore for subscripts: n_ij
Copper Sulphate:  $$CuSO_4$$ : $CuSO_4$
Use braces { } for clarity:
Fibonacci Sequence:  $$F_n = F_{n-1} +F_{n-2}$$ :  $F_n = F_{n-1} +F_{n-2}$
Here are some fractions
$$\frac{x+y}{y-z}$$ :
$\frac{x+y}{y-z}$
$$\frac{\frac{1}{x}+\frac{1}{y}}{y-z}$$
$\frac{\frac{1}{x}+\frac{1}{y}}{y-z}$:
You can probably guess what \sqrt does, so that gives us
$$x = \frac{-b \pm \sqrt{b^2 – 4ac }}{2a}$$
$x = \frac{-b \pm \sqrt{b^2 - 4ac }}{2a}$
Which you can copy and paste when you need it.
Here’s how to do derivatives
$$y = x^2$$
$y = x^2$
$$\frac{dy}{dx}=2x$$
$\frac{dy}{dx}=2x$

## Brackets

Note the use of \left and \right to size the brackets correctly
$$\frac{x+y}{y-z}$$
$\frac{x+y}{y-z}$
$$(\frac{x+y}{y-z})$$
$(\frac{x+y}{y-z})$
$$\left(\frac{x+y}{y-z}\right)$$
$\left(\frac{x+y}{y-z}\right)$

This site uses Akismet to reduce spam. Learn how your comment data is processed.