Jump to content

User:Wikid77/Template:Convert/text3/doc

From Wikipedia, the free encyclopedia

The Template:Convert/text3 allows insertion of free-form text into a conversion of 3 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=" or "out3=" to specify text after each of the 3 output numbers (the default output text is just "×" between amounts).

Usage[edit]

  • {{convert/text3|20|long, |10|wide, and|5|ft|m|high}}                   → 20 feet long, 10 ft wide, and 5 ft high (6.1 × 3.0 × 1.5 m)
  • {{convert/text3|20|long, |10|wide, and|5|ft|m|high|2}}              → 20 feet long, 10 ft wide, and 5 ft high (6.10 × 3.05 × 1.52 m)
  • {{convert/text3|20|long, |10|wide, and|5|ft|m|high|out3=tall}}   → 20 feet long, 10 ft wide, and 5 ft high (6.1 × 3.0 × 1.5 m tall)
  • {{convert/text3|20|long, |10|wide, and|5|ft|m|high|x9=metric}}   → 20 feet long, 10 ft wide, and 5 ft high (metric 6.1 × 3.0 × 1.5 m)
  • {{convert/text3|20|long, |10|wide, and|5|ft|m|high|abbr=in}}   → 20 ft long, 10 ft wide, and 5 ft high (6.1 × 3.0 × 1.5 metres)

There are special options with Convert/text3, such as 9th parameter "|2" to round the output amounts to 2 decimals, and "x0=zz" to "x14=zz" to insert custom text at 15 spots before/after the input or output unit numbers/names.

   2,500 feet long by 999 feet wide by 50 feet high (760  × 304  × 50 m high)
   |    |    |       |   |    |       |  |    |      |  |  |    | |    |
   x0   x1   x2      x3  x4   x5     x6  x7  x8    x9 x10 x11 x12 x13  x14

While parameters x0 and x1 insert text before or after the first amount, x2 follows the input unit. Next x3 and x4 insert text before/after the 2nd amount, while x5 follows the 2nd input unit. Then x6 and x7 insert text before/after the 3rd amount, while x8 follows the 3rd input unit. Finally x9 puts text before the 1st output amount, x10 and x11 surround the "out=" text, x12/x13 surround the "out2=" text, and x14 follows the output unit name (before "out3=").

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/text3|20|long, |10|wide, and|5|ft|m|high}}                 → 20 feet long, 10 ft wide, and 5 ft high (6.1 × 3.0 × 1.5 m)
  • {{convert/text3|20|long, |10|wide, and|5|ft|m|high|out3=tall}} → 20 feet long, 10 ft wide, and 5 ft high (6.1 × 3.0 × 1.5 m tall)
  • {{convert/text3|20|long, |9 |wide, and|5|ft|m|high|frac=10}}    → 20 feet long, 9 ft wide, and 5 ft high (6+110 × 2+710 × 1+12 m)
  • {{convert/text3|360|wide, |500|long, and|70|ft|m|high}} → 360 feet wide, 500 ft long, and 70 ft high (110 × 150 × 21 m)

The 15 text parameters x0-x14:

  • {{convert/text3|2,500|long by|999|wide by|50|ft|m|up|out3=high|x0=(x0)|x1=(x1)|x2=(x2)|x3=(x3)|x4=(x4)|x5=(x5)|x6=(x6)|x7=(x7)|x8=(x8)|x9=(x9)|x10=(x10)|x11=(x11)|x12=(x12)|x13=(x13)|x14=(x14)}}    → (x0) 2,500 (x1) feet (x2) long by (x3) 999 (x4) ft (x5) wide by (x6) 50 (x7) ft (x8) up ((x9) 760 (x10) × (x11) 304 (x12) × (x13) 15 m (x14) high)

See also[edit]

3, {{SUBPAGENAME}