User:Wikid77/Template:Convert/mix2/doc

The mixed converter Template:Convert/mix2 will convert 2 amounts of different units at once, allowing any range words/text between the 2 amounts. However, both amounts can use different units, or the same unit type. The output unit must be specified, or put "0" for the default output unit.


 * Usage:   {&#123;convert/mix2 |5|in|cm|by|3|ft|m}}
 * {&#123;convert/mix2 |9|ft|m|high, weighing|56|kg}}
 * {&#123;convert/mix2 |750|m|ft|up to|3|km|mi}}
 * {&#123;convert/mix2 |11|in|cm|m|x|1.6|ft|m|abbr=on}}

The template has the same parameters as Template:Convert, and so it allows abbreviation abbr=in or abbr=out or abbr=none, wikilinks lk=on, lk=in or lk=out, and adjective mode adj=on. The separator can also be a semicolon: disp=semi, disp=or, disp=comma, disp=x & disp=b (default parentheses). Using optional parameter "warn=yes" will warn when the separator is an unusual word (other than: to, by, and, or, -, +/-, x, xx or comma).

The following examples show various separator text, with p=2 to round the precision to 2 decimal places:
 * Examples
 * {&#123;convert/mix2 |5|in|cm|by|3|ft|m}}    &rarr;
 * {&#123;convert/mix2 |5|in|cm|x|1.4|ft|m|p=2}}    &rarr;


 * {&#123;convert/mix2 |9|ft|m|high, weighing|56|kg}} &rarr;
 * {&#123;convert/mix2 |750|m|ft|up to|3|km|mi}}    &rarr;


 * {&#123;convert/mix2 |5+1/2|in|m|by|1+2/3|ft|m}}    &rarr;

Any text can separate the amounts, but the typical range-words are: to, by, and, or, -, +/-, x, xx & comma. Display types: disp=comma, disp=semi, disp=or, disp=s, disp=2 (or disp=out), disp=# (or disp=number), disp=x and disp=b. The results are identical to using Template:Convert for each amount individually, and then mixing the inputs and outputs.

Because there are 2 sets of unit-codes (for 2 inputs and 2 outputs), care must be taken to place all 7 parameters in the proper order. Note that the name of the template is "Convert/mix2" and omitting the "/mix2" will produce incorrect results. Some issues to note:
 * Common problems
 * Check the placement of all 7 parameters for both sets of unit-codes.
 * Remember the name as "convert/mix2".
 * To skip an output unit, put "0" to get the default output.
 * When using disp=x, the custom text is in parameters 8 and 9.


 * See also
 * Template:Convert/2 - to convert 2 amounts of the same unit
 * Template:Convert/3 - to convert 3 amounts of the same unit
 * Template:Convert/4 - to convert 4 amounts of the same unit