This template usesLua :
This template builds an alternative form of common or mixedfractions , using avinculum (horizontal line), forscientific and mathematical text . It takes one, two or three parameters: the optional integer (may be signed), the optional numerator and the required denominator; in this order.
{{sfrac|A|B|C}}
A+ B / C (integer, numerator and denominator){{sfrac|B|C}}
B / C (numerator and denominator){{sfrac|C}}
1 / C (denominator only)
Examples 1 / 2 , 1 / 3 , 2 / 3 , 1 / 4 , 3 / 4 , 1 / 5 , 2 / 5 , 3 / 5 , 4 / 5 , 1 / 6 , 5 / 6 , 1 / 7 , 2 / 7 , 3 / 7 , 4 / 7 , 5 / 7 , 6 / 7 , 1 / 8 , 3 / 8 , 5 / 8 , 7 / 8 , 1 / 16 , 3 / 16 , 5 / 16 , 7 / 16 , 9 / 16 , 11 / 16 , 13 / 16 , 15 / 16 , 22 / 7 , 1+ 1 / 16 , 16+ 2 / 3 , 2π / a 2 b
Inside the{{ math }} template (for inline math):
1 / 2 , 1 / 3 , 2 / 3 , 1 / 4 , 3 / 4 , 1 / 5 , 2 / 5 , 3 / 5 , 4 / 5 , 1 / 6 , 5 / 6 , 1 / 7 , 2 / 7 , 3 / 7 , 4 / 7 , 5 / 7 , 6 / 7 , 1 / 8 , 3 / 8 , 5 / 8 , 7 / 8 , 1 / 16 , 3 / 16 , 5 / 16 , 7 / 16 , 9 / 16 , 11 / 16 , 13 / 16 , 15 / 16 , 22 / 7 , 1+ 1 / 16 , 16+ 2 / 3 , 2π , / a 2 b
Inside the{{ bigmath }} template (for standalone math):
1 / 2 , 1 / 3 , 2 / 3 , 1 / 4 , 3 / 4 , 1 / 5 , 2 / 5 , 3 / 5 , 4 / 5 , 1 / 6 , 5 / 6 , 1 / 7 , 2 / 7 , 3 / 7 , 4 / 7 , 5 / 7 , 6 / 7 , 1 / 8 , 3 / 8 , 5 / 8 , 7 / 8 , 1 / 16 , 3 / 16 , 5 / 16 , 7 / 16 , 9 / 16 , 11 / 16 , 13 / 16 , 15 / 16 , 22 / 7 , 1+ 1 / 16 , 16+ 2 / 3 , 2π , / a 2 b
Parameters A template builds an alternative form of common or mixed fractions, using a vinculum (horizontal line), for scientific and mathematical text. It supports 1–3 anonymous parameters with positional meaning.
Template parameters[ Edit template data ]
Parameter Description Type Status leftmost part 1
Denominator if only parameter supplied. Numerator if 2 parameters supplied. Integer if 3 parameters supplied.
Line optional middle-right part 2
Denominator if 2 parameters supplied. Numerator if 3 parameters supplied.
Line optional rightmost part 3
Denominator, always.
Line optional font size font-size
Set customized font size.
Line optional
See also
Math templates
mvar individual italicized maths variables in normal text overline underline a line set above/below a sequence of characters overarc an arc set above a sequence of characters overset underset arbitrary characters/diacritics set above/below one another pars parentheses that can be resized( ∑ ) sfrac "standing" or upright fractions3 / 5 (use in maths/science articles instead of{{fraction }}
) sub sup su subscripts and superscripts tmath WrapTeX in<math> tags tombstone symbol indicating theend of a proof val measurement values, uncertainties and units vec various overarrows, underarrows, etc.