Difference between revisions of "HandWiki:Help/Equations"

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 $\sum_{i=0}^\infty 2^{-i}$. This sentence with this inline formular can be created as shown below:

Here is an inline formula $\sum_{i=0}^\infty 2^{-i}$

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:

$\text{geometric series:}\quad \sum_{i=0}^\infty 2^{-i}=2$

It is coded like this:

:$\text{geometric series:}\quad \sum_{i=0}^\infty 2^{-i}=2$

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 3 that illustrates formulas with an integral. Note that Equation 1 displays the equation number between parenthesis.

$\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}$     (1)

or this method:

$\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}$

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>
$\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}$
</equation>

or this method:

:<equation id="eqn:In2">
$\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}$
</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:

$\Gamma_{2} = \sum_{i=0}^\infty 2^{-i}$