Template:Sortable ratio: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly><!--##### ## Sort key #########--><small style="display:none;">{{#switch:{{ratio|{{{1}}}|{{{2}}}|total={{{total|}}}|text=}} |0 = 0.000 |100 = 1.000 | {{#e...") |
m (→Usage) |
||
Line 11: | Line 11: | ||
==Usage== | ==Usage== | ||
Usage and output is identical to {{[[template:ratio|ratio]]}}, except this template prepends a hidden decimal number that makes ratios sort correctly in | Usage and output is identical to {{[[template:ratio|ratio]]}}, except this template prepends a hidden decimal number that makes ratios sort correctly in sortable tables. | ||
==Usage== | |||
{| class="prettytable" | |||
| <pre>{{sortable ratio|1|2}}</pre> | |||
|style="font-size:2em;"| → | |||
| {{sortable ratio|1|2}} | |||
|- | |||
| <pre>{{sortable ratio|1|2|text=!!!!!}}</pre> | |||
|style="font-size:2em;"| → | |||
| {{sortable ratio|1|2|text=!!!!!}} | |||
|- | |||
| <pre>{{sortable ratio|1|total=3}}</pre> | |||
|style="font-size:2em;"| → | |||
| {{sortable ratio|1|total=3}} | |||
|- | |||
| <pre>{{sortable ratio|1|2|round=4}}</pre> | |||
|style="font-size:2em;"| → | |||
| {{sortable ratio|1|2|round=4}} | |||
|} | |||
</noinclude> |
Revision as of 20:42, 29 January 2014
Usage
Usage and output is identical to {{ratio}}, except this template prepends a hidden decimal number that makes ratios sort correctly in sortable tables.
Usage
{{sortable ratio|1|2}} |
→ | 0.333, 33.3% (1/3) |
{{sortable ratio|1|2|text=!!!!!}} |
→ | 0.333, 33.3!!!!! |
{{sortable ratio|1|total=3}} |
→ | 0.333, 33.3% (1/3) |
{{sortable ratio|1|2|round=4}} |
→ | 0.333, 33.3% (1/3) |