Template:Convert/text2/doc

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. …

Template:Convert/text2/doc

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

  • {{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|out2=tall}}    → 10 feet wide and 5 ft high (3.0 × 1.5 m tall)
  • {{convert/text2|10.54321|long by|5|ft|m|across|2}}    → 10.54321 feet long by 5 ft across (3.21 × 1.52 m)

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, and frac=8 to show output fractions to 8ths of a unit. 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

  • {{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+710 × 1+12 m)
  • {{convert/text2|500|long, and|70|ft|m|high}}                  → 500 feet long, and 70 ft high (150 × 21 m)
  • {{convert/text2|500|long, and|70|ft|m|high|disp=out}} → 150 × 21 m

The 9 parameters x0-x9:

  • {{convert/text2|2,500|long by|999|ft|m|wide|out2=across|x0=(x0)|x1=(x1)|x2=(x2)|x3=(x3)|x4=(x4)|x5=(x5)|x6=(x6)|x7=(x7)|x8=(x8)|x9=(x9)}}    → (x0) 2,500 (x1) feet (x2) long by (x3) 999 (x4) ft (x5) wide ((x6) 760 (x7) × (x8) 304 m (x9) across)

See also


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.