User:Wikid77/Template:Convert/text2
10 metres × 20 m {{{6}}} (33* × 66 ft*)
The Template:Convert/text2 allows insertion of free-form text into a conversion of 2 amounts, with the output amounts gathered together at the end of the text. The free-form text among the output amounts can be set by "out=" or "out2=" to specify text after each of the 2 output numbers (the default output text is just "×" between amounts).
Usage
[edit]There are special options with Convert/text2, such as 7th parameter "|2" to round the amount to 2 decimals, and "x0=zz" to "x9=zz" to insert text before/after the input or output unit numbers/names.
2,500 feet long by 999 feet wide (760 × 304 m) | | | | | | | | | | x0 x1 x2 x3 x4 x5 x6 x7 x8 x9
While parameters x0 and x1 insert text before or after the first amount, x2 follows the input unit. Then x3 and x4 insert text before/after the 2nd amount, while x5 follows the 2nd input unit, x6 puts text before the 1st output amount, x7 and x8 surround the "out=" text, and x9 follows the output unit name (before "out2=").
The template allows the same parameters as Template:Convert, and so it allows abbreviation abbr=in or abbr=out or abbr=off, wikilinks lk=in or lk=out, and adjective mode adj=on or adj=mid. The output separator can be reset by: disp=or, disp=comma, disp=x (customized), disp=sqbr (square brackets), disp=b (default as parentheses), or disp=out.
Examples
[edit]- {{convert/text2|10|wide and|5|ft|m|high}} → 10 feet wide and 5 ft high (3.0* × 1.5 m*)
- {{convert/text2|10|wide and|5|ft|m|high |abbr=off}} → 10 feet wide and 5 feet high (3.0* × 1.5 metres*)
- {{convert/text2|10|wide and|5|ft|m|high|out3=tall}} → 10 feet wide and 5 ft high (3.0* × 1.5 m* tall)
- {{convert/text2|9 |wide and|5|ft|m|high|frac=10}} → 9 feet wide and 5 ft high (2+7⁄10 × 1+1⁄2 m)
The 9 parameters x0-x9:
See also
[edit]- Template:Convert/text3 - allows free-form text within a conversion of 3 amounts (of same unit type)