Template:Fraction/doc: Difference between revisions

ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}
{{substitute|no}}{{doc head Wikipedia}}{{templatestyles}}
{{Wikipedia}}
This template renders fractions in diagonal form.
{{clear}}


=== 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 &thinsp;&#x2215;&thinsp; <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}}&nbsp; (just the fraction slash character)
|}