Nodyn:Numkey

Oddi ar Wicipedia
Jump to navigation Jump to search
Documentation icon Dogfennaeth nodyn[gweld] [golygu] [hanes] [puro]

Use[golygu cod y dudalen]

This template creates an invisible sort key prefix based upon a real number 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 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 for this template is:

{{numkey|var1}}

where:

The use of this template is illustrated below:

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

See also[golygu cod y dudalen]