Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Convert/show/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This module can be used to prepare tables of wikitext to display simple documentation for specified units. Data is obtained by calling [[Module:Convert]]. In addition, the module can be used to show {{tl|convert}} usage examples. == Listing links == See [[Module talk:Convert/show]] for a list of unique links for units. The list is shorter and easier to check than the [[Module:Convert/documentation/conversion data/doc|full list of units]]. == Displaying unit information == The module contains a built-in list of commonly used units. The information at [[Help:Convert units#Units]] is the output from: *<code><nowiki>{{#invoke:convert/show|units}}</nowiki></code> When no units are specified, the full built-in list of unit codes is used. In addition, the headings and examples defined in the module are displayed. Units may be specified by entering section names or individual unit codes. No headings or examples are included if units are specified. For example, one or more sections from the full list can be displayed as in the following examples: *<code><nowiki>{{#invoke:convert/show|units|length}}</nowiki></code> *<code><nowiki>{{#invoke:convert/show|units|length|mass|area}}</nowiki></code> Any "input" unit codes can be specified individually, for example, the following line: *<code><nowiki>{{#invoke:convert/show|units|um|cm|ug|kg}}</nowiki></code> gives the result: {{#invoke:convert/show|units|um|cm|ug|kg}} Only units suitable for use as a conversion input can be used. For example, <code>ftin</code> cannot be used as it is an output unit which displays the result in feet and inches. == Displaying usage examples == The module can display examples of {{tlf|convert}} usage in a list or a table. The required parameters must be separated with <code>!</code> (exclamation mark) rather than the normal <code>|</code> (pipe), and a parameter that includes an equals sign must be prefixed with <code>1=</code> (for the first parameter), or <code>2=</code> (for the second), etc. For example, the following line: *<code><nowiki>{{#invoke:convert/show|list|1=123!cm!in!abbr=on|2=125!sqft!m2!abbr=off!sp=us}}</nowiki></code> gives the result: {{#invoke:convert/show|list|1=123!cm!in!abbr=on|2=125!sqft!m2!abbr=off!sp=us}} The same information can be displayed in a table. *<code><nowiki>{{#invoke:convert/show|table|1=123!cm!in!abbr=on|2=125!sqft!m2!abbr=off!sp=us}}</nowiki></code> gives the result: {{#invoke:convert/show|table|1=123!cm!in!abbr=on|2=125!sqft!m2!abbr=off!sp=us}} == Substitution == Results from invoking the module can be [[WP:Substitution|substituted]] into the current page, for example: *<code><nowiki>{{subst:#invoke:convert/show|units|length}}</nowiki></code> *<code><nowiki>{{subst:#invoke:convert/show|table|1=123!cm!in!abbr=on|2=125!sqft!m2!abbr=off!sp=us}}</nowiki></code> Substitution may be useful if editing of the resulting wikitext is required.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Convert
(
edit
)
Template:Tl
(
edit
)
Template:Tlf
(
edit
)
Module:Convert
(
edit
)
Module:Convert/data
(
edit
)
Module:Convert/show
(
edit
)
Module:Convert/text
(
edit
)