ទំព័រគំរូ:Ntc

ពីវិគីភីឌា
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

This template creates a sortable numeric cell with centered contents in a Wikitable.

Use[កែប្រែ]

The complete syntax of this template is:

{{Ntc|var|prefix=|format=|color=|bgcolor|debug=}}

Parameters[កែប្រែ]

  • var is a real number in the range -9999999999999999.999999 to 9999999999999999.999999 (-1E+16 to 1E+16)
  • prefix= an optional prefix
  • format= a number format option
    • format=yes – displays thousands separator commas (default)
    • format=no – does not display thousands separator commas
  • color= a text color option
    • color=black (default)
  • bgcolor= a background color option
    • bgcolor=#F7F7FF (default)
  • debug= a debug option
    • debug=yes – displays a debug prefix (see debug examples)
    • debug=no – does not display a debug prefix (default)

This template is subject to the number table sorting limitations.

Example[កែប្រែ]

The following Wikitext:

{|class="wikitable sortable"
|+A Sortable Wikitable
!left alignment
!center alignment
!right alignment
|-
{{ntl|275678|prefix=A.    }}
{{ntc|34.820}}&nbsp;km<sup>2</sup>
{{ntr|7917.231}}&nbsp;km<sup>-2</sup>
|-
{{ntl|1665909|prefix=B.&nbsp;}}
{{ntc|45.783}}&nbsp;km<sup>2</sup>
{{ntr|36387.065}}&nbsp;km<sup>-2</sup>
|-
{{ntl|550125|prefix=C.&nbsp;&nbsp;&nbsp;&nbsp;}}
{{ntc|85.882}}&nbsp;km<sup>2</sup>
{{ntr|6405.591}}&nbsp;km<sup>-2</sup>
|}

creates:

A Sortable Wikitable
left alignment center alignment right alignment
7005275678000000000A.    ២៧៥៦៧៨ 7001348200000000000៣៤,៨២០ km2 7003791723100000000៧៩១៧,២៣១ km-2
7006166590900000000B. ១៦៦៥៩០៩ 7001457830000000000៤៥,៧៨៣ km2 7004363870650000000៣៦៣៨៧,០៦៥ km-2
7005550125000000000C.    ៥៥០១២៥ 7001858820000000000៨៥,៨៨២ km2 7003640559100000000៦៤០៥,៥៩១ km-2

See also[កែប្រែ]