quick LaTeX guide

Note: The following is adopted from Andy Schultz's Quick LaTeX Guide and Elisha Peterson's LaTeX Help.

Wikidot uses a markup language called $\LaTeX$ (pronounced "lay-tech") along with jsMath to generate properly typeset mathematics. $\LaTeX$ requires memorizing (or looking up) "commands" for creating certain kinds of characters. Since you'll be posting to the forum and creating wiki pages with serious mathematical content, it's good that you get some practice writing mathematical expressions in $\LaTeX$.

## the basics

When you're in the editing panel, you can insert mathematical expressions within your text (i.e., "inline") by using the code

[[$your-mathematical-expression-here$]]


For instance, this sentence — which includes the equation $x^{2}+y^{2} = r^{2}$ — is typeset as

For instance, this sentence -- which includes the equation [[$x^{2}+y^{2} = r^{2}$]] -- is typeset as


You can also have your mathematical expressions separated from the text and placed on their own line for emphasis. For instance, if you wanted to type:

Here's some fancy mathematics that I don't really understand

(1)
\begin{align} \log \zeta(s) = s\int_{2}^{\infty} \frac{\pi(x)}{x(x^{s}-1)}~dx = \log \prod_{p} (1-p^{-s})^{-1}. \end{align}

Man, that's complicated!

then you'd use the code

Here's some fancy mathematics that I don't really understand
[$] \log \zeta(s) = s\int_{2}^{\infty} \frac{\pi(x)}{x(x^{s}-1)}~dx = \log \prod_{p} (1-p^{-s})^{-1}. [$]
Man, that's complicated!


Here are a few things to keep in mind:

• All wiki commands are of the form [[blah]].
• All inline mathematical notation must be framed by dollar signs. That is, in the wiki, all inline mathematical notation is of the form [[$math-stuff$]].
• All displayed mathematical notation (i.e., on its own line and centered) is of the form [$] math-stuff [$].
• All special symbols in $\LaTeX$ are of the form \some-command. Once you've used $\LaTeX$ enough, you can almost guess what the command is for a certain symbol.

## some examples

Here are a few more examples that illustrate some of the mathematical notation we may want to use:

expression you want code you type
$n \in \mathbb{N} \subseteq \mathbb{Z}$ [[$n \in \mathbb{N} \subseteq \mathbb{Z}$]]
$\sum_{i=1}^n i^2=1^2+2^2+ \cdots +(n-1)^2+n^2$ [[$\sum_{i=1}^n i^2=1^2+2^2+ \cdots (n-1)^2+n^2$]]
$\sqrt{2} \notin \mathbb{Q}$ [[$\sqrt{2} \notin \mathbb{Q}$]]
$2\in \{2,3,4\} \cap \{1,2,3\}$ [[$2\in \{2,3,4\} \cap \{1,2,3\}$]]
$f:A\to B$ [[$f:A\to B$]]
$f(x_1)\neq f(x_2)$ [[$f(x_1)\neq f(x_2)$]]
$\{a_n\}_{n=1}^{\infty}$ [[$\{a_n\}_{n=1}^{\infty}$]]
$(f\circ g)(x)=f(g(x))$ [[$(f\circ g)(x)=f(g(x))$]]
$\frac{a}{b}+\frac{c}{d}\neq \frac{a+b}{c+d}$ [[$\frac{a}{b}+\frac{c}{d}\neq \frac{a+b}{c+d}$]]

Greek letters are typeset using \name: for example, \theta produces $\theta$. In order to produce a left or right brace, the brace needs to be preceded by a backslash. For example, $\mathbb{N}=\{1,2,3,\ldots\}$ is typeset with [[$\mathbb{N}=\{1,2,3,\ldots\}$]] and notice the use of \{ and \}.

Using $\LaTeX$ allows you to do fancy things like the following:

(2)
\begin{align} \sum_{i=1}^{k+1}i & = \left(\sum_{i=1}^{k}i\right) +(k+1)\\ & = \frac{k(k+1)}{2}+k+1 & (\text{by inductive hypothesis})\\ & = \frac{k(k+1)+2(k+1)}{2}\\ & = \frac{(k+1)(k+2)}{2}\\ & = \frac{(k+1)((k+1)+1)}{2}. \end{align}

which is typeset using

[] \begin{align*} \sum_{i=1}^{k+1}i & = \left(\sum_{i=1}^{k}i\right) +(k+1)\\ & = \frac{k(k+1)}{2}+k+1 & (\text{by inductive hypothesis})\\ & = \frac{k(k+1)+2(k+1)}{2}\\ & = \frac{(k+1)(k+2)}{2}\\ & = \frac{(k+1)((k+1)+1)}{2}. \end{align*} []


In addition, Wikidot provides a brief summary of how to include mathematical expressions into the wiki. For a list of some of the more common $\LaTeX$ symbols, see here. If you want to see a really, really, really long list of symbols, go here.