Template:Frac: Difference between revisions
From Vigyanwiki
Template>MSGJ (prettify code) |
Template>Thesevenseas (Optimised Code) |
||
Line 1: | Line 1: | ||
<span class="template-frac">{{#if:{{{3|}}} | <span class="template-frac"><noinclude><!-- | ||
--></noinclude>{{#if:{{{3|}}} | |||
|{{{1}}} {{#switch:{{{3}}} | |||
|2 = {{#ifeq:{{{2}}}|1 | |||
|½ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|3 = {{#switch:{{{2}}} | |||
|1=⅓ | |||
|2=⅔ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|4 = {{#switch:{{{2}}} | |||
|1=¼ | |||
|2=½ | |||
|3=¾ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|5 = {{#switch:{{{2}}} | |||
|1=⅕ | |||
|2=⅖ | |||
|3=⅗ | |||
|4=⅘ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|6 = {{#switch:{{{2}}} | |||
|1=⅙ | |||
|2=⅓ | |||
|3=½ | |||
|4=⅔ | |||
|5=⅚ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|8 = {{#switch:{{{2}}} | |||
|1=⅛ | |||
|2=¼ | |||
|3=⅜ | |||
|4=½ | |||
|5=⅝ | |||
|6=¾ | |||
|7=⅞ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|{{#if:{{{2|}}} | |||
|{{#switch:{{{2}}} | |||
|2 = {{#ifeq:{{{1}}}|1 | |||
|½ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|3 = {{#switch:{{{1}}} | |||
|1=⅓ | |||
|2=⅔ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|4 = {{#switch:{{{1}}} | |||
|1=¼ | |||
|2=½ | |||
|3=¾ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|5 = {{#switch:{{{1}}} | |||
|1=⅕ | |||
|2=⅖ | |||
|3=⅗ | |||
|4=⅘ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|6 = {{#switch:{{{1}}} | |||
|1=⅙ | |||
|2=⅓ | |||
|3=½ | |||
|4=⅔ | |||
|5=⅚ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|8 = {{#switch:{{{1}}} | |||
|1=⅛ | |||
|2=¼ | |||
|3=⅜ | |||
|4=½ | |||
|5=⅝ | |||
|6=¾ | |||
|7=⅞ | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|#default=<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub> | |||
}} | |||
|{{#switch:{{{1}}} | |||
|2=½ | |||
|3=⅓ | |||
|4=¼ | |||
|5=⅕ | |||
|6=⅙ | |||
|8=⅛ | |||
|#default=⅟<sub>{{{1}}}</sub> | |||
}} | |||
}}</span><noinclude> | }} | ||
{{ | }}</span><noinclude> | ||
{{Documentation}} | |||
</noinclude> | </noinclude> |
Revision as of 20:47, 2 October 2010
⅟{{{1}}}
Template documentation
[create]