Template:Math/doc: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>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...")
 
>Illviljan
m (Changed style so it's easier and clearer where to copy/paste equations.)
Line 1: Line 1:
{{documentation subpage}}
{{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/Extension:Math Math extesion]. It is used to change the default rendering colors (black text on white background) to custom ones that fit this wiki.
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/Extension:Math Math extension]. It is used to change the default rendering colors (black text on white background) to custom ones that fit this wiki.


==Usage==
==Usage==
Place a formula as a value of a parameter <code>formula</code> of {{tlx|math}}. For example:
Place a formula as a value of a parameter <code>formula</code> of {{tlx|math}}. For example:
<pre><nowiki>{{math|formula=x^2 + y^2 + z^2 = 1}}</nowiki></pre>
<pre>
{{math|formula=
x^2 + y^2 + z^2 = 1
}}
</pre>
 
produces:
produces:
:{{math|formula=x^2 + y^2 + z^2 = 1}}
:{{math|formula=
x^2 + y^2 + z^2 = 1
}}




While using default <code><nowiki><math>...</math></nowiki></code> tags like this:
While using default <code><nowiki><math>...</math></nowiki></code> tags like this:
<pre><nowiki><math>x^2 + y^2 + z^2 = 1</math></nowiki></pre>
<pre>
<math>
x^2 + y^2 + z^2 = 1
</math>
</pre>
 
produces:
produces:
:<math>x^2 + y^2 + z^2 = 1</math>
:<math>
x^2 + y^2 + z^2 = 1
</math>


==Troubleshooting==
==Troubleshooting==
Placing multiple braces together (e.g. <code><nowiki>}}}</nowiki></code>) causes errors. For example, the following code:
Placing multiple braces together (e.g. <code><nowiki>}}}</nowiki></code>) causes errors. For example, the following code:
<pre><nowiki>{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw}}}}</nowiki></pre>
<pre>
:{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw}}}}
{{math|formula=
DR(A, D_{raw}) = {A \over A + 10 * D_{raw}}
}}
</pre>
 
:{{math|formula=
DR(A, D_{raw}) = {A \over A + 10 * D_{raw}}
}}


In order to prevent this either space braces like this:
In order to prevent this either space braces like this:
<pre><nowiki>{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw} } }}</nowiki></pre>  
<pre>
{{math|formula=
DR(A, D_{raw}) = {A \over A + 10 * D_{raw} }  
}}</pre>  
 
:{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw} } }}
:{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw} } }}
or use the following templates:
or use the following templates:
* [[Template:)]]
* [[Template:)]]
Line 31: Line 57:
* [[Template:(((]]
* [[Template:(((]]


<pre><nowiki>{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw{{))}} }}</nowiki></pre>  
<pre>
:{{math|formula=DR(A, D_{raw}) = {A \over A + 10 * D_{raw{{))}} }}
{{math|formula=
DR(A, D_{raw}) = {A \over A + 10 * D_{raw{{))}}  
}}
</pre>  
 
:{{math|formula=
DR(A, D_{raw}) = {A \over A + 10 * D_{raw{{))}}  
}}

Revision as of 08:41, 3 July 2016

This subpage provides documentation for Template:Math.

The {{math}} template is a wrapper for <math>...</math> tags which are a part of Math extension. 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{{))}} 
}}