Template:math/doc: Difference between revisions
From cppreference.com
→Helper templates: +mparen |
fmt |
||
| Line 17: | Line 17: | ||
*{{tl|mfrac|''integer''|''numerator''|''denominator''}} - creates a fraction, e.g. {{mfrac|integer|numerator|denominator}}. | *{{tl|mfrac|''integer''|''numerator''|''denominator''}} - creates a fraction, e.g. {{mfrac|integer|numerator|denominator}}. | ||
*{{tl|mparen|''left_parenthesis''|''right_parenthesis''|''row1''|''row2''|...|style{{=}}''style''{{mark optional}}|rows{{=}}''row_number_override''{{mark optional}}}} - creates inline table with invisible borders and parentheses on the sides. | *{{tl|mparen|''left_parenthesis''|''right_parenthesis''|''row1''|''row2''|...|style{{=}}''style''{{mark optional}}|rows{{=}}''row_number_override''{{mark optional}}}} - | ||
creates inline table with invisible borders and parentheses on the sides. | |||
===Examples=== | ===Examples=== | ||
Revision as of 15:12, 21 January 2012
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. superscript
subscript
- {{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
- {{mparen|left_parenthesis|right_parenthesis|row1|row2|...|style=style(optional)|rows=row_number_override(optional)}} -
- creates inline table with invisible borders and parentheses on the sides.
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|{{mfrac|1|2}} − {{mfrac|1|3}} {{=}} {{mfrac|1|6}}}} |
|