[unchecked revision] | [unchecked revision] |
m (Remove references to sandboxes.) |
m (Add to "Formatting templates" category.) |
||
Line 82: | Line 82: | ||
*[[Module:Unit]] | *[[Module:Unit]] | ||
{{doc/end}} | {{doc/end}} | ||
<includeonly>[[Category:Formatting templates]]</includeonly> |
Revision as of 00:56, 26 February 2022
Add a tooltip to an abbreviation of a unit of measure showing the actual name of the unit.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Unit abbreviation | abbr | Case sensitive abbreviation of a unit of measure. If the abbreviation contains a forward slash "/" it may be replaced with the character "p".
| String | required |
Usage
{{Unit|abbr}}
New units
Recognized units are defined and documented in Module:Unit/data.
Examples
Code | Result |
---|---|
{{Unit|ppm}} |
ppm |
{{Unit|m}} |
m |
{{Unit|m/s}} |
m/s |
{{Unit|mps}} |
m/s |
{{Unit|kg}} |
kg |
{{Unit|degc}} |
°C |
Note that the abbreviation is case sensitive and if the unit contains special symbols they are displayed correctly:
Code | Result |
---|---|
{{Unit|mHz}} |
mHz |
{{Unit|MHz}} |
MHz |
{{Unit|m2}} |
m2 |
{{Unit|kohm}} |
kΩ |
{{Unit|kWh}} |
kW⋅h |
{{Unit|um}} |
μm |
{{Unit|J/(Kmol)}} |
J/(K⋅mol) |
If a unit definition is not found, the abbreviation (or text) is returned unchanged.
Code | Result |
---|---|
{{Unit|things}} |
things |
{{Unit|something/other}} |
something/other |
{{Unit|players per hour}} |
players per hour |
Modules
This template is using the following Modules: