Template:Math/doc

From Path of Exile Wiki
Revision as of 07:02, 3 July 2016 by >TheFrz (Created page with "{{documentation subpage}} The {{tlx|math}} template is a wrapper for <code><nowiki><math>...</math></nowiki></code> tags which are a part of [https://www.mediawiki.org/wiki/E...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This subpage provides documentation for Template:Math.

The {{math}} template is a wrapper for <math>...</math> tags which are a part of Math extesion. It is used to change the default rendering colors (black text on white background) to custom ones that fit this wiki.

Usage

Place a formula as a value of a parameter formula of {{math}}. For example:

{{math|formula=x^2 + y^2 + z^2 = 1}}

produces:


While using default <math>...</math> tags like this:

<math>x^2 + y^2 + z^2 = 1</math>

produces:

Troubleshooting

Placing multiple braces together (e.g. }}}) causes errors. For example, the following code:

{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw}}}}
Failed to parse (syntax error): \color[RGB]{163,141,109} DR(A, D_{raw}) = {A \over A + 10 * D_{raw }}

In order to prevent this either space braces like this:

{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw} } }}

or use the following templates:

{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw{{))}} }}