Difference between revisions of "Template:Fraction"
Jump to navigation
Jump to search
imported>Random832 (redundant templates) |
imported>Crissov ({{fraction}} now differs from {{frac}}, it is used for precomposed fractions, whereas {{frac}} is more general) |
||
| Line 1: | Line 1: | ||
| − | # | + | |
| + | <includeonly>{{#if:{{{3|}}}|<span class="template-frac">{{{1}}} {{{2}}}⁄{{{3}}}</span>|<noinclude> | ||
| + | #else: | ||
| + | </noinclude>{{#if:{{{2|}}}|<noinclude> | ||
| + | Complex: | ||
| + | <!--with three parameters precomposed fractions are not used yet--> | ||
| + | </noinclude>{{#switch:{{{2}}} | ||
| + | | 0 = {{#ifeq:{{{1}}} | ||
| + | | 0 | % | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 00 = {{#ifeq:{{{1}}} | ||
| + | | 0 | ‰ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 000 = {{#ifeq:{{{1}}} | ||
| + | | 0 | ‱ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 2 = {{#ifeq:{{{1}}} | ||
| + | | 1 | ½ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 3 = {{#switch:{{{1}}} | ||
| + | | 1 = ⅓ | ||
| + | | 2 = ⅔ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 4 = {{#switch:{{{1}}} | ||
| + | | 1 = ¼ | ||
| + | | 2 = ½ | ||
| + | | 3 = ¾ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 5 = {{#switch:{{{1}}} | ||
| + | | 1 = ⅕ | ||
| + | | 2 = ⅖ | ||
| + | | 3 = ⅗ | ||
| + | | 4 = ⅘ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 6 = {{#switch:{{{1}}} | ||
| + | | 1 = ⅙ | ||
| + | | 2 = ⅓ | ||
| + | | 3 = ½ | ||
| + | | 4 = ⅔ | ||
| + | | 5 = ⅚ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | 8 = {{#switch:{{{1}}} | ||
| + | | 1 = ⅛ | ||
| + | | 2 = ¼ | ||
| + | | 3 = ⅜ | ||
| + | | 4 = ½ | ||
| + | | 5 = ⅝ | ||
| + | | 6 = ¾ | ||
| + | | 7 = ⅞ | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }} | ||
| + | | <span class="template-frac">{{{1}}}⁄{{{2}}}</span> | ||
| + | }}|<noinclude> | ||
| + | #else: | ||
| + | </noinclude>{{#switch:{{{1}}}|2=½|3=⅓|4=¼|5=⅕|6=⅙|8=⅛|<span class="template-frac">⅟{{{1}}}</span>}}}}}}</includeonly><noinclude> | ||
| + | {{documentation}} | ||
| + | </noinclude> | ||
Revision as of 22:41, 21 June 2010
File:Test Template Info-Icon - Version (2).svg Template documentation[create]
| Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |