ទំព័រគំរូ:Number table sortingThis template can be useful when building a sortable table in which a column contains both numbers and text. This template should be applied to every number in the column. Currently, the template works for numbers between −10308 and 10308. Numbers outside this range will sort above or below other numbers depending on sign. See the Limitations section below. By default the output is displayed using thousands separators. To display numbers as entered, use The template generates a hidden "sort key" in the HTML markup which forces the JavaScript sorting algorithm to sort the column alphabetically. PurposeThere are at two cases where this template is useful:
ParametersThe template has only one required parameter: a real number. These examples use the name of the redirect, {{nts}}, for brevity.
Apart from the added thousands separators the numbers are formatted as supplied (scientific notation or not, leading and trailing zeros, and a zero before the decimal point or not). This formatting does not affect the sorted order except for numbers not satisfying the limitations mentioned below. Sort keyThe sort key is a nineteen-digit number. For numbers within range the first four digits are determined by the number's sign and order of magnitude and the next fifteen digits are determined by the number's sign and significand.
Limitations
Examples
For text which follows a number, Below are more examples, some of which illustrate the limitations listed above.
See also
|
Portal di Ensiklopedia Dunia