Bản mẫu:Spellnum per MOS

Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

Cách sử dụng

sửa

Applies style guidance from MOS:NUMERAL to determine whether a number should be spelled out in prose. All optional arguments of {{số sang chữ}} are accepted by this template.

Per MOS:NUMERAL:

  • 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ụ

sửa
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

sửa