Bản mẫu:Spellnum per MOS/doc
Giao diện
| Đây là một trang con tài liệu dành cho Bản mẫu:Spellnum per MOS. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang bản mẫu gốc. |
| Bản mẫu này sử dụng Lua: |
Cách sử dụng Bản mẫu:Spellnum per MOS/doc
Applies style guidance from to determine whether a number should be spelled out in prose. All optional arguments of {{số sang chữ}} are accepted by this template.
Per :
- Non-integers and values less than zero are given in numerals (e.g. 0.5, -3).
- Integers from zero to nine are spelled out in words (e.g. five).
- For integers greater than or equal to ten:
- By default, numbers expressible in one or two words are spelled out (e.g. fifty-six), and numbers requiring three or more words are given as numerals (e.g. 310).
- If the argument "forcenum" is given with a value of "true" (or equivalent per Bản mẫu:Có hay không), integers greater than or equal to ten are always expressed as a numeral.
This template should be substituted unless the argument is dynamic (i.e., generated by another template or module that cannot be substituted).
Editors using this template are responsible for making sure the output aligns with the detailed guidance of WP:NUMERAL.
Các ví dụ Bản mẫu:Spellnum per MOS/doc
| Trường hợp | Hành vi mặc định | Force numerals where allowed (forcenum = "true" or equivalent ) |
|---|---|---|
| số âm hoặc không có số nguyên | {{Spellnum per MOS|-3}} → −3 | |
{{Spellnum per MOS|1.5}} → 1,5 | ||
| số nguyên nhỏ hơn 10 | {{Spellnum per MOS|1}} → một | |
{{Spellnum per MOS|9}} → chín | ||
| số nguyên yêu cầu hai hoặc ít nhất từ | {{Spellnum per MOS|54}} → 54 | {{Spellnum per MOS|54|forcenum=1}} → 54 |
{{Spellnum per MOS|300}} → ba trăm | {{Spellnum per MOS|300|forcenum=true}} → 300 | |
{{Spellnum per MOS|8000}} → tám ngàn | {{Spellnum per MOS|8000|forcenum=yes}} → 8.000 | |
| số nguyên yêu cầu nhiều hơn hai từ | {{Spellnum per MOS|320}} → 320 | |
Xem thêm Bản mẫu:Spellnum per MOS/doc
- {{số sang chữ}} – called by this template; converts all numerals to words without regard for WP:NUMERAL