Difference between revisions of "Template:Epi/miokm"

From blackwiki
Jump to navigation Jump to search
imported>Buaidh
({{{p|}}}{{rnd|{{{1}}}/1.609344|{{{d|{{#ifexpr:{{{1}}}<32.17883328|2|{{#ifexpr:{{{1}}}<321.7883328|1|0}}}}}}}}} mi)
imported>Buaidh
({{{p|}}}{{rnd|{{{1}}}/1.609344|{{{d|{{#ifexpr:{{{1}}}<32.179|2|{{#ifexpr:{{{1}}}<321.789|1|0}}}}}}}}} mi)
 
Line 6: Line 6:
 
                   -->{{{s|}}}<!--                 
 
                   -->{{{s|}}}<!--                 
 
                           -->{{#ifexpr:{{{1}}}<0|<span style="color:red">}}<!--
 
                           -->{{#ifexpr:{{{1}}}<0|<span style="color:red">}}<!--
                                   -->{{{p|}}}{{rnd|{{{1}}}/1.609344|{{{d|{{#ifexpr:{{{1}}}<32.17883328|2|{{#ifexpr:{{{1}}}<321.7883328|1|0}}}}}}}}}&nbsp;mi<!--
+
                                   -->{{{p|}}}{{rnd|{{{1}}}/1.609344|{{{d|{{#ifexpr:{{{1}}}<32.179|2|{{#ifexpr:{{{1}}}<321.789|1|0}}}}}}}}}&nbsp;mi<!--
 
                                   -->{{#ifeq:{{{l|2}}}|1|&#32;(|<br/>}}<!--
 
                                   -->{{#ifeq:{{{l|2}}}|1|&#32;(|<br/>}}<!--
 
                                   -->{{{p|}}}{{rnd|{{{1}}}|{{{d|{{#ifexpr:{{{1}}}<19.995|2|{{#ifexpr:{{{1}}}<199.95|1|0}}}}}}}}}&nbsp;km<!--
 
                                   -->{{{p|}}}{{rnd|{{{1}}}|{{{d|{{#ifexpr:{{{1}}}<19.995|2|{{#ifexpr:{{{1}}}<199.95|1|0}}}}}}}}}&nbsp;km<!--

Latest revision as of 18:01, 7 October 2015

50px Template documentation[view] [edit] [history] [purge]

Use

This is a subtemplate of {{Epi}}. It 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:Epi/kmomi for the United States.

The syntax of this template is:

{{epi/miokm|var1|a=|d=|l=|p=|r=|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 precision:
value less than 19.995 = 0.01
value less than 199.95 = 0.1
value at least 199.95 = 1
  • 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)
  • r is an optional integer representing the number of rows to span (default=1)
  • s is an optional style parameter:
    • s= yields regular style (default)
    • s='' yields italic style
    • s=''' yields bold style
    • s=''''' yields bold italic style

See also