Template:math/doc
From cppreference.com
The Math template formats HTML- or wikimarkup generated mathematical formulas. The generated formula is displayed using the same-size font as the adjoining text. The template will prevent line-wrapping.
Helper templates
{{mrad}} - produces radicals
Usage
Use this template to wrap an inline formula in wikitext. Examples:
{{math|''x''<sup>2</sup> + ''y''<sup>2</sup> {{=}} ''r''<sup>2</sup>}}
- produces: x2 + y2 = r2
{{math|sin <i>π</i> {{=}} 0}}
- produces: sin π = 0. The coding "<i>" puts italic font, same as "<var>" but doesn't indicate that it's a variable.
{{math|{{minteg|0|+∞|{{mexp|−''x''}} d''x''}} {{=}} 1}}
- produces: ∫+∞
0e−x dx = 1
'''{{math|{{frac|1|2}} − {{frac|1|3}} {{=}} {{frac|1|6}}}}'''
- produces: Template:frac − Template:frac = Template:frac. Note the triple-apostrophes have set the whole formula as bold.
{{math|({{mrad|2}})<sup>2</sup> {{=}} 2}}
- produces: (√2)2 = 2.
Use of equals-sign
If a single equals-sign ("=") is used, it will fail to render, instead showing "{{{1}}}". For example, the following template-coding would be invalid:
{{math|1 + 2 = 3}}
- produces: , which is invalid code
To resolve this, either: (a) Start the formula with "1=" as in:
{{math|1=1 + 2 = 3}}
- produces: 1 + 2 = 3, or else, (b) include the equals-sign in double-braces "{{=}}" as in:
{{math|1 + 2 {{=}} 3}}
- produces: 1 + 2 = 3.
Parameters
The following parameters are optional:
big=1– This wil render the formula in a bigger fontsize, increased to 165%.size=font-size– Use this to specify your own fontsize.
{{math|big=1|1 + 2 {{=}} 3}}
- produces: 1 + 2 = 3