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
- {{frac}}, displays common fractions using a fraction slash, e.g. 1⁄60
- {{mfrac}}, displays common fractions using LaTeX markup, e.g.
- {{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 ⅔