Template:Miokm/doc

From MidsouthMakers - Memphis Area Hackerpace
Jump to navigation Jump to search

Use

This template creates one sortable cell of a sortable table displaying a measurement formatted in international miles (of exactly 1609.344 meters) followed with the same measurement formatted in kilometers. This template is an alternative to Template:Kmomi for the United States.

The syntax of this template is:

{{miokm|var1|a=|d=|l=|p=|s=}}

where:

  • var1 is a real number representing the measurement in kilometres (may not contain a thousands separator), or NA if not available
  • a is an optional alignment parameter:
    • a=left yields left alignment
    • a=center yields center alignment (default)
    • a=right yields right alignment
  • d is an optional integer representing the number of decimal places to display (default=0)
  • l is an optional lines parameter:
    • l=1 yields a single-line display
    • l=2 yields a double-line display (default)
  • p is an optional prefix to display before each number, e.g. about , ~, >, < (default is no prefix)
  • s is an optional style parameter:
    • s= yields regular style (default)
    • s='' yields italic style
    • s=''' yields bold style
    • s=''''' yields bold italic style

Example

The use of this template is illustrated in the sortable table below:

Peak Wikitext Isolation
Mount McKinley {{miokm|7450.39}} !B9841762230620 4,629 miles
7,450 km
Mauna Kea {{miokm|3947.35}} !B9848114449743 2,453 miles
3,947 km
Mount Whitney {{miokm|2650.35}} !B9852097977352 1,647 miles
2,650 km

See also