మూస:Sortfrac

వికీపీడియా నుండి
Jump to navigation Jump to search

<span class="template-frac">1{{{1}}}</span>

Template documentation[view] [edit] [history] [purge]

This template is a combination of {{frac}} and {{sort}}. It allows numerical sorting of a column containing fractions.

Examples[మార్చు]

  • "{{sortfrac|78|2|3}}" gives "7823" [1]
  • "{{sortfrac|2|3}}" gives "23" [2]
  • "{{sortfrac|3}}" gives "13" [3]

For examples of tables using the template see DHL Delivery Man Award.

Code[మార్చు]

<span class="template-frac">
{{#if:{{{3|}}}
   |{{sort
     |{{#expr: {{{1}}}+{{{2}}}/{{{3}}} }}
     |{{{1}}}<sup>{{{2}}}</sup>&frasl;<sub>{{{3}}}</sub>}}
   |{{#if:{{{2|}}}
     |{{sort
       |{{#expr: {{{1}}}/{{{2}}} }}
       |<sup>{{{1}}}</sup>&frasl;<sub>{{{2}}}</sub>}}
     |{{sort
       |{{#expr: 1/{{{1}}} }}
       |<sup>1</sup>&frasl;<sub>{{{1}}}</sub>}}
    }}
}}
</span>

See also[మార్చు]

"https://te.wikipedia.org/w/index.php?title=మూస:Sortfrac&oldid=1043560" నుండి వెలికితీశారు