# Inserting math expressions

This section is an essential guide to the main LateX commands and environments useful for writing math in WikiToLearn. For further documentation please visit https://en.wikibooks.org/wiki/LaTeX/Mathematics

## Math tags

There are two different math tags that can be used to insert math formulas into your document. Both are based off the LaTeX commands.

### The `math` tag

This tag is used to insert inline math. Example:

Here is some nice math. ${\displaystyle y=f(x)}$ There you go.

Syntax:

```Here is some nice math. [itex]y=f(x)[/itex] There you go
```

#### Block math

In order to have math be displayed with block formatting (on it's own line, and is centered), use the `display=block` attribute in the `[itex]` tag. Example:

Here is some nice math.

${\displaystyle y=f(x)}$
There you go.

Syntax:

```Here is some nice math. <math display=block>y=f(x)[/itex] There you go.
```