# Math

The math component allows to add MathJax Text and Latex formulas

This component needs a special event called TPL_DOCUMENT_CLOSING in order to add the mathjax library only if this component is used. It means than in editing mode, you may also not see the formulas.

Example of php code that must be added before the </html> tag:

$data = "";// Mandatory trigger_event('TPL_DOCUMENT_CLOSING',$data);
tpl_flush();

## 3 - Example

### 3.1 - Block

$$x^2$$

This formula should not be inline but at the line $$x^2$$

$x^2$
This formulas should be inline $x^2$