# Math string `$…$`

Math strings encode mathematical formulas like T\approx 2\pi\sqrt{Lg^{-1}} to be displayed beautifully within lines of text on the webpage.

The related math block markup can be used for equations that deserve more space.

## How to

Choose and add a math module to your Aneamal installation, if you haven’t already. You can find free modules in the math modules inventory. Adding one to Aneamal is as easy as pie.

Then mark both the start and the end of a math string in your text with a dollar sign like in the example below.

Since the content of a math string is processed by a math module, its internal syntax is beyond the scope of Aneamal. Math modules are supposed to support the syntax of AMS-LaTeX. They usually omit some rarely used functions and add others. Consult their respective documentation, for example the supported functions in KaTeX.

## Example

`$R=\frac{U}{I}$ is futile.`

R=\frac{U}{I} is futile.

## For developers

When Aneamal is translated to HTML, a processed math string is enclosed in an HTML *span* element with a *math* role, so the example becomes:

`<span role='math'>…</span> is futile.`

Different math modules translate the same mathematical formulas differently to HTML, so the content of the *span* element will vary from module to module.