Template:Frac: Difference between revisions

From Vigyanwiki
Template>Crissov
No edit summary
Template>Crissov
mNo edit summary
Line 1: Line 1:
<includeonly><span class="template-frac">{{#if:{{{3|}}}|{{{1}}}&thinsp;{{#switch:{{{3}}}
<includeonly><span class="template-frac">{{#if:{{{3|}}}|{{{1}}}&thinsp;{{#switch:{{{3}}}
| 2 = {{#ifeq:{{{2}}}
| 2 = {{#ifeq:{{{2}}}
   | 1 | ½
   | 1 |½
   | {{{2}}}&frasl;{{{3}}}
   |{{{2}}}&frasl;{{{3}}}
   }}
   }}
| 3 = {{#switch:{{{2}}}
| 3 = {{#switch:{{{2}}}
   | 1 = ⅓
   | 1 =⅓
   | 2 = ⅔
   | 2 =⅔
   | {{{2}}}&frasl;{{{3}}}
   |{{{2}}}&frasl;{{{3}}}
   }}
   }}
| 4 = {{#switch:{{{2}}}
| 4 = {{#switch:{{{2}}}
   | 1 = ¼
   | 1 =¼
   | 2 = ½
   | 2 =½
   | 3 = ¾
   | 3 =¾
   | {{{2}}}&frasl;{{{3}}}
   |{{{2}}}&frasl;{{{3}}}
   }}
   }}
| 5 = {{#switch:{{{2}}}
| 5 = {{#switch:{{{2}}}
   | 1 = ⅕
   | 1 =⅕
   | 2 = ⅖
   | 2 =⅖
   | 3 = ⅗
   | 3 =⅗
   | 4 = ⅘
   | 4 =⅘
   | {{{2}}}&frasl;{{{3}}}
   |{{{2}}}&frasl;{{{3}}}
   }}
   }}
| 6 = {{#switch:{{{2}}}
| 6 = {{#switch:{{{2}}}
   | 1 = ⅙
   | 1 =⅙
   | 2 = ⅓
   | 2 =⅓
   | 3 = ½
   | 3 =½
   | 4 = ⅔
   | 4 =⅔
   | 5 = ⅚
   | 5 =⅚
   | {{{2}}}&frasl;{{{3}}}
   |{{{2}}}&frasl;{{{3}}}
   }}
   }}
| 8 = {{#switch:{{{2}}}
| 8 = {{#switch:{{{2}}}
   | 1 = ⅛
   | 1 =⅛
   | 2 = ¼
   | 2 =¼
   | 3 = ⅜
   | 3 =⅜
   | 4 = ½
   | 4 =½
   | 5 = ⅝
   | 5 =⅝
   | 6 = ¾
   | 6 =¾
   | 7 = ⅞
   | 7 =⅞
   | {{{2}}}&frasl;{{{3}}}
   |{{{2}}}&frasl;{{{3}}}
   }}
   }}
| {{{2}}}&frasl;{{{3}}}
| {{{2}}}&frasl;{{{3}}}
Line 87: Line 86:
| {{{1}}}&frasl;{{{2}}}
| {{{1}}}&frasl;{{{2}}}
}}|<noinclude>#else:
}}|<noinclude>#else:
</noinclude>{{#switch:{{{1}}}|2=½|3=⅓|4=¼|5=⅕|6=⅙|8=⅛|⅟{{{1}}} }}
</noinclude>{{#switch:{{{1}}}|2=½|3=⅓|4=¼|5=⅕|6=⅙|8=⅛|⅟{{{1}}}}}}}}}</span></includeonly><noinclude>
}}
}}</span></includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 04:33, 22 June 2010

Template documentation