Difference between revisions of "Template:Mikm"

From MidsouthMakers - Memphis Area Hackerpace
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
{{!}}{{sort|A{{#expr:{{{1}}}+10000}}|{{{1}}}{{{3|}}}}}
 
{{!}}{{sort|A{{#expr:{{{1}}}+10000}}|{{{1}}}{{{3|}}}}}
 
{{!}}{{sort|A{{rnd|{{#expr:{{{1}}}*1.609344+10000}}|{{{2|0}}}}}}|{{rnd|{{#expr:{{{1}}}*1.609344}}|{{{2|0}}}}}}}
 
{{!}}{{sort|A{{rnd|{{#expr:{{{1}}}*1.609344+10000}}|{{{2|0}}}}}}|{{rnd|{{#expr:{{{1}}}*1.609344}}|{{{2|0}}}}}}}
}}</includeonly><noinclude>
+
}}</includeonly><noinclude>{{doc}}</noinclude>
 
 
This template is used for creating entries in a sortable table which includes both miles and kilometer lengths, by automatically converting any mile lengths into kilometers.
 
 
 
==Usage==
 
:<nowiki>{{Mikm</nowiki>|''miles''<nowiki>}}</nowiki>
 
:<nowiki>{{Mikm</nowiki>|''miles''|''round''<nowiki>}}</nowiki>
 
:<nowiki>{{Mikm</nowiki>|''miles''|''round''|''note''<nowiki>}}</nowiki>
 
 
 
==Options==
 
:''miles'' is the length in miles
 
:''round'' is the precision for rounding; the default is 0.
 
:''note'' is any footnotes to append to the mile measurement.
 
 
 
==Examples==
 
The following table
 
{| class="wikitable sortable"
 
! Miles !! Kilometers
 
|-
 
{{Mikm|250.1}}
 
|-
 
{{Mikm|365.2|1}}
 
|-
 
{{Mikm|2.17828|3|&nbsp;''(approx.)''}}
 
|}
 
was produced using the following code
 
<pre style="overflow:auto">{| class="wikitable sortable"
 
! Miles !! Kilometers
 
{{Mikm|250.1}}
 
|-
 
{{Mikm|365.2|1}}
 
|-
 
{{Mikm|2.17828|3|&nbsp;''(approx.)''}}
 
|}</pre>
 
 
 
== See also ==
 
 
 
*{{tl|Convert}}
 
 
 
[[Category:Conversion templates|{{PAGENAME}}]]
 
</noinclude>
 

Latest revision as of 13:48, 1 September 2010

[edit] [purge] Template documentation

This template is used for creating entries in a sortable table which includes both miles and kilometer lengths, by automatically converting any mile lengths into kilometers.

Usage

{{Mikm|miles}}
{{Mikm|miles|round}}
{{Mikm|miles|round|note}}

Options

miles is the length in miles
round is the precision for rounding; the default is 0.
note is any footnotes to append to the mile measurement.

Examples

The following table

Miles Kilometers
250.1 402
365.2 587.7
2.17828 (approx.) 3.506

was produced using the following code

{| class="wikitable sortable"
! Miles !! Kilometers
{{Mikm|250.1}}
|-
{{Mikm|365.2|1}}
|-
{{Mikm|2.17828|3| ''(approx.)''}}
|}

See also