Sjabloon:Numkey2/doc

Uit informatiestandaarden
Ga naar: navigatie, zoeken

Use

This template creates an invisible sort key prefix based upon a real number or one of several mathematical symbols for use in sortable tables with mixed numbers and text or merely text. This template creates a valid sort key with an accuracy of one part in 10,000,000,000 for real numbers in the ranges 1e-300 to 1e300 and -1e-300 to -1e300. If the absolute value of the real number is greater than 1e300, this template creates a key representing infinity. If the absolute value of the real number is greater than 0 but less than 1e-300, this template creates a key representing infinitesimal. If the input variable is not a real number, this template does not create a key.

The syntax of this template is:

{{numkey2|var1}}

where var1 is any real number (may contain thousands separators), ∞, 1/∞, -1/∞, -∞, INF, 1/INF, -1/INF, -INF, IND, indeterminate, UND, undefined, UNK, unknown, NA, not applicable, or not available.

The use of this template is illustrated in the sortable table below:

Wikitext Invisible sort key prefix sort without key sort with key
{{numkey2|0}}zero <span style="display:none">!F </span> zero !F zero
{{numkey2|1}}one <span style="display:none">!C </span> one !C one
{{numkey2|+2}}+2 <span style="display:none">!B9993068528194 </span> +2 !B9993068528194 +2
{{numkey2|-3}}-3 <span style="display:none">!J0010986122886 </span> -3 !J0010986122886 -3
{{numkey2|-4.01267}}-4.01267 <span style="display:none">!J0013894568551 </span> -4.01267 !J0129023823201 -4.01267
{{numkey2|5.125}}5.125&nbsp;amperes <span style="display:none">!B9983658694749 </span> 5.125 amperes !B9914581141959 5.125 amperes
{{numkey2|{{#expr:2*pi}}}}2&pi; <span style="display:none">!B9981621229335 </span> !B9682285167246 
{{numkey2|7}}VII <span style="display:none">!B9980540898509 </span> VII !B9980540898509 VII
{{numkey2|8.27}}£8.27 <span style="display:none">!B9978873654909 </span> £8.27 !B9932821953049 £8.27
{{numkey2|-9.000}}-9.000 <span style="display:none">!J0021972245773 </span> -9.000 !J0091049798563 -9.000
{{numkey2|10}}10 apples <span style="display:none">!B9976974149070 </span> 10 apples !B9976974149070 10 apples
{{numkey2|1776}}MDCCLXXVI <span style="display:none">!B9925178810764 </span> MDCCLXXVI !B9925178810764 MDCCLXXVI
{{numkey2|10000000000}}10,000,000,000 <span style="display:none">!B9769741490700 </span> 10,000,000,000 !B9769741490700 10,000,000,000
{{numkey2|10000000001}}10,000,000,001 <span style="display:none">!B9769741490699 </span> 10,000,000,001 !B9769741490699 10,000,000,001
{{numkey2|12046360889000}}$12,046,360,889,000 <span style="display:none">!B9698802162706 </span> $12,046,360,889,000 !B9698802162706 $12,046,360,889,000
{{numkey2|1e100}}googol <span style="display:none">!B7697414907005 </span> googol !B7697414907005 googol
{{numkey2|-1}}minus one <span style="display:none">!I </span> minus one !I minus one
{{numkey2|0.25}}$0.25 <span style="display:none">!D0013862943611 </span> $0.25 !B9967811241751 $0.25
{{numkey2|-0.035}}-0.035 <span style="display:none">!H9966475927825 </span> -0.035 !J0035553480614 -0.035
{{numkey2|-1.4525e-9}}-1.4525e-9&nbsp;m <span style="display:none">!H9796500203727 </span> -1.4525e-9 m !H9888603607447 -1.4525e-9 m
{{numkey2|1e-300}}googol<sup>-3</sup> <span style="display:none">!D6907755278982 </span> googol-3 !D6907755278982 googol-3
{{numkey2|-1e300}}-googol<sup>3</sup> <span style="display:none">!J6907755278982 </span> -googol3 !J6907755278982 -googol3
{{numkey2|1e301}}1e301 <span style="display:none">!A </span> 1e301 !A 1e301
{{numkey2|1e-302}}1e-302 <span style="display:none">!E </span> 1e-302 !D6953806980842 1e-302
{{numkey2|-1e303}}-1e303 <span style="display:none">!K </span> -1e303 !K -1e303
{{numkey2|-1e-304}}-1e-304 <span style="display:none">!G </span> -1e-304 !H3000141317298 -1e-304
{{numkey2|not a number}}AAA AAA AAA
{{numkey2}}ZZZ ZZZ ZZZ

See also