User:Ephdot/MPGeV2
Appearance
This Template formats mpg into MPGeUS and L/100 km
- units: mpgus, mpgimp, l/100 km, mi/BTU, mi/kwh, kWh/100 km, MJ/km, etc. and
- fuel (or source): gasoline, petrol, diesel, jetK, heat, electric, etc.
- Gas/100 km=litres Diesel per hundred kilometres
- Diesel/100 km=litres Diesel per hundred kilometres
- JetK/100 km=litres Jet fuel per hundred kilometres
- kWh/100 km=kWh per hundred kilometres
- BTU/100 km=BTU per hundred kilometres
- mi/USGas=miles per US gallon of Gasoline
- mpgus=miles per US gallon of Gasoline
- mi/USDiesel=miles per US gallon of Diesel
- mi/USJetK=miles per US gallon of Jet Fuel (Kerosene)
- mi/BTU=miles per BTU
- mi/kWh=miles per kWh
- mi/ImpGas=miles per Imp gallon of Diesel
- mi/ImpDiesel=miles per Imp gallon of Diesel
- mi/ImpJetK=miles per Imp gallon of Jet Fuel (Kerosene)
Usage:
- {{MPGe|10|mpgus|lk=on}}:
10 L /100 km (10 MPGe US)
- {{MPGe|10|mpgus}}:
10 L /100 km (10 MPGe US)
- {{MPGe|50|mpgus|3}}:
50 L /100 km (50 MPGe US)
- {{MPGe|10|mpgus|p=on}}:
10 L /100 p·km (10 p·MPGe US)
Options:
- The second parameter is decimal precision (default 1 decimal)
- p=on adds p· for passenger miles
- Make units wikilinked by attaching
|lk=on
.- The manual of style suggests that you only link the first instance.