Munurin millum rættingarnar hjá "Fyrimynd:Sortfrac/doc"
Content deleted Content added
EileenSanda (kjak | íkøst) sNo edit summary |
s Bot: Erstatt forældet <source> -tag og parameteren "enclose" [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html] |
||
Linja 11: | Linja 11: | ||
== Kota == |
== Kota == |
||
< |
<syntaxhighlight lang="html5"> |
||
<span class="template-frac"> |
<span class="template-frac"> |
||
{{#if:{{{3|}}} |
{{#if:{{{3|}}} |
||
Linja 27: | Linja 27: | ||
}} |
}} |
||
</span> |
</span> |
||
</syntaxhighlight> |
|||
</source> |
|||
==Sí eisini== |
==Sí eisini== |
Seinasta endurskoðan sum var 22. apr 2020 kl. 16:36
Hetta er ein dokumentatión undirsíða til Fyrimynd:Sortfrac. Hon inniheldur kunning um nýtsluna, bólkar og um annað innihald, ið ikki er við í uppruna fyrimynd síðuni. |
This template is a combination of {{frac}} and {{sort}}. It allows numerical sorting of a column containing fractions.
Dømi[rætta wikitekst]
"{{sortfrac|78|2|3}}"
gives "782⁄3" [1]"{{sortfrac|2|3}}"
gives "2⁄3" [2]"{{sortfrac|3}}"
gives "1⁄3" [3]
For examples of tables using the template see DHL Delivery Man Award.
Kota[rætta wikitekst]
<span class="template-frac">
{{#if:{{{3|}}}
|{{sort
|{{#expr: {{{1}}}+{{{2}}}/{{{3}}} }}
|{{{1}}}<sup>{{{2}}}</sup>⁄<sub>{{{3}}}</sub>}}
|{{#if:{{{2|}}}
|{{sort
|{{#expr: {{{1}}}/{{{2}}} }}
|<sup>{{{1}}}</sup>⁄<sub>{{{2}}}</sub>}}
|{{sort
|{{#expr: 1/{{{1}}} }}
|<sup>1</sup>⁄<sub>{{{1}}}</sub>}}
}}
}}
</span>
Sí eisini[rætta wikitekst]
- Fyrimynd:Sortname - sort names using "last name, first name" as default sort key