Open main menu

Changes

Template:Convert/doc/parameter list

7,372 bytes added, 17:58, 20 March 2020
formatting
{| class="wikitable sortable collapsible {{{state|uncollapsed}}}" style="width:100%;"
! colspan=4 style="background:#eee" | {{navbar-collapsible|'''Parameter options for <nowiki>{{convert}}</nowiki>'''|Convert/doc/parameter list}}
|-
! Parameter
! Value
! Description
! Note
|-
| rowspan=15 | <code>&#124;abbr</code>
| data-sort-value="in" | <code>in</code>
| Use symbol for first (left-hand side) unit
| Unit display
|-
| data-sort-value="off" | <code>off</code>
| rowspan=2 | Use name for all units
| rowspan=2 | Unit display
|-
| data-sort-value="none" | <code>none</code>
|-
| data-sort-value="on" | <code>on</code>
| Use symbol for all units
| Unit display
|-
| data-sort-value="out" | <code>out</code>
| Use symbol for right-hand side unit (default)
| Unit display
|-
| data-sort-value="unit" | <code>unit</code>
| Use symbol for all units when using scientific notation
| Unit display
|-
| data-sort-value="values" | <code>values</code>
| Omit both the input and output units: show only the numbers
| Unit display
|-
| data-sort-value="~" | <code>~</code>
| Shows both unit name and symbol
| Unit display
|-
| data-sort-value="mid" | <code>mid</code>
| User-specified text after the input unit; sets <code>adj=on</code> (adjective). Expects 1 unnamed parameter.
| Word adding, adjective
|-
| data-sort-value="on" | <code>on</code>
| Unit name is adjective (singular and hyphenated)
| Grammar, adjective
|-
| data-sort-value="pre" | <code>pre</code>
| User-specified text before input unit. Expects 1 unnamed parameter.
| Word adding
|-
| data-sort-value="ri0" | <code>ri0</code>
| Round input with precision 0
| Input precision
|-
| data-sort-value="ri1" | <code>ri1</code>
| Round input with precision 1
| Input precision
|-
| data-sort-value="ri2" | <code>ri2</code>
| Round input with precision 2
| Input precision
|-
| data-sort-value="ri3" | <code>ri3</code>
| Round input with precision 3
| Input precision
|-
| rowspan=3 | <code>&#124;comma</code>
| data-sort-value="05" | <code>5</code>
| Only use comma for thousands separator if 5 or more digits
| Number format
|-
| data-sort-value="gaps" | <code>gaps</code>
| Use gaps (space), not comma, for thousands separator
| Number format
|-
| data-sort-value="off" | <code>off</code>
| No thousands separator
| Number format
|-
| rowspan=15 | <code>&#124;disp</code>
| data-sort-value="b" | <code>b</code>
| Join input and output using "&nbsp;(...)" (default)
| Join values
|-
| data-sort-value="sqbr" | <code>sqbr</code>
| Join input and output using "&nbsp;[...]"
| Join values
|-
| data-sort-value="br" | <code>br</code>
| Join input and output using "&lt;br/>"
| Join values
|-
| data-sort-value="comma" | <code>comma</code>
| Join input and output using ",&nbsp;"
| Join values
|-
| data-sort-value="or" | <code>or</code>
| Join input and output using "&nbsp;or&nbsp;"
| Join values
|-
| data-sort-value="number" | <code>number</code>
| rowspan=2 | Display output number only
| rowspan=2 | Parts only
|-
| data-sort-value="output number only" | <code>output number only</code>
|-
| data-sort-value="out" | <code>out</code>
| rowspan=2 | Display only output number and name/symbol
| rowspan=2 | Parts only
|-
| data-sort-value="output only" | <code>output only</code>
|-
| data-sort-value="preunit" | <code>preunit</code>
| Text to be inserted after value and before units, for both input and output, with optionally different text for output. Expects 1 or 2 unnamed parameters.
| Word adding
|-
| data-sort-value="table" | <code>table</code>
| Output is suitable for a table cell with align="right"
| Table columns
|-
| data-sort-value="tablecen" | <code>tablecen</code>
| Output is suitable for a table cell with align="center"
| Table columns
|-
| data-sort-value="unit" | <code>unit</code>
| Display input name/symbol only (not input number, not output)
| Parts only
|-
| data-sort-value="unit2" | <code>unit2</code>
| Display output name/symbol only (not input; not output number)
| Parts only
|-
| data-sort-value="x" | <code>x</code>
| Join input and output using user-specified text
| Word adding
|-
| <code>&#124;frac</code>
| data-sort-value="N" | <code>''N''</code>
| Show imperial number in fractions, denominator=''N''
| Number format, fraction
|-
| <code>&#124;input</code>
| data-sort-value="property P2048" | <code>P2048</code> {{small|1=(e.g.)}}
| Reads and converts Wikidata property
| Inside template
|-
| rowspan=3 | <code>&#124;lk</code>
| data-sort-value="in" | <code>in</code>
| Link left-hand side unit name or symbol
| Unit link
|-
| data-sort-value="on" | <code>on</code>
| Link all unit names or symbols (but not twice for the same unit)
| Unit link
|-
| data-sort-value="out" | <code>out</code>
| Link right-hand side unit name or symbol
| Unit link
|-
| rowspan=2 | <code>&#124;order</code>
| data-sort-value="flip" | <code>flip</code>
| Inverts order of input, output measurements (conversion first)
| Order
|-
| data-sort-value="out" | <code>out</code>
| Displays output units in the order entered, skipping input unit
| Order
|-
| <code>&#124;qid</code>
| data-sort-value="qid Q1056131" | <code>Q1056131</code> {{small|1=(e.g.)}}
| Reads Wikidata property from Wikidata item
| Inside template; testing
|-
| <code>&#124;qual</code>
| data-sort-value="qual Q613628" | <code>Q613628</code> {{small|1=(e.g.)}}
| Qualify Wikidata property
|
|-
| rowspan=3 | <code>&#124;round</code>
| data-sort-value="05" | <code>5</code>
| Rounds calculation to the nearest multiple of 5
| Output precision
|-
| data-sort-value="25" | <code>25</code>
| Rounds calculation to the nearest multiple of 25
| Output precision
|-
| data-sort-value="each" | <code>each</code>
| In a range, each number is rounded by the default rounding
| Output precision
|-
| <code>&#124;sigfig</code>
| data-sort-value="N" | <code>''N''</code>
| Round output number to ''N'' significant figures (''N'' is a positive integer)
| Output precision
|-
| <code>&#124;sortable</code>
| data-sort-value="on" | <code>on</code>
| Adds invisible sort key
| Table sort
|-
| <code>&#124;sp</code>
| data-sort-value="us" | <code>us</code>
| Use U.S. spelling ("meter" instead of default "metre")
| Spelling U.S.&nbsp;names
|-
| rowspan=4 | <code>&#124;spell</code>
| data-sort-value="in" | <code>in</code>
| Spell input number in words
| Spelling numbers
|-
| data-sort-value="In" | <code>In</code>
| Spell input number in words with first letter uppercase
| Spelling numbers
|-
| data-sort-value="on" | <code>on</code>
| Spell input and output numbers in words
| Spelling numbers
|-
| data-sort-value="On" | <code>On</code>
| Spell input and output numbers in words with first letter uppercase
| Spelling numbers
|-
| <code>&#124;$</code>
| data-sort-value="&euro;" | <code>&euro;</code>
| Replace $-sign with a currency sign, for example in <code>$/acre</code> {{nowrap|(no currency conversion happens)}}
| Cost per unit
|-
| <code>&#124;debug</code>
| data-sort-value="yes" | <code>yes</code>
| '''Debugging only'''. In a sortable table: show the normally hidden sort key
| Table sort
|- <!-- ----------------- Deprecated options ------------------------- -->
| <code>{{!mxt|1=&#124;disp}}</code> || data-sort-value="flip" | <code>flip</code>
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip}}
| Order
|-
|<code>{{!mxt|1=&#124;sing=}}</code> || data-sort-value="" |
| '''Deprecated'''. Use {{mxt|1=&#x7c;adj=}}
| Plurals

|}
Anonymous user