User:Wikid77/Template:Convert/per/doc

The Template:Convert/per is a variation of Template:Convert to handle per-unit conversions, such as counted items per metre.

Usage
The 1st parameter is the amount, but 2nd is the count-unit, followed by 3rd parameter as the base per-unit.
 * {&#123;convert/per |45|people|sqmi|km2}} &rarr;

The output count-unit defaults to the same (parameter 2), else use "out=" to reword the count-unit, such as singular/plural or abbreviated. Examples:
 * {&#123;convert/per |1|dog|sqmi|km2|out=dogs}} &rarr;
 * {&#123;convert/per |1|person|sqmi|km2|out=ppl}} &rarr;

In most cases, the count-unit will use the same word for both input and output, as defaulted.
 * {convert/per |3|warlocks|sqft|m2}}    &rarr;
 * {convert/per |3|warlocks|sqft|m2|lk=in}} &rarr;

Examples
Many options are allowed:
 * {&#123;convert/per |27|deer|sqmi|km2|abbr=~}} &rarr;
 * {&#123;convert/per |6|added|kg|lb|lk=out}} &rarr;
 * ${&#123;convert/per |8||lb|kg|disp=x| [$|]}} &rarr; $