Template:Fraction: Difference between revisions
From Vigyanwiki
Template>Crissov (1, 2 or 3 parameters; template:frac0 can be deprecated now) |
Template>Crissov m (#2: removed <small/> and <big/>) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{3|}}}|{{{1}}}<s style="display:none">+</s | <includeonly>{{#if:{{{3|}}}|{{{1}}}<s style="display:none">+</s><sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub>|{{#if:{{{2|}}}|<sup>{{{1}}}</sup>⁄<sub>{{{2}}}</sub>|<sup>1</sup>⁄<sub>{{{1}}}</sub>}}}}</includeonly><noinclude> | ||
This template builds nicer looking [[common fraction]]s. It takes one, two or three parameters: the optional integer ( | This template builds nicer looking [[common fraction]]s. It takes one, two or three parameters: the optional integer (maybe signed), the optional numerator and the required denominator; in this order. | ||
; <code><nowiki>{{frac|a|b|c}}</nowiki></code>: {{frac|a|b|c}} (integer, numerator and denominator) | ; <code><nowiki>{{frac|a|b|c}}</nowiki></code>: {{frac|a|b|c}} (integer, numerator and denominator) | ||
; <code><nowiki>{{frac|a|b}}</nowiki></code>: {{frac|a|b}} (numerator and denominator) | ; <code><nowiki>{{frac|a|b}}</nowiki></code>: {{frac|a|b}} (numerator and denominator) |
Revision as of 17:21, 22 June 2006
This template builds nicer looking common fractions. It takes one, two or three parameters: the optional integer (maybe signed), the optional numerator and the required denominator; in this order.
{{frac|a|b|c}}
- a b⁄c (integer, numerator and denominator)
{{frac|a|b}}
- a⁄b (numerator and denominator)
{{frac|a}}
- 1⁄a (denominator only)