Math

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

3 - Example

3.1 - Block

<MATH>x^2</MATH>

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

Advertising

3.2 - In-line

<math>x^2</math>

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