Frac: Difference between revisions

From Vigyanwiki
Template>Crissov
(add {{{spell}}} parameter)
m (43 revisions imported from alpha:Template:Frac)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<abbr class="frac nowrap" style="font-variant-numeric: diagonal-fractions;border-bottom:0" title="{{{spell|{{#invoke:ConvertNumeric | numeral_to_english | {{#if:{{{3|}}}|{{{1|0}}}|}} | numerator={{#if:{{{3|}}}|{{{2|0}}}|{{#if:{{{2|}}}|{{{1|0}}}|1}}}} | denominator={{#if:{{{3|}}}|{{{3|1}}}|{{#if:{{{2|}}}|{{{2|1}}}|{{{1|1}}}}}}} }} }}}">{{#if:{{{3|{{{2|}}}}}}
#REDIRECT [[Template:Fraction]]
|{{#if: {{{3|}}} |{{{1}}}&thinsp;|}}{{#switch:
  {{#expr: {{#if: {{{3|}}} | {{{2}}}/{{{3}}} | {{{1}}}/{{{2}}} }} }}
  |{{#expr:1/2}} = ½
  |{{#expr:1/3}} = ⅓
  |{{#expr:2/3}} = ⅔
  |{{#expr:1/4}} = ¼
  |{{#expr:3/4}} = ¾
  |{{#expr:1/5}} = ⅕
  |{{#expr:2/5}} = ⅖
  |{{#expr:3/5}} = ⅗
  |{{#expr:4/5}} = ⅘
  |{{#expr:1/6}} = ⅙
  |{{#expr:5/6}} = ⅚
  |{{#expr:1/7}} = ⅐
  |{{#expr:1/8}} = ⅛
  |{{#expr:3/8}} = ⅜
  |{{#expr:5/8}} = ⅝
  |{{#expr:7/8}} = ⅞
  |{{#expr:1/9}} = ⅑
  |{{#expr:1/10}} = ⅒
  |#default={{#if:{{{3|}}} | {{{2}}}/{{{3}}} | {{{1}}}/{{{2}}} }}
}}
|{{#switch:{{{1}}}
  |2 = ½
  |3 = ⅓
  |4 = ¼
  |5 = ⅕
  |6 = ⅙
  |7 = ⅐
  |8 = ⅛
  |9 = ⅑
  |10= ⅒
  |#default=⅟{{{1|x}}}
}}
}}</abbr><noinclude>
{{Documentation}}
</noinclude>

Latest revision as of 09:24, 10 December 2022

Redirect to: