Template:Number/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Number (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
Usage[edit]
Automatically formats a number. Use in the following format:
- {{Number|numerals|words}}
For example: {{Number|1000000000|one billion}}
This template is useful because words like "billion" can have different meanings, so the title text provides a simple way for the reader to differentiate, and because it standardises the output of most common numbers to style guide conformance.
Examples[edit]
Input | Output | Notes |
---|---|---|
{{Number|10}} | 10 | This is incorrect. The template is rather useless if only one parameter is specified, outputting only its value. |
{{Number||ten}} | ten | |
{{Number|10|ten}} | ten | Numbers one to ten are expressed as words |
{{Number|20|twenty}} | twenty | Multiples of ten up to ninety are expressed in words |
{{Number|25|twenty-five}} | 25 | Other numbers between twenty and 999 are expressed as numerals |
{{Number|2000|two thousand}} | two thousand | Multiples of one thousand are expressed as words, with numerals as the title text |
{{Number|1000000000|one billion}} | one billion | |
{{Number|9876543210|nine billion, eight hundred and seventy-six million, five hundred and forty-three thousand, two hundred and ten}} | 9,876,543,210 | Other numbers greater than 1,000 are expressed as numerals |
{{Number|986 × 10^100|986 googol}} | 986 googol | For very large numbers, use standard form, which will be given as title text Note: Powers must be expressed in x^y format - <sup> does not work inside <abbr> |
{{Number|25 :)|twenty-five}} | twenty-five | It is technically incorrect to include any characters other than numeric digits and decimal points in parameter 1, but this output is provided as a fallback to allow for standard form notations such as the 986 googol example above. |
{{Number|twenty-five|25}} | 25 | This is technically incorrect, but may have some valid uses. This style of output will always be given if the parameters are the wrong way round, so there will be no automatic style-guide conformance. |