Template:Height
Instructions
- The template is intended for conversion of heights specified in either meters, or in feet and inches. Meters are converted to feet and inches, and feet and inches are converted to meters.
- For conversion of meters to feet/inches, the frac parameter can be specified to either show the output inches as decimals (frac=10) or as a vulgar fraction (frac=desired denominator; the default is 2 for halves). The frac parameter is ignored for conversion of feet/inches to meters.
- When decimal output is used, the default precision is 1 for meters-to-feet/inches conversion and 2 for feet/inches-to-meters conversion, but it can be overridden by specifying a different figure using the precision parameter (see example below). The precision parameter is ignored when frac is set to anything but 10.
Code
Code | Result |
---|---|
{{height|m=1.72}} | 1.72 m (5 ft 7 | 1⁄2 in)
{{height|m=1.72|precision=0}} | 1.72 m (5 ft 8 in) |
{{height|m=1.72|frac=16}} | 1.72 m (5 ft 7 | 11⁄16 in)
{{height|ft=6}} | 6 ft 0 in (1.83 m) |
{{height|ft=6|in=1}} | 6 ft 1 in (1.85 m) |
{{height|ft=6|in=1|precision=1}} | 6 ft 1 in (1.9 m) |
{{height|in=10}} | 0 ft 10 in (0.25 m) |
{{height|m=6|ft=2}} | Error: please specify only imperial or only metric units |
- m is for meters
- ft is for feet
- in is for inches
The above documentation is transcluded from Template:Height/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |