Namespaces
Variants

Template:math/doc

From cppreference.com
Revision as of 11:58, 23 September 2011 by P12 (talk | contribs) (Examples: template names)

The following templates are used to create wikimarkup generated mathematical formulas. The generated formula is displayed using the same-size font as the adjoining text.

{{math|source}} - creates a formula from the specified source.

Helper templates

The following templates can be in the source parameter of the {{math}} template to create advanced formatting.

  • {{su|p=superscript(optional)|b=subscript(optional)}} - creates superscript and/or subscript, e.g.
  • {{mrad}} - produces radicals
  • {{minteg|min|max|body}} - creates an integral, e.g. max
    min
    body.
  • {{mexp|power}} - creates an exponent raised to power, e.g. epower
  • {{mfrac|integer|numerator|denominator}} - creates a fraction, e.g. integer
    numerator
    denominator
    .

Examples

Source Result
{{math|({{mrad|2}}){{su|p=2}} {{=}} 2}} (2)2
= 2
{{math|A{{su|p=12|b=3}}}} A12
3
{{math|{{minteg|0|+∞|{{mexp|−''x''}} d''x''}} {{=}} 1}} +∞
0
ex dx = 1
{{math|{{mfrac|1|2}} − {{mfrac|1|3}} {{=}} {{mfrac|1|6}}}}
1
2
1
3
=
1
6