User:Ephdot/MPGeV2

From Wikipedia, the free encyclopedia



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:

  • Expression error: Unrecognised word "mpgus" L/100 km (Expression error: Unrecognised word "mpgus" MPGeUS):

10 L /100 km (10 MPGe US)



  • Expression error: Unrecognised word "mpgus" L/100 km (Expression error: Unrecognised word "mpgus" MPGeUS):

10 L /100 km (10 MPGe US)



  • Expression error: Unrecognised word "mpgus" L/100 km (Expression error: Unrecognised word "mpgus" MPGeUS):

50 L /100 km (50 MPGe US)



  • Expression error: Unrecognised word "mpgus" L/100 p·km (Expression error: Unrecognised word "mpgus" p·MPGeUS):

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.