This page you are viewing is part of the SEVA Wiki Archive, Please visit the new Official Website!
NOTICE: Visit the Maillist page for help joining the new google groups email list, the old maillist is no more.
SEVA meetings are held every second Tuesday.


Difference between revisions of "Template:Mpg"

From SeattleEVA
Jump to navigation Jump to search
m
(update to current version at Wikipedia.)
 
Line 1: Line 1:
<includeonly>{{{1}}} mpg ({{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}} L/100 km)</includeonly><noinclude>
+
<includeonly>{{{1}}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:Miles per gallon|mpg]]|=mpg}} ({{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:L/100 km|L/100&nbsp;km]]|=L/100&nbsp;km}})</includeonly><noinclude>
Template to convert fuel mileage form US mpg into Liters per 100km and display both
+
Template to convert fuel mileage form US mpg into Liters per 100km and display both via:
:<nowiki> {{{1}}} mpg {{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}} L/100 km)</nowiki>
+
:<nowiki> {{{1}}}&nbsp;mpg {{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}}&nbsp;L/100&nbsp;km)</nowiki>
 
Useage:
 
Useage:
*<nowiki>{{45|mpg}}</nowiki> results in 45 mpg (5.23 L/100 km)
+
*<nowiki>{{mpg|45}}</nowiki> results in {{mpg|45}}
 +
*<nowiki>{{mpg|45|lk=on}}</nowiki> results in {{mpg|45|lk=on}}
 +
 
 +
Options:
 +
* Make units [[W:Wikipedia:Manual of Style (links)|wikilinked]] by attaching <code><nowiki>|lk=on</nowiki></code>.
 +
*:The [[W:WP:MOS|manual of style]] suggests that you only link the first instance.
 +
 
 
See also:
 
See also:
 
* [[Template:L100km]]
 
* [[Template:L100km]]
 +
* [[W:Template:Convert]]
 
</noinclude>
 
</noinclude>

Latest revision as of 12:34, 9 July 2007

Template to convert fuel mileage form US mpg into Liters per 100km and display both via:

{{{1}}} mpg {{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}} L/100 km)

Useage:

  • {{mpg|45}} results in 45 mpg (5.23 L/100 km)
  • {{mpg|45|lk=on}} results in 45 mpg (5.23 L/100 km)

Options:

See also: