Template:Fraction: Difference between revisions

From Vigyanwiki
Template>Diverman
(Improve readability by removing small font; add space)
Template>Crissov
(1, 2 or 3 parameters; template:frac0 can be deprecated now)
Line 1: Line 1:
{{{1}}}<span style="display:none">+</span><sup>&nbsp;{{{2}}}</sup>⁄<sub>{{{3}}}</sub><noinclude>
<includeonly>{{#if:{{{3|}}}|{{{1}}}<s style="display:none">+</s><small><sup>{{{2}}}</sup><big>⁄</big><sub>{{{3}}}</sub></small>|{{#if:{{{2|}}}|<small><sup>{{{1}}}</sup><big>⁄</big><sub>{{{2}}}</sub></small>|<small><sup>1</sup><big>⁄</big><sub>{{{1}}}</sub></small>}}}}</includeonly><noinclude>
 
This template builds nicer looking [[common fraction]]s. It takes one, two or three parameters: the optional integer (with leading <code>&amp;minus;</code> if necessary), the optional numerator and the required denominator; in this order.
This template builds nicer looking common fractions, sample: 1<span style="display:none">+</span><sup> 2</sup>⁄<sub>3</sub>. It takes three parameters: The integer (optionally with leading <code>&amp;minus;</code>), the numerator and the denominator. If your fraction is between zero and one you probably want to use <code>{{[[Template:Frac0|frac0]]}}</code> instead.
; <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}}</nowiki></code>: {{frac|a}} (denominator only)


[[de:Vorlage:Bruch]]
[[de:Vorlage:Bruch]]
</noinclude>
</noinclude>

Revision as of 16:34, 22 June 2006

This template builds nicer looking common fractions. It takes one, two or three parameters: the optional integer (with leading &minus; if necessary), the optional numerator and the required denominator; in this order.

{{frac|a|b|c}}
a+bc (integer, numerator and denominator)
{{frac|a|b}}
ab (numerator and denominator)
{{frac|a}}
1a (denominator only)