# HandWiki:Help/Equations

## Contents

## Showing Equations

MediaWiki uses a subset of TeX markup. You can use the standard "math" tag for mathematical equations. See Displaying a formula in Mediawiki. HandWiki used MathJax for rendering. You can find more extensive discussion on HandWiki specific rendering using math equation help.

## Inline equations

Inline formulas can be inserted in the line where the actual text is. Here is an inline formula [math]\sum_{i=0}^\infty 2^{-i}[/math]. This sentence with this inline formular can be created as shown below:

`Here is an inline formula <math>\sum_{i=0}^\infty 2^{-i}</math>`

## Block equations

Block equations are a special case. They are:

- Positioned on a separate line
- Enumerated using numbers in ()
- Can be referenced inside a text

Here is a simple example without numerating the formula:

- [math]\text{geometric series:}\quad \sum_{i=0}^\infty 2^{-i}=2 [/math]

It is coded like this:

`:<math>\text{geometric series:}\quad \sum_{i=0}^\infty 2^{-i}=2 </math>`

As you can see, it should be positioned on a new line. For a better style, add a left margin space using ":" when showing a formula. This adds an extra space on the left of the formula

## Using the dollar signs

HandWiki also uses another style for block formulas. The equation as this

$$F^2\cdot cos(x)$$

can be shown using two dollar signs from each side of the equation. Note it is positioned in the middle of the line. It is a preferred method if you need to convert everything to LaTeX:

`$$F^2\cdot cos(x)$$`

## Equations with cross references

You can reference an equation using CrossReference method. Here is a sentence that reference an equation "1":

This example uses Equation 1 and Equation 2 that illustrates formulas with an integral. Note that Equation 1 displays the equation number between parenthesis.

- [math] \Gamma_{2} = \sum_{i=0}^\infty 2^{-i} [/math] (1)

or this method:

- [math] \Gamma_{2} = \sum_{i=0}^\infty 2^{-i} [/math]

The WikiCode that was used in this example is:

```
This example uses <xr id="eqn:In1"/> and <xr id="eqn:In2"/> that illustrates formulas with an integral.
Note that <xr id="eqn:In1"/> displays the equation number between parenthesis.
:<equation id="eqn:In1" shownumber>
<math>
\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}
</math>
</equation>
or this method:
:<equation id="eqn:In2">
<math>
\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}
</math>
</equation>
```

Note that Equation 1 is "clickable" so you can always navigate to the equation you are referencing to. The MediaWiki code that does this is shown below: