[unchecked revision] | [unchecked revision] |
m (Demian moved page Template:Template Sandbox/Demian/Unit/doc to Template:Unit/doc: Move template out of sandbox: ready for use.) |
m (Remove references to sandboxes.) |
||
Line 20: | Line 20: | ||
== Usage == | == Usage == | ||
{{tlx| | {{tlx|Unit|''abbr''}} | ||
== New units == | == New units == | ||
Recognized units are defined and documented in [[Module: | Recognized units are defined and documented in [[Module:Unit/data]]. | ||
== Examples == | == Examples == | ||
Line 32: | Line 31: | ||
! Code !! Result | ! Code !! Result | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|ppm}} || {{Unit|ppm}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|m}} || {{Unit|m}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|m/s}} || {{Unit|m/s}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|mps}} || {{Unit|mps}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|kg}} || {{Unit|kg}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|degc}} || {{Unit|degc}} | ||
|} | |} | ||
Line 51: | Line 50: | ||
! Code !! Result | ! Code !! Result | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|mHz}} || {{Unit|mHz}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|MHz}} || {{Unit|MHz}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|m2}} || {{Unit|m2}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|kohm}} || {{Unit|kohm}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|kWh}} || {{Unit|kWh}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|um}} || {{Unit|um}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|J/(Kmol)}} || {{Unit|J/(Kmol)}} | ||
|} | |} | ||
Line 72: | Line 71: | ||
! Code !! Result | ! Code !! Result | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|things}} || {{Unit|things}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|something/other}} || {{Unit|something/other}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|Unit|players per hour}} || {{Unit|players per hour}} | ||
|} | |} | ||
== Modules == | == Modules == | ||
This template is using the following Modules: | This template is using the following Modules: | ||
*[[Module: | *[[Module:Unit]] | ||
{{doc/end}} | {{doc/end}} |
Revision as of 00:36, 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: