Template:Mi2 to Km2: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Drew R. Smith
No edit summary
imported>Drew R. Smith
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{Mi2 to Km2/{{#if:{{{sigfig|}}}|s|{{#if:{{{precision|}}}|p{{#if:{{{max precision|}}}|x}}{{#if:{{{min precision|}}}|n}}|m}}}}{{#if:{{{2|}}}|2}}
<includeonly>{{#if:{{{3|}}}|{{#if:{{{6|}}}|[[{{{6}}}_km²|{{formatnum:{{#if:{{{2|}}}|{{{2}}}|{{#expr:{{{1|}}}*2.589988110336 round {{{4|1}}}}}}}}}]]&nbsp;{{#if:{{{5|}}}|[[Square kilometer|km<sup>2</sup>]]|km<sup>2</sup>}}&nbsp;({{formatnum:{{#if:{{{1|}}}|{{{1}}}|{{#expr:{{{2|}}} / 2.589988110336 round {{{4|1}}}}}}}}}&nbsp;{{#if:{{{5|}}}|[[Square mile|sq&nbsp;mi]]|sq&nbsp;mi}})|{{formatnum:{{#if:{{{2|}}}|{{{2}}}|{{#expr:{{{1|}}}*2.589988110336 round {{{4|1}}}}}}}}}&nbsp;{{#if:{{{5|}}}|[[Square kilometer|km<sup>2</sup>]]|km<sup>2</sup>}}&nbsp;({{formatnum:{{#if:{{{1|}}}|{{{1}}}|{{#expr:{{{2|}}} / 2.589988110336 round {{{4|1}}}}}}}}}&nbsp;{{#if:{{{5|}}}|[[Square mile|sq&nbsp;mi]]|sq&nbsp;mi}})}}|{{formatnum:{{#if:{{{1|}}}|{{{1}}}|{{#expr:{{{2|}}} / 2.589988110336 round {{{4|1}}}}}}}}}&nbsp;{{#if:{{{5|}}}|[[Square mile|sq&nbsp;mi]]|sq&nbsp;mi}}&nbsp;({{#if:{{{6|}}}|[[{{{6}}}_km²|{{formatnum:{{#if:{{{2|}}}|{{{2}}}|{{#expr:{{{1|}}}*2.589988110336 round {{{4|1}}}}}}}}}]]|{{formatnum:{{#if:{{{2|}}}|{{{2}}}|{{#expr:{{{1|}}}*2.589988110336 round {{{4|1}}}}}}}}}}}&nbsp;{{#if:{{{5|}}}|[[Square kilometer|km<sup>2</sup>]]|km<sup>2</sup>}})}}</includeonly><noinclude>
|{{{num|{{{1}}}}}}|{{{num|{{{1}}}}}}/ 2.589988110336
|{{{2}}}|{{{2}}}/ 2.589988110336
|na=square kilomet{{#switch:{{lc:{{{spell}}}}}|commonwealth|com|c|bre|uk=re|er}}
|ab={{lc:{{{abbr|mos}}}}}
|wi={{lc:{{{wiki|no}}}}}
|xn={{#if:{{{max precision|}}}|x}}{{#if:{{{min precision|}}}|n}}
|px={{{max precision|}}}
|pn={{{min precision|}}}
|pr={{{precision}}}
|sf={{{sigfig}}}
}}</includeonly><noinclude>
{{TlDoc}}
{{TlDoc}}
[[Category:Conversion templates|{{PAGENAME}}]]
[[Category:Conversion templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 00:23, 15 June 2009


This documentation is transcluded from Template:Mi2 to Km2/doc (edit | history)


Usage

Usage: {{Mi2 to Km2|mi2|km2|switch|round|link|magn}}

Ordinarily produces: km2 km2 (mi2 sq mi)

If one of mi2 and km2 is omitted, it will be calculated by conversion of the other (which must be numerical or an error will be displayed).

Example:{{Mi2 to Km2|250}}
  • Produces:250 sq mi (647.5 km2)


Setting switch to any non-empty value causes the metric value to be displayed first.

Example:{{Mi2 to Km2|250||switch}}
  • Produces:647.5 km2 (250 sq mi)

Set round to define the degree of rounding (e.g. 1 for one decimal place). Note:For the "link" and "mag" parameters to work, round must have a value.

Example:{{Mi2 to Km2|250|||3}}
  • Produces:250 sq mi (647.497 km2)

Setting link to any non-empty value causes the units to be wikilinked to Square mile and Square kilometre.

Example:{{Mi2 to Km2|250|||1|1}}

Setting mag changes the wikilink behind km2 (for example, set it to 1 foo to link to 1 foo km²).

Example:{{Mi2 to Km2|250|||1|1|f00}}