Difference between revisions of "Template:su"
From cppreference.com
(shorter css class name (we ship at least 1.5MB just for that word)) |
Andreas Krug (Talk | contribs) m (fmt) |
||
Line 1: | Line 1: | ||
− | <span class="t-su {{#if:{{{b|}}}|t-su-b}}" ><!-- | + | <span class="t-su {{#if:{{{b|}}}|t-su-b}}"><!-- |
− | -->{{{p|}}}<br | + | -->{{{p|}}}<br><!-- |
-->{{{b|}}}</span><noinclude> | -->{{{b|}}}</span><noinclude> | ||
{{documentation|Template:math/doc}} | {{documentation|Template:math/doc}} | ||
</noinclude> | </noinclude> |
Revision as of 11:14, 19 December 2023
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. superscriptsubscript
- {{mrad}} - produces radicals
- {{minteg|min|max|body}} - creates an integral, e.g. ∫maxminbody.
- {{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_paren|right_paren|row1|row2|...|style=style(optional)|rows=row_number_override(optional)}} -
- creates inline table with invisible borders and parentheses on the sides. E.g. ⎛
⎜
⎝line1
line2
line3⎫
⎬
⎭ - left_paren and right_paren can be one of (){}[].
rows
forces parentheses to span row_number_override rows. Currently 4 rows are supported.style
denotes additional style for the content (row#
elements).
- creates inline table with invisible borders and parentheses on the sides. E.g. ⎛
Examples
Source | Result | ||||||
---|---|---|---|---|---|---|---|
{{math|({{mrad|2}}){{su|p=2}} {{=}} 2}} | (√2)2 = 2 | ||||||
{{math|A{{su|p=12|b=3}}}} | A123 | ||||||
{{math|{{minteg|0|+∞|{{mexp|−''x''}} d''x''}} {{=}} 1}} | ∫+∞0e−x dx = 1 | ||||||
{{math|{{mfrac|1|2}} − {{mfrac|1|3}} {{=}} {{mfrac|1|6}}}} |
| ||||||
{{mparen|(|}|line1|line2|line3}} | ⎛ ⎜ ⎝line1 line2 line3⎫ ⎬ ⎭ | ||||||
{{mparen|{|]|line1|line2|style=font-style: italic;|rows=3}} | ⎧ ⎨ ⎩line1 line2⎤ ⎥ ⎦ |
The above documentation is transcluded from Template:math/doc. (edit | history) Subpages of this template. |