ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Template:Unit display/doc - Wikipedia, the free encyclopedia

Template:Unit display/doc

From Wikipedia, the free encyclopedia

Usage

This template is one of the unit display category of templates. These are templates which print figures with their units and converts them to either English or metric system too. The second value is in brackets. Both parameters should be unformated numbers, the first one is the actual value, the second one is the number of decimal digits for the calculated value. The numbers are then nicely formated.

If you append "| lk=on" to the template the units will be wikilinked, otherwise they will not be. The manual of style suggests that you only link the first instance.

The Manual of Style Units Section specifies that you should spell out the primary unit in text therefore you should use the full version (where available) e.g. {{Unit foot}}, in sentences and the abbreviated version e.g. {{Unit ft}} in tables, info boxes, etc.

If the grammar of a sentence requires that the singular version of a spelled out unit is required append "| sing=on" to the template.

Examples:

  • {{Unit km | 1487.27 }} renders as: 1,487.27 km (924.146733079 mi)
  • {{Unit mi | 1487.27 | 2}} renders as: 1,487.27 mi (2,393.53 km)
  • {{Unit sqkm | 1487.27 | 2 | lk=on }} renders as: 1,487.27 kmĀ² (574.24 sq mi)
  • {{Unit foot | 1487.27 | 2 }} renders as: 1,487.27 feet (453.32 m)
  • {{Unit foot | 1487.27 | 2 | sing=on }} renders as: 1,487.27 foot (453.32 m)
  • {{Unit metre | 1487.27 | 2 | lk=on }} renders as: 1,487.27 metres (4,879.49 ft)
  • {{Unit metre | 1487.27 | 2 | lk=on | sing=on }} renders as: 1,487.27 metre (4,879.49 ft)

It is important to note that negative values are OK for the rounding parameter, which is very useful for converting approximate values:

  • {{Unit ft | 14000 | 0}} renders as: 14,000 ft (4,267 m)
  • {{Unit ft | 14000 | -1}} renders as: 14,000 ft (4,270 m)
  • {{Unit ft | 14000 | -2}} renders as: 14,000 ft (4,300 m)

[edit] See also


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -