ಟೆಂಪ್ಲೇಟು:Convert/text3/doc
This is a documentation subpage for ಟೆಂಪ್ಲೇಟು:Convert/text3 It may contain usage information, categories and other content that is not part of the original ಟೆಂಪ್ಲೇಟು page. |
The converter Template:Convert/text3 will convert 3 amounts at once, allowing any free-form text between and after the amounts. However, both amounts are treated as the same unit type. The free-form text is placed in parameters 2, 4 and 8, with options "out=" or "out2=" and "out3=" to alter the output text.
- Usage: {{convert/text3 |7|long by|5|wide by|6|m|ft|high}}
- {{convert/text3 |7|long by|5|wide,|6|m|ft|high|out=by}}
- {{convert/text3 |3|wide by|6|long at base by|4|m|ft|tall|out2=ft by|out3=tall}}
The template begins with the same parameters as Template:Convert/3 for ranges, but the text is not repeated with the output amounts, and instead parameters "out=" and "out2=" allow totally different text between the 3 results. The output unit must be specified, or put "0" for the default output unit. Example:
- {{convert/text3 |7|long by|5|wide by|6|m|ft|high}} → ೭ metres long by ೫ m wide by ೬ m high (23 × 16 × 20 ft)
Use options x0=xx, to x14=xx, to insert extra text before/after the amounts or unit names. Note the placement of the x-parameters:
500 metres long by 60 metres wide by 30 metres high (1,600 x 196 x 98 ft) | | | | | | | | | | | | | | | 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 1, x3 and x4 insert text before/after the 2nd amount (such as "~"), x5 follows the 2nd input unit, x6 and x7 insert text before/after the 3rd amount, and x8 follows the 3rd input unit. Then x9 puts text before the 1st output amount ("~"), x10 follows the 1st output amount, while x11 and x12 precede/follow the 2nd output amount, x13 precedes the 3rd output amount, and finally x14 follows the output unit, before the closing ")".
Convert/text3 allows typical options for abbreviation abbr=in or abbr=out or abbr=off, 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).
Examples
ಬದಲಾಯಿಸಿThe following examples show the diversity of the text parameters, with p=3 to round the precision to 3 decimal places:
- {{convert/text3 |7|long by|4|wide by|3|m|ft|high}} → ೭ metres long by ೪ m wide by ೩ m high (23 × 13 × 9.8 ft)
- {{convert/text3 |6|across by|2|deep at the base and|4|m|ft|high at the top}}
→ ೬ metres across by ೨ m deep at the base and ೪ m high at the top (20 × 6.6 × 13 ft) - {{convert/text3 |6|across by|2|deep at the base and|4|m|ft|high at the top|out=across,|out2=ft deep,|out3=high}}
→ ೬ metres across by ೨ m deep at the base and ೪ m high at the top (20 across, 6.6 ft deep, 13 ft high)
- {{convert/text3 |77|by|88|by|99|ft|m|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 ೭೭ x1 feet x2 by x3 ೮೮ x4 ft x5 by x6 ೯೯ x7 ft x8 high (x9 23 x10 × x11 27 x12 × x13 30 m x14)
- |x6=x6|x7=x7|x8=x8|x9=x9|x10=x10|x11=x11|x12=x12|x13=x13|x14=x14}}
Although parameters 2 and 4 are intended as free-form text, they can have the common range-words: 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.
Common problems
ಬದಲಾಯಿಸಿThe name of the template is {convert/text3|...} and using "{convert}" will treat the free-form text as another template name. Double-check to ensure the name as "{convert/text3}" to avoid confusion in the results. In many cases, the 3rd free-form text, in parameter 8, needs to be repeated in the output, such as height indicated by "out3=high" shown after the output unit. When the output text should completely echo the input text, then consider using {convert/3} instead.
Template {convert/text3} is intended to reduce the monotony when using several conversions, to avoid the repetitious pattern: "amount (converted), amount (converted), amount (converted), etc. Care should be taken to ensure the free-form wording seems sensible, which can improve with more practice when formatting several conversions.
See also
ಬದಲಾಯಿಸಿ- Template:Convert/text2 - for converting 2 amounts with free-form text
- Template:Convert/2 - for converting 2 amounts of the same unit
- Template:Convert/3 - for converting 3 amounts of the same unit
- Template:Convert/4 - for converting 4 amounts of the same unit
- Template:Convert/flip2 - converting & flipping 2 amounts
- Template:Convert/flip3 - converting & flipping 3 amounts
- Template:Convert/flip4 - converting & flipping 4 amounts
- Template:Convert/spell - to convert and spell amounts as words