Template:Unit: Difference between revisions
From Eco - English Wiki
[unchecked revision] | [unchecked revision] |
mNo edit summary |
(Improve documentation.) |
||
Line 1: | Line 1: | ||
<includeonly>{{#invoke:Sandbox/Demian/Unit|unit}}</includeonly><noinclude> | <includeonly>{{#invoke:Sandbox/Demian/Unit|unit}}</includeonly><noinclude> | ||
== | == Usage == | ||
{{Template Sandbox/Demian/Unit}} | {{tlx|Template Sandbox/Demian/Unit|''abbr''}} | ||
== Examples == | |||
{| class="wikitable" | |||
|+ Commonly used units. | |||
|- | |||
! Code !! Result | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|ppm}} || {{Template Sandbox/Demian/Unit|ppm}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|m}} || {{Template Sandbox/Demian/Unit|m}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|m/s}} || {{Template Sandbox/Demian/Unit|m/s}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|mps}} || {{Template Sandbox/Demian/Unit|mps}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|kg}} || {{Template Sandbox/Demian/Unit|kg}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|degc}} || {{Template Sandbox/Demian/Unit|degc}} | |||
|} | |||
Note that the abbreviation is case sensitive and special symbols are formatted correctly: | |||
{| class="wikitable" | |||
|+ Various units. | |||
|- | |||
! Code !! Result | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|m2}} || {{Template Sandbox/Demian/Unit|mHz}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|m2}} || {{Template Sandbox/Demian/Unit|MHz}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|m2}} || {{Template Sandbox/Demian/Unit|m2}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|kohm}} || {{Template Sandbox/Demian/Unit|kohm}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|kWh}} || {{Template Sandbox/Demian/Unit|kWh}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|um}} || {{Template Sandbox/Demian/Unit|um}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|J/(Kmol)}} || {{Template Sandbox/Demian/Unit|J/(Kmol)}} | |||
|} | |||
== Modules == | |||
This template is using the following Modules: | This template is using the following Modules: | ||
*[[Module:Sandbox/Demian/Unit]] | *[[Module:Sandbox/Demian/Unit]] | ||
== | == Documentation == | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": {}, | "params": { | ||
"description": " | "abbr": { | ||
"format": "inline" | "label": "Unit abbreviation", | ||
"description": "Case sensitive abbreviation of a unit of measure. If the abbreviation contains a forward slash \"/\" it may be replaced with the character \"p\".", | |||
"example": "m/s, mps, GHz, ppm, kg, m2, kWh", | |||
"type": "string", | |||
"required": true | |||
} | |||
}, | |||
"description": "Adds a tooltip to an abbreviation of a unit of measure showing the actual name of the unit.", | |||
"format": "inline", | |||
"paramOrder": [ | |||
"abbr" | |||
] | |||
} | } | ||
</templatedata></noinclude> | </templatedata></noinclude> |
Revision as of 00:43, 25 February 2022
Usage
{{Template Sandbox/Demian/Unit|abbr}}
Examples
Note that the abbreviation is case sensitive and special symbols are formatted correctly:
Modules
This template is using the following Modules:
Documentation
Adds 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 |