Template:U: Difference between revisions

From XionKB
Jump to navigationJump to search
(Created page with "<noinclude>This template renders unit denominators with explanatory hover titles. It takes three (3) relative parameters: # prefix, if any (may be left blank), in abbreviated form # unit abbreviation # suffix, which may either be <code>2</code> for squared or <code>3</code> for cubed For example, <code><nowiki>{{u|k|m|2}}</nowiki></code> will render as <span class="abbr" title="square kilometre">km²</span>. All SI base units, most SI derivative units, all SI prefixes...")
 
m (add litre)
 
(One intermediate revision by the same user not shown)
Line 85: Line 85:
|Sv=sievert
|Sv=sievert
|kat=katal
|kat=katal
|au=astronomical unit
|deg=degree
|°=degree
|'=arcminute
|′=arcminute
|"=arcsecond
|″=arcsecond
|L=litre
|a=are
|t=tonne
|Da=dalton
|eV=electronvolt
|Np=neper
|B=bel
|pc=parsec
|nmi=nautical mile
|kn=knot
|bar=bar
|R=roentgen
|rad=rad
|rem=rem
|cal=calorie
|mmHg=millimetre of mercury
|}}">{{{1}}}{{{2}}}{{#switch:{{{3}}}
|}}">{{{1}}}{{{2}}}{{#switch:{{{3}}}
|2=²
|2=²
|3=³
|3=³
|}}</span><noinclude>[[Category:Inline templates]]</noinclude>
|}}</span><noinclude>[[Category:Inline templates]]</noinclude>

Latest revision as of 08:16, 18 April 2024

This template renders unit denominators with explanatory hover titles. It takes three (3) relative parameters:

  1. prefix, if any (may be left blank), in abbreviated form
  2. unit abbreviation
  3. suffix, which may either be 2 for squared or 3 for cubed

For example, {{u|k|m|2}} will render as km². All SI base units, most SI derivative units, all SI prefixes and all IEC binary prefixes are supported.

{{{1}}}{{{2}}}