This template builds an alternative form of common fractions. It takes one, two or three parameters: the optional integer (may be signed), the optional numerator and the required denominator; in this order.
Sampler
{{mfrac|x|y|z}} |
→ |
|
{{mfrac||y|z}} |
→ |
|
{{mfrac|x|y}} |
→ |
|
{{mfrac|x||z}} |
→ |
|
{{mfrac|x||}} |
→ |
|
{{mfrac||y|}} |
→ |
|
{{mfrac|||z}} |
→ |
|
{{mfrac||w}} |
→ |
|
{{mfrac|k}} |
→ |
|
{{mfrac}} |
→ |
|
{{mfrac|A|B|C}}
(integer, numerator and denominator)
{{mfrac|A|B}}
(numerator and denominator)
{{mfrac|A}}
(special case: interpolated reciprocal (sfrac compatibility))
{{mfrac||B}}
(denominator only)
A leading 1 to allow for the relative positions compared to a standard character:
- 1
![{\displaystyle \scriptstyle {\frac {15}{16}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/36833e96ab5a67a9d7cec466d7acacf88cace1d4)
- {{frac}}, displays common fractions using a fraction slash, e.g. 1⁄60
- {{mfrac}}, displays common fractions using LaTeX markup, e.g.
![{\displaystyle \scriptstyle {\frac {1}{60}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/354d564d4c8146441b8dcc507b7b083185ce3733)
- {{sfrac}} for horizontal fraction line, e.g. 1/60
- {{sfrac nobar}}, displays common fractions without a fraction line, e.g. 1/60
- {{dual line}}, displays two lines of text as an inline block
- {{unifrac}}, displays the Unicode character for a fraction if it exists and otherwise delegates to {{frac}}, e.g. ⅝ but 1⁄60
- {{frac13}}, displays ⅓
- {{frac23}}, displays ⅔