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.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 505: Line 505:


===Scientific notation: ''1.23 × 10<sup>−14</sup>''===
===Scientific notation: ''1.23 × 10<sup>−14</sup>''===
In [[w:scientific notation|scientific notation]], a number is written like 1.23e-14. The plain number has exactly one digit before the decimal point.
In [[scientific notation]], a number is written like {{val|1.23e-14}}. The plain number has exactly one digit before the decimal point.


With {{tlf|convert}}, the input can be in e-notation such as <code>12.3e4</code>. This value is displayed as a power of ten, and the output is displayed in scientific notation, except that an output value satisfying 0.01 <= v < 1000 is shown as a normal number. In addition, if the output value is 1000 and sigfig=4 is used, the value is displayed as a normal number.
With {{tlf|convert}}, the input can be in e-notation such as <code>12.3e4</code>. This value is displayed as a power of ten, and the output is displayed in scientific notation, except that an output value satisfying 0.01 <= v < 1000 is shown as a normal number. In addition, if the output value is 1000 and sigfig=4 is used, the value is displayed as a normal number.
Line 516: Line 516:
*<code><nowiki>{{convert|1⁄2|in|mm|1}}</nowiki></code> → {{convert|1⁄2|in|mm|1}}
*<code><nowiki>{{convert|1⁄2|in|mm|1}}</nowiki></code> → {{convert|1⁄2|in|mm|1}}


With positive [[w:mixed number|mixed number]]s (a positive integer and a fraction), use a <code>+</code> sign
With positive [[mixed number]]s (a positive integer and a fraction), use a <code>+</code> sign
*<code><nowiki>{{convert|2+1⁄2|in|mm|1}}</nowiki></code> → {{convert|2+1⁄2|in|mm|1}}
*<code><nowiki>{{convert|2+1⁄2|in|mm|1}}</nowiki></code> → {{convert|2+1⁄2|in|mm|1}}


Line 527: Line 527:
*<code><nowiki>{{convert|2+½|in|mm|1}}</nowiki></code> → {{convert|2+½|in|mm|1}} {{nay}} Fractions consisting of a single Unicode character are not allowed either.
*<code><nowiki>{{convert|2+½|in|mm|1}}</nowiki></code> → {{convert|2+½|in|mm|1}} {{nay}} Fractions consisting of a single Unicode character are not allowed either.


===Horizontal fraction bar: ''{{frac|1|2}}&nbsp;inch''===
===Horizontal fraction bar: ''{{sfrac|1|2}}&nbsp;inch''===
<!-- technical restriction: TOC does not show the example horizontal bar intended here; rephrased section title-->
<!-- technical restriction: TOC does not show the example horizontal bar intended here; rephrased section title-->
Using a double slash (<code>//</code>) provides a horizontal fraction bar for the original (input) unit:
Using a double slash (<code>//</code>) provides a horizontal fraction bar for the original (input) unit:
Line 668: Line 668:


==Table options==
==Table options==
For the [[w:Help:Table/Manual tables|wikitable]] structure, there are three options: add a line-break, split the result over columns and make the table sortable.
For the [[Help:Table/Manual tables|wikitable]] structure, there are three options: add a line-break, split the result over columns and make the table sortable.


===Enforced line break===
===Enforced line break===
Line 716: Line 716:


===Sorting===
===Sorting===
Use {{para|sortable|on}} to include a ''hidden numerical sortkey'' in the output, suitable for use in a [[w:Help:Sorting|table with sortable columns]]. Technically, this places a hidden string before the actual displayed values:
Use {{para|sortable|on}} to include a ''hidden numerical sortkey'' in the output, suitable for use in a [[Help:Sorting|table with sortable columns]]. Technically, this places a hidden string before the actual displayed values:
:<code><nowiki>{{convert|10|m|ft|sortable=on}}</nowiki></code> {{nowrap|1=→ <code>&lt;span data-sort-value="7001100000000000000♠">&lt;/span>10 metres (33&nbsp;ft)</code>}}
:<code><nowiki>{{convert|10|m|ft|sortable=on}}</nowiki></code> {{nowrap|1=→ <code>&lt;span data-sort-value="7001100000000000000♠">&lt;/span>10 metres (33&nbsp;ft)</code>}}
:showing: {{convert|10|m|ft|sortable=on}}.
:showing: {{convert|10|m|ft|sortable=on}}.
Line 729: Line 729:
|-
|-
| A
| A
| <span class="nowrap"><span data-sort-value="7001157500000000000♠"></span>15.75&nbsp;m</span>
| {{val|15.75|u=m}}
| {{convert|15+3/4|m|ft|disp=table|sortable=on}}
| {{convert|15+3/4|m|ft|disp=table|sortable=on}}
|-
|-
| B
| B
| <span class="nowrap"><span data-sort-value="7001155000000000000♠"></span>15.5&nbsp;m</span>
| {{val|15.5|u=m}}
| {{convert|15.5|m|ft|disp=table|sortable=on}}
| {{convert|15.5|m|ft|disp=table|sortable=on}}
|-
|-
| C
| C
| <span class="nowrap"><span data-sort-value="7001160000000000000♠"></span>16&nbsp;m</span>
| {{val|16|u=m}}
| {{convert|16.0|m|ft|disp=table|sortable=on}}
| {{convert|16.0|m|ft|disp=table|sortable=on}}
|-
|-
| D
| D
| <span class="nowrap"><span data-sort-value="7001160000000000000♠"></span>16&nbsp;m</span>
| {{val|16|u=m}}
| {{convert|16|m|ft|disp=table|sortable=on}}
| {{convert|16|m|ft|disp=table|sortable=on}}
|}
|}
Line 748: Line 748:


==Units==
==Units==
The conversion factors and physical constants are sourced [[w:Module:Convert/documentation/conversion data introduction/doc#Conversion factors and physical constants|here]].
The conversion factors and physical constants are sourced [[Module:Convert/documentation/conversion data introduction/doc#Conversion factors and physical constants|here]].


===All units===
===All units===
See [[w:Template:Convert/list of units]]. Units are case-sensitive: use <code>kW</code>, not <code>KW</code> or <code>kw</code>
{{selfref|See also: [[Template:Convert/list of units]]}}
{{hatnote|Units are case-sensitive: use {{xt|kW}}, not {{!xt|KW}} or {{!xt|kw}}}}
{{Convert/list of units}}


==='per' units: ''kg/ha'', ''miles per gallon''<span class="anchor" id="per"></span>===
==='per' units: ''kg/ha'', ''miles per gallon''<span class="anchor" id="per"></span>===
Line 781: Line 783:
===Multiple units: ''1 ft 5 in''===
===Multiple units: ''1 ft 5 in''===
====In input====
====In input====
Base document [[w:Module:Convert/documentation/conversion data/doc#Input multiples]] lists options for ''multiple unit input'' (like <code>ft,in</code>). It can catch predefined sets only (units that can be subdivided; e.g., yd into ft):
Base document {{section link|Module:Convert/documentation/conversion data/doc|Input multiples|nopage=y}} lists options for ''multiple unit input'' (like <code>ft,in</code>). It can catch predefined sets only (units that can be subdivided; e.g., yd into ft):
* <code><nowiki>{{convert|1|yd|2|ft|3|in}}</nowiki></code> → {{convert|1|yd|2|ft|3|in}}
* <code><nowiki>{{convert|1|yd|2|ft|3|in}}</nowiki></code> → {{convert|1|yd|2|ft|3|in}}
* <code><nowiki>{{convert|2|ft|3|in|cm}}</nowiki></code> → {{convert|2|ft|3|in|cm}}
* <code><nowiki>{{convert|2|ft|3|in|cm}}</nowiki></code> → {{convert|2|ft|3|in|cm}}
Line 787: Line 789:


====In output====
====In output====
Available multiple-unit output options predefined, like <code>ftin</code> and <code>ydftin</code>. The full list is at [[w:Module:Convert/documentation/conversion data/doc#Output multiples]].
Available multiple-unit output options predefined, like <code>ftin</code> and <code>ydftin</code>. The full list is at {{section link|Module:Convert/documentation/conversion data/doc|Output multiples|nopage=y}}.
* <code><nowiki>{{convert|2|m|ftin}}</nowiki></code> → {{convert|2|m|ftin}}
* <code><nowiki>{{convert|2|m|ftin}}</nowiki></code> → {{convert|2|m|ftin}}
* <code><nowiki>{{convert|2|m|ft in}}</nowiki></code> → {{convert|2|m|ft in}}, using a space, returns the decimal point
* <code><nowiki>{{convert|2|m|ft in}}</nowiki></code> → {{convert|2|m|ft in}}, using a space, returns the decimal point
Line 793: Line 795:
* <code><nowiki>{{convert|2|m}}</nowiki></code> → {{convert|2|m}}
* <code><nowiki>{{convert|2|m}}</nowiki></code> → {{convert|2|m}}


See also:
* {{tl|hands}} a length used to measure horses
* {{tl|Long ton}} a weight in ton, cwt, qr and lb
<!-- todo: mention the 0-3 limits -->


===Currency per unit: ''$/mi &rarr; $/km''===
===Currency per unit: ''$/mi &rarr; $/km''===
Line 804: Line 810:
* <code><nowiki>{{convert|10|$/mi|$/km|$=€}}</nowiki></code> → {{convert|10|$/mi|$/km|$=€}}
* <code><nowiki>{{convert|10|$/mi|$/km|$=€}}</nowiki></code> → {{convert|10|$/mi|$/km|$=€}}


It is ''not'' possible to convert the currency. So, this result (mixed currencies) is ''not'' possible: $15 per mile (€8.6/km)}} {{nay}}
It is ''not'' possible to convert the currency. So, this result (mixed currencies) is ''not'' possible: {{!mxt|1=$15 per mile (€8.6/km)}} {{nay}}


==Using convert inside templates==
For usage in template code, like infoboxes, {{tlf|Convert}} has these options:
;Pre-formatting fraction input
* [[Module:Convert/helper]] can read regular input and pre-format it into {{tlf|Convert}}-accepted input.
:Your template can accept {{para|input|16 7/8}} and use <nowiki>{{#invoke:Convert/helper|number|16 7/8}}</nowiki> &rarr; {{#invoke:Convert/helper|number|16 7/8}}


==Parameter list==
==Parameter list==
Line 1,016: Line 1,027:
|}
|}


==Deprecated options==
{{Convert/doc/deprecations list}}


==TemplateData==
==TemplateData==
Line 1,322: Line 1,335:
}
}
</templatedata>
</templatedata>
<!--''to be added''
==Glossary==
;unit code
:
;unit symbol
:
-->


==See also==
* {{tl|Cvt}}
* {{tl|SI units}}
* {{tl|Inflation}}, for converting historical prices to their current equivalent
* {{tl|To USD}}, for currency conversions
<includeonly>
<includeonly>
[[Category:Templates]]
[[Category:Templates]]
</includeonly>
</includeonly>
Please note that all contributions to skyHow are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (see skyHow:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)