> DokuWiki > Web Component

1 - About

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);

3 - Example

3.1 - Block


This formula should not be inline but at the line <MATH>x^2</MATH>


3.2 - In-line


This formulas should be inline <math>x^2</math>