Template:Frac
Jump to navigation
Jump to search
This template uses Lua: |
Use of this template should be secondary to producing fractions per the appropriate unicodes for fractions. Typically the following characters would be reproduced using the unicode: ½ ⅓ ⅔ ¼ ¾ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅐ ⅛ ⅜ ⅝ ⅞ ⅑ ⅒ |
Usage
[edit]This template builds common fractions, using a fraction slash. It takes one, two or three parameters: the optional integer (may be signed), the optional numerator and the required denominator; in this order.
{{frac|A|B|C}}
- AB⁄C (integer, numerator and denominator)
A<s style="display:none">+</s><small><sup>B</sup>⁄<sub>C</sub></small>
{{frac|A|B}}
- A⁄B (numerator and denominator)
<small><sup>A</sup>⁄<sub>B</sub></small>
{{frac|A}}
- 1⁄A (denominator only)
<small><sup>1</sup>⁄<sub>A</sub></small>
See also
[edit]- {{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. 160
- {{sfrac nobar}}, displays common fractions without a fraction line, e.g. 160
- {{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 ⅔