|
|
(5 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <includeonly><hr><small>Documentation transcluded from [[/doc]]</small></includeonly>
| | {{substitute|no}}{{doc head Wikipedia}}{{templatestyles}} |
| This template renders fractions in diagonal form.
| |
|
| |
|
| === Usage ===
| | {{Shortcut|frac}} |
| Anywhere between zero and three arguments can be passed: A mixed number is notated with three (integer part, numerator, and denominator), a normal fraction with two, and entering just one will notate a reciprocal. Not passing any arguments will result in the output consisting only of the slash itself: U+2215  ∕  <span style="font-size: 10px;">DIVISION SLASH</span>.
| |
|
| |
|
| === Examples === | | === See also === |
| {| class="wikitable center-all"
| | * [[:Template:Sfrac]] – for typesetting vertical fractions.{{clear}} |
| ! You type
| |
| ! You get
| |
| |-
| |
| | <code><nowiki>{{fraction|A|B|C}}</nowiki></code>
| |
| | {{fraction|A|B|C}} (integer, numerator, and denominator)
| |
| |-
| |
| | <code><nowiki>{{fraction|B|C}}</nowiki></code>
| |
| | {{fraction|B|C}} (numerator and denominator)
| |
| |-
| |
| | <code><nowiki>{{fraction|C}}</nowiki></code>
| |
| | {{fraction|C}} (just denominator)
| |
| |-
| |
| | <code><nowiki>{{fraction}}</nowiki></code>
| |
| | {{fraction}} (just the fraction slash character)
| |
| |}
| |
| | |
| <noinclude>[[Category:Template documentation]]</noinclude>
| |