##### Scripta cookbook

## Mathematics

Use standard LaTeX syntax for inline and displayed mathematical text.

**Inline formulas:** \(a^2 + b^2 = c^2\)

**Displayed formulas**
\[
\int_{-\infty}^\infty e^{-x^2/2} dx = \sqrt{2\pi}
\]

**Theorems**

Use Asciidoc-LaTeX environments for theorems.

Theorem 1.

There are infinitely primes

Theorem 2.

The series
\[
\sum_{n=1}^\infty \frac{1}{n}
\]
is divergent

The text `oresme`

after the hash mark is a label for cross-referencing,
as in the example

I refer you to Theorem 2.

**Environments in general.** Instead of saying `[env.theorem]`

,
you can say `[env.lemma]`

, `[env.definition]`

, etc. These environments
are numbered separately.

**Equation environment.** This is one of the special environments,
treated differently from the others:

\[ \sum_{n=1}^\infty \frac{1}{n} = \infty \] |

If the environment has a label, it is numbered:

\[ \sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6} \] | (1) |

We can then refer to it like this:

The series 1 is extremely cool!

**Equationalign environment**

\[\begin{split} a &= bc \\ b &= x + y \\ c &= x - y \\ a &= x^2 - y^2 \end{split}\] |