Template:math/doc: Difference between revisions
From cppreference.com
→Helper templates: template names |
|||
| Line 6: | Line 6: | ||
The following templates can be in the ''source'' parameter of the {{tl|math}} template to create advanced formatting. | The following templates can be in the ''source'' parameter of the {{tl|math}} template to create advanced formatting. | ||
*{{tl|mrad}} - produces radicals | *{{tl|mrad}} - produces radicals | ||
*{{tl|minteg|''min''|''max''|''body''}} - creates an integral, e.g. {{minteg|min|max|body}}. | *{{tl|minteg|''min''|''max''|''body''}} - creates an integral, e.g. {{minteg|min|max|body}}. | ||
| Line 15: | Line 15: | ||
*{{tl|mexp|''power''}} - creates an exponent raised to ''power'', e.g. {{mexp|power}} | *{{tl|mexp|''power''}} - creates an exponent raised to ''power'', e.g. {{mexp|power}} | ||
*{{tl| | *{{tl||''integer''|''numerator''|''denominator''}} - creates a fraction, e.g. {{|integer|numerator|denominator}}. | ||
===Examples=== | ===Examples=== | ||
Revision as of 11:56, 23 September 2011
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
minbody.
- {{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}} | ∫+∞ 0e−x dx = 1 |
| {{math|{{frac|1|2}} − {{frac|1|3}} {{=}} {{frac|1|6}}}} | Template:frac − Template:frac = Template:frac |