Sjabloon:Sortfrac: verschil tussen versies

Uit informatiestandaarden
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met '<noinclude><span class="template-frac"></noinclude><span class="template-frac">{{#if:{{{3|}}} |{{sort|{{#expr:{{{1}}}+{{{2}}}/{{{3}}}}}|{{{1}}}<sup>{{{2}}}<...')
 
(geen verschil)

Huidige versie van 18 jul 2013 om 09:05

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

[bewerken] [purge] Template documentation

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

Examples

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