Difference between revisions of "Template:Convert/doc/parameter list"
< Template:Convert | doc
Jump to navigation
Jump to search
| Line 51: | Line 51: | ||
|<code>|adj=ri0</code> || {{hidden sort key|ri0}} | |<code>|adj=ri0</code> || {{hidden sort key|ri0}} | ||
| Round input with precision 0 | | Round input with precision 0 | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|adj=ri1</code> || {{hidden sort key|ri1}} | |<code>|adj=ri1</code> || {{hidden sort key|ri1}} | ||
| Round input with precision 1 | | Round input with precision 1 | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|adj=ri2</code> || {{hidden sort key|ri2}} | |<code>|adj=ri2</code> || {{hidden sort key|ri2}} | ||
| Round input with precision 2 | | Round input with precision 2 | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|adj=ri3</code> || {{hidden sort key|ri3}} | |<code>|adj=ri3</code> || {{hidden sort key|ri3}} | ||
| Round input with precision 3 | | Round input with precision 3 | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|disp=b</code> || {{hidden sort key|b}} | |<code>|disp=b</code> || {{hidden sort key|b}} | ||
| Line 159: | Line 159: | ||
|<code>|round=5</code> || {{hidden sort key|05}} | |<code>|round=5</code> || {{hidden sort key|05}} | ||
| Rounds calculation to the nearest multiple of 5 | | Rounds calculation to the nearest multiple of 5 | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|round=25</code> || {{hidden sort key|25}} | |<code>|round=25</code> || {{hidden sort key|25}} | ||
| Rounds calculation to the nearest multiple of 25 | | Rounds calculation to the nearest multiple of 25 | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|round=each</code> || {{hidden sort key|each}} | |<code>|round=each</code> || {{hidden sort key|each}} | ||
| In a range, each number is rounded by the default rounding | | In a range, each number is rounded by the default rounding | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|sigfig=''N''</code> || {{hidden sort key|N}} | |<code>|sigfig=''N''</code> || {{hidden sort key|N}} | ||
| Round output number to ''N'' significant figures (''N'' is a positive integer) | | Round output number to ''N'' significant figures (''N'' is a positive integer) | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>|sortable=in</code> || {{hidden sort key|in}} | |<code>|sortable=in</code> || {{hidden sort key|in}} | ||
| Line 237: | Line 237: | ||
|<code>{{!xt|1=|disp=5}}</code> || {{hidden sort key|05}} | |<code>{{!xt|1=|disp=5}}</code> || {{hidden sort key|05}} | ||
| '''Deprecated'''. Use {{xt|1=|round=5}} | | '''Deprecated'''. Use {{xt|1=|round=5}} | ||
| − | | Rounding and | + | | Rounding and significant figures |
|- | |- | ||
|<code>{{!xt|1=|disp=flip}}</code> || {{hidden sort key|flip}} | |<code>{{!xt|1=|disp=flip}}</code> || {{hidden sort key|flip}} | ||
| Line 257: | Line 257: | ||
|<code>{{!xt|1=|near=5}}</code> || {{hidden sort key|05}} | |<code>{{!xt|1=|near=5}}</code> || {{hidden sort key|05}} | ||
| '''Deprecated'''. Use {{xt|1=|round=5}} | | '''Deprecated'''. Use {{xt|1=|round=5}} | ||
| − | | Rounding and | + | | Rounding and significant figures |
|}<noinclude> | |}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 19:26, 20 June 2016
Parameter options for {{convert}}
| |||
|---|---|---|---|
| Option | =.. | Description | Note |
|abbr=in |
Use symbol for first (left-hand side) unit | Symbol ('abbreviation') | |
|abbr=off |
Use name for all units | Symbol ('abbreviation') | |
|abbr=none |
|||
|abbr=on |
Use symbol for all units | Symbol ('abbreviation') | |
|abbr=out |
Use symbol for right-hand side unit (default) | Symbol ('abbreviation') | |
|abbr=values |
Show only input and output numbers, not units | Parts only | |
|abbr=~ |
Shows both unit name and symbol | Symbol & name | |
|adj=j |
Join number and unit name using " " instead of a space | Join values | |
|adj=mid|x=... |
User-specified text after the input unit; sets adj=on (adjective)
|
Word adding, adjective | |
|adj=on |
Unit name is adjective (singular and hyphenated) | Grammar, adjective | |
|adj=pre|x=... |
User-specified text before input unit | Word adding | |
|adj=ri0 |
Round input with precision 0 | Rounding and significant figures | |
|adj=ri1 |
Round input with precision 1 | Rounding and significant figures | |
|adj=ri2 |
Round input with precision 2 | Rounding and significant figures | |
|adj=ri3 |
Round input with precision 3 | Rounding and significant figures | |
|disp=b |
Join input and output using " (...)" (default) | Join values | |
|disp=sqbr |
Join input and output using " [...]" | Join values | |
|disp=br |
Join input and output using "<br/>" | Join values | |
|disp=comma |
Join input and output using ", " | Join values | |
|disp=or |
Join input and output using " or " | Join values | |
|disp=number |
Display output number only | Parts only | |
|disp=output number only |
|||
|disp=out |
Display only output number and name/symbol | Parts only | |
|disp=output only |
|||
|disp=preunit|…[|…] |
Text to be inserted after value and before units, for both input and output, with optionally different text for output. | Word adding | |
|disp=table |
Output is suitable for a table cell with align="right" | Table columns | |
|disp=tablecen |
Output is suitable for a table cell with align="center" | Table columns | |
|disp=unit |
Display input name/symbol only (not input number, not output) | Parts only | |
|disp=unit2 |
Display output name/symbol only (not input; not output number) | Parts only | |
|disp=x|... |
Join input and output using user-specified text | Word adding | |
|comma=5 |
Only use comma for thousands separator if 5 or more digits | Number format | |
|comma=gaps |
Use gaps (space), not comma, for thousands separator | Number format | |
|comma=gaps5 |
Use gaps (space), but only if 5 or more digits | Number format | |
|comma=off |
No thousands separator | Number format | |
|frac=N |
Show imperial number in fractions, denominator=N | Number format, fraction | |
|lk=in |
Link left-hand side unit name or symbol | Unit link | |
|lk=on |
Link all unit names or symbols (but not twice for the same unit) | Unit link | |
|lk=out |
Link right-hand side unit name or symbol | Unit link | |
|order=flip |
Inverts order of input, output measurements (conversion first) | Order | |
|round=5 |
Rounds calculation to the nearest multiple of 5 | Rounding and significant figures | |
|round=25 |
Rounds calculation to the nearest multiple of 25 | Rounding and significant figures | |
|round=each |
In a range, each number is rounded by the default rounding | Rounding and significant figures | |
|sigfig=N |
Round output number to N significant figures (N is a positive integer) | Rounding and significant figures | |
|sortable=in |
Output numeric hidden sort field for use in a sortable table (based on input) | Table sort | |
|sortable=on |
|||
|sortable=out |
Output numeric hidden sort field for use in a sortable table (based on output) | Table sort | |
|sp=us |
Use U.S. spelling (like "meter" instead of default "metre") | Spelling U.S. names | |
|spell=in |
Spell input number in words | Spelling numbers | |
|spell=In |
Spell input number in words with first letter uppercase | Spelling numbers | |
|spell=on |
Spell input and output numbers in words | Spelling numbers | |
|spell=On |
Spell input and output numbers in words with first letter uppercase | Spelling numbers | |
|$=€ |
Replace $-sign with a currency sign, for example in $/acre (no currency conversion happens)
|
Cost per unit | |
|debug=yes |
Debugging only. In a sortable table: show the normally hidden sort key | Table sort | |
|abbr=comma |
Deprecated. Use |comma=off | Number format | |
|abbr=mos |
Deprecated. Use |x| or |by| | Range format | |
|adj=1 |
Deprecated. Do not use. No need to deviate from MOS regarding plurals | Plural or singular | |
|adj=flip |
Deprecated. Use |order=flip | Order | |
|adj=nocomma |
Deprecated. Use |comma=off | Number format | |
|disp=2 |
Deprecated. Use |disp=output only | Parts only | |
|disp=5 |
Deprecated. Use |round=5 | Rounding and significant figures | |
|disp=flip |
Deprecated. Use |order=flip | Order | |
|disp=flip5 |
Deprecated. Use |order=flip |round=5 | Order, rounding | |
|disp=nocomma |
Deprecated. Use |comma=off | Number format | |
|disp=u2 |
Deprecated. Use |disp=unit2 | Parts only | |
|near=5 |
Deprecated. Use |round=5 | Rounding and significant figures | |
| Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |