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}}
→
x
y
z
{\displaystyle \scriptstyle {x{\frac {y}{z}}}}
{{mfrac||y|z}}
→
y
z
{\displaystyle \scriptstyle {\frac {y}{z}}}
{{mfrac|x|y}}
→
x
y
{\displaystyle \scriptstyle {\frac {x}{y}}}
{{mfrac|x||z}}
→
x
z
{\displaystyle \scriptstyle {x{\frac {}{z}}}}
{{mfrac|x||}}
→
1
x
{\displaystyle \scriptstyle {\frac {1}{x}}}
{{mfrac||y|}}
→
y
{\displaystyle \scriptstyle {\frac {}{y}}}
{{mfrac|||z}}
→
z
{\displaystyle \scriptstyle {\frac {}{z}}}
{{mfrac||w}}
→
w
{\displaystyle \scriptstyle {\frac {}{w}}}
{{mfrac|k}}
→
1
k
{\displaystyle \scriptstyle {\frac {1}{k}}}
{{mfrac}}
→
{\displaystyle }
{{mfrac|A|B|C}}
A
B
C
{\displaystyle \scriptstyle {A{\frac {B}{C}}}}
(integer, numerator and denominator)
{{mfrac|A|B}}
A
B
{\displaystyle \scriptstyle {\frac {A}{B}}}
(numerator and denominator)
{{mfrac|A}}
1
A
{\displaystyle \scriptstyle {\frac {1}{A}}}
(special case: interpolated reciprocal (sfrac compatibility))
{{mfrac||B}}
B
{\displaystyle \scriptstyle {\frac {}{B}}}
(denominator only)
A leading 1 to allow for the relative positions compared to a standard character:
1
1
2
{\displaystyle \scriptstyle {\frac {1}{2}}}
1
3
{\displaystyle \scriptstyle {\frac {1}{3}}}
2
3
{\displaystyle \scriptstyle {\frac {2}{3}}}
1
4
{\displaystyle \scriptstyle {\frac {1}{4}}}
3
4
{\displaystyle \scriptstyle {\frac {3}{4}}}
1
5
{\displaystyle \scriptstyle {\frac {1}{5}}}
2
5
{\displaystyle \scriptstyle {\frac {2}{5}}}
3
5
{\displaystyle \scriptstyle {\frac {3}{5}}}
4
5
{\displaystyle \scriptstyle {\frac {4}{5}}}
1
6
{\displaystyle \scriptstyle {\frac {1}{6}}}
5
6
{\displaystyle \scriptstyle {\frac {5}{6}}}
1
7
{\displaystyle \scriptstyle {\frac {1}{7}}}
2
7
{\displaystyle \scriptstyle {\frac {2}{7}}}
3
7
{\displaystyle \scriptstyle {\frac {3}{7}}}
4
7
{\displaystyle \scriptstyle {\frac {4}{7}}}
5
7
{\displaystyle \scriptstyle {\frac {5}{7}}}
6
7
{\displaystyle \scriptstyle {\frac {6}{7}}}
1
8
{\displaystyle \scriptstyle {\frac {1}{8}}}
3
8
{\displaystyle \scriptstyle {\frac {3}{8}}}
5
8
{\displaystyle \scriptstyle {\frac {5}{8}}}
7
8
{\displaystyle \scriptstyle {\frac {7}{8}}}
1
16
{\displaystyle \scriptstyle {\frac {1}{16}}}
3
16
{\displaystyle \scriptstyle {\frac {3}{16}}}
5
16
{\displaystyle \scriptstyle {\frac {5}{16}}}
7
16
{\displaystyle \scriptstyle {\frac {7}{16}}}
9
16
{\displaystyle \scriptstyle {\frac {9}{16}}}
11
16
{\displaystyle \scriptstyle {\frac {11}{16}}}
13
16
{\displaystyle \scriptstyle {\frac {13}{16}}}
15
16
{\displaystyle \scriptstyle {\frac {15}{16}}}
{{frac }}, displays common fractions using a fraction slash, e.g. 1 ⁄60
{{mfrac }}, displays common fractions using LaTeX markup, e.g.
1
60
{\displaystyle \scriptstyle {\frac {1}{60}}}
{{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 ⅔