Plantilla:Convert: diferència entre les revisions
m {{ús de la plantilla}} |
mCap resum de modificació |
||
Línia 1: | Línia 1: | ||
{{convert/{{{2}}}|{{{1}}}|{{#ifeq:{{#expr:{{{3|0}}}*0}}|0|0}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|r={{#ifeq:{{{sp}}}|us|er|re}}|d=L{{{lk|off}}}A{{{abbr|off}}}D{{{disp|b}}}S{{{adj|{{{sing|off}}}}}}|s={{{sigfig|}}}}} |
{{convert/{{{2}}}|{{{1}}}|{{#ifeq:{{#expr:{{{3|0}}}*0}}|0|0}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|r={{#ifeq:{{{sp}}}|us|er|re}}|d=L{{{lk|off}}}A{{{abbr|off}}}D{{{disp|b}}}S{{{adj|{{{sing|off}}}}}}|s={{{sigfig|}}}}}<noinclude>{{ús de la plantilla}}</noinclude> |
||
<noinclude>{{ús de la plantilla}}</noinclude> |
Revisió del 12:03, 3 abr 2012
{{convert/{{{2}}}|{{{1}}}|0|||||r=re|d=LoffAoffDbSoff|s=}}
Aquesta plantilla utilitza una crida a un mòdul de tipus Lua, nom que li ve del llenguatge Lua que utilitza. Per tant, si volguéssiu modificar-la, abans hauríeu d'estar familiaritzats amb aquest llenguatge i les funcions de l'extensió Scribunto. Vegeu com fer proves de plantilles.
Aquesta plantilla utilitza el següent mòdul: |
{{{text}}} |
La plantilla {{convert}} calcula mesures d'una unitat (a entrar) a un altre, i després es presenten els resultats. Per exemple:
{{convert|2|km|mi}}
→ Plantilla:Convert/km{{convert|7|mi|km}}
→ Plantilla:Convert/mi
Les unitats disponibles s'enumeren més avall. En els noms de les unitats es té en compte sempre si són majúscules i minúscules (kW, no KW i no kw). Múltiples opcions de formatatge i de càlcul s'enumeren a continuació.
Nom de la unitat o símbol (abreviatura): 1 lliura o 1 lb?
By default, the first value shows unit name, the second the symbol (or abbreviation).
Use |abbr=on/off
to change this behaviour:
{{convert|1|lb|kg}}
→ Plantilla:Convert/lb (To compare; default: first value shows unit name){{convert|1|lb|kg|abbr=on}}
→ Plantilla:Convert/lb{{convert|1|lb|kg|abbr=off}}
→ Plantilla:Convert/lb
|abbr=in
toggles the default behaviour (|abbr=out
):
{{convert|1|lb|kg|abbr=in}}
→ Plantilla:Convert/lb
Adjectiu: a una distància de 10 milles
Use |adj=on
to produce the adjective form. The difference:
{{convert|10|mi|km}} to go
→ Plantilla:Convert/mi to go. (To compare, default)A {{convert|10|mi|km|adj=on}} distance
→ A Plantilla:Convert/mi distance. (Adjective form)
Arrodoniment: 100 peus són 30 metres o 30,5 m o 30,48 m?
By definition, 100 ft equals Plantilla:Convert/ft. In practical use, it is common to round the calculated metric number. With that, there are several possibilities.
Arrodoniment per defecte
- By default, the conversion result will be rounded either to precision comparable to that of the input value (the number of digits after the decimal point—or the negative of the number of non-significant zeroes before the point—is increased by one if the conversion is a multiplication by a number between 0.02 and 0.2, remains the same if the factor is between 0.2 and 2, is decreased by 1 if it is between 2 and 20, and so on) or to two significant figures, whichever is more precise. An exception to this is rounding temperatures (see below).
Exemples d'arrodoniment | ||
---|---|---|
Input | Displays as | Note |
{{convert|123|ft|m|-1}} |
Plantilla:Convert/ft | |
{{convert|123|ft|m|0}} |
Plantilla:Convert/ft | |
{{convert|123|ft|m|1}} |
Plantilla:Convert/ft | |
{{convert|550|ft|m|0}} |
Plantilla:Convert/ft | Approximate value is 167.64 m |
{{convert|550|ft|m}} |
Plantilla:Convert/ft | Rounds to 170, when approximate value is 167.64 m |
{{convert|500|ft|m|0}} |
Plantilla:Convert/ft | Approximate value is 152.4 m |
{{convert|500|ft|m}} |
Plantilla:Convert/ft | Rounds to 150, when approximate value is 152.4 m |
Convert supports four types of rounding:
Arrodoniment a una precisió donada: ús de |precision=
Specify the desired precision with the fourth unnamed parameter (or third unnamed parameter if the "convert to" parameter is omitted; or fifth unnamed parameter if a range is specified; or fourth unnamed parameter again if a range is specified and the "convert to" parameter is omitted; needs to be replaced with a "precision" named parameter). The conversion is rounded off to the nearest power of 1⁄10 this number. For instance, if the result is 8621 and the round number is "-2", the result will be 8600. If the result is "234.0283043" and the round number is "0", the result will be 234.
Arrodoniment a un determinat nombre de xifres significatives: |sigfig=
To specify the output number to be with n significant figures use |sigfig=<number>
:
- To compare:
{{convert|1200|ft|m}}
→ Plantilla:Convert/ft {{convert|1200|ft|m|sigfig=4}}
→ Plantilla:Convert/ft{{convert|1200|ft|m|sigfig=3}}
→ Plantilla:Convert/ft{{convert|1200|ft|m|sigfig=2}}
→ Plantilla:Convert/ft{{convert|1200|ft|m|sigfig=1}}
→ Plantilla:Convert/ft
Setting |sigfig=
is meaningless
{{convert|1200|ft|m|sigfig=0}}
→ Plantilla:Convert/ft
Arrodoniment a un múltiple de 5: 15, 20, 25, ...
Using |round=5
rounds the outcome to a multiple of 5.
{{convert|10|m|ft}}
→ Plantilla:Convert/m{{convert|10|m|ft|round=5}}
→ Plantilla:Convert/m
Similar: using |round=25
rounds the outcome to a multiple of 25.
{{convert|10|m|ft}}
→ Plantilla:Convert/m{{convert|10|m|ft|round=25}}
→ Plantilla:Convert/m- To compare:
{{convert|10|m|ft|sigfig=4}}
→ Plantilla:Convert/m
In a range, one can round each value individually to the default. Use |round=each
:
{{convert|10 x 200 x 3000|m|ft}}
→ Plantilla:Convert/m{{convert|10 x 200 x 3000|m|ft|round=each}}
→ Plantilla:Convert/m
Arrodoniment a un múltiple d'una fracció donada: 2 3⁄16 polzades
Specify the desired denominator using |frac=<some positive integer>
. (Denominador is the below-the-slash number, for example the 3 in 1⁄3).
{{convert|5,56|cm|in|frac=16}}
→ Plantilla:Convert/cm{{convert|8|cm|in|frac=4}}
→ Plantilla:Convert/cm
The fraction is reduced when possible:
{{convert|8|cm|in|frac=100}}
→ Plantilla:Convert/cm{{convert|8|cm|in}}
→ Plantilla:Convert/cm (To compare)
Arrodonint les temperatures °C, °F i K
In temperatures, the conversion will be rounded either to precision comparable to that of the input value or to that which would give three significant figures when expressed in kelvins, whichever is more precise.
{{convert|10|C|F K}}
→ Plantilla:Convert/C
Nota
- Per a una diferència de temperatura, com la conversió "Un augment de 10 °C", utilitzeu
|C-change=10
&tc. {{convert|10|C-change|F-change K-change}}
→ Un augment de Plantilla:Convert/C-change
En diverses unitats: Plantilla:Convert/C
Separate the multiple output units by a space:
{{convert|10|C|F K}}
→ Plantilla:Convert/C{{convert|5|km|mi nmi}}
→ Plantilla:Convert/km
If the output unit names contain spaces, use a '+' separator.
- See also
For multiple-unit options like 1 ft 5 in, vegeu #En l'entrada and #En la sortida.
Rangs de valors
Un marge: 6 a 17 kg (13 a 37 lb)
Range indicators are entered as the second parameter (between the values). Range separators can be:
Range separators in {{convert}} | |||
---|---|---|---|
Separator | Convert | Result | Notes |
-
|
{{convert|3|-|6|ft}}
|
Plantilla:Convert/- | Input can be hyphen (-) or en dash (–), output uses en dashes |
– – (en dash)
|
{{convert|3|–|6|ft}}
|
Plantilla:Convert/– | |
and
|
{{convert|3|and|6|ft}}
|
Plantilla:Convert/and | |
&
|
{{convert|3|&|6|ft}}
|
Plantilla:Convert/& | Same as and
|
and(-)
|
{{convert|3|and(-)|6|ft}}
|
Plantilla:Convert/and(-) | |abbr=on alters the punctuation
|
and(-)|abbr=on
|
{{convert|3|and(-)|6|ft|abbr=on}}
|
Plantilla:Convert/and(-) | |
or
|
{{convert|3|or|6|ft}}
|
Plantilla:Convert/or | |
to
|
{{convert|3|to|6|ft}}
|
Plantilla:Convert/to | |
to(-)
|
{{convert|3|to(-)|6|ft}}
|
Plantilla:Convert/to(-) | |abbr=on alters the punctuation
|
to(-)|abbr=on
|
{{convert|3|to(-)|6|ft|abbr=on}}
|
Plantilla:Convert/to(-) | |
to about
|
{{convert|3|to about|6|ft}}
|
Plantilla:Convert/to about | |
+/-
|
{{convert|3|+/-|6|ft}}
|
Plantilla:Convert/+/- | |
± ±
|
{{convert|3|±|6|ft}}
|
Plantilla:Convert/± | |
+
|
{{convert|3|+|6|ft}}
|
Plantilla:Convert/+ | |
,
|
{{convert|3|,|6|ft}}
|
Plantilla:Convert/, | |
, and
|
{{convert|3|, and|6|ft}}
|
Plantilla:Convert/, and | |
, or
|
{{convert|3|, or|6|ft}}
|
Plantilla:Convert/, or | |
by
|
{{convert|3|by|6|ft}}
|
Plantilla:Convert/by | |
x
|
{{convert|3|x|6|ft}}
|
Plantilla:Convert/x | Scientific notation.|abbr=on alters the punctuation
|
× ×
|
{{convert|3|×|6|ft}}
|
Plantilla:Convert/× | |
x|abbr=on
|
{{convert|3|x|6|ft|abbr=on}}
|
Plantilla:Convert/x | |
xx
|
|xx| is deprecated. Use |x| instead | ||
*
|
|*| is deprecated. Use |x| instead | ||
to-
|
|to-| is deprecated. Use |to(-)| instead | ||
&
|
|&| is deprecated. Use |and| instead | ||
abbr=mos
|
|abbr=mos is deprecated. Use |x| or |by| instead |
Múltiple dimensions: Plantilla:Convert/x
- Use "by"
{{convert|6|by|12|ft|m}}
→ Plantilla:Convert/by- Use "×" or ""x""
{{convert|6|x|12|m|ft}}
→ Plantilla:Convert/x
In science, the formal way is to set |x|
and |abbr=on
(keeping dimensions right, like in area = x km2):
{{convert|6|x|12|m|ft|abbr=on}}
→ Plantilla:Convert/x
Sobre els peus, polzades en rangs i múltiples
While it is possible to enter feet, inch in a simple conversion, this is not possible for ranges:
{{convert|1|ft|3|in|mm}}
→ Plantilla:Convert/ft (to compare){{convert|1|ft|3|in|x|3|ft|5|in|mm}}
→ Plantilla:Convert/ft
Paraules
Ortografia del nom de la unitat: metre del RU metre o d'EUA?
Default spelling of units is en-UK. To show en-US spelling, use |sp=us
:
{{convert|1|m|ft}}
→ Plantilla:Convert/m—default{{convert|1|m|ft|sp=us}}
→ Plantilla:Convert/m
Els números en forma de paraules: deu milles
To write a number in words, use |spell=in
:
{{convert|10|mi|m|spell=in}}
→ Plantilla:Convert/mi
To spell out both in and out values, use |spell=on
:
{{convert|10|mi|m|spell=on}}
→ Plantilla:Convert/mi
To make first letter a capital, use |spell=In
, |spell=On
{{convert|10|mi|m|spell=In}}
→ Plantilla:Convert/mi{{convert|10|mi|m|spell=On}}
→ Plantilla:Convert/mi
Remember that the spelling of the units (ft, m) is independently set by |abbr=
. To the extreme:
{{convert|10|mi|m|spell=on|abbr=off|sp=us}}
→ Plantilla:Convert/mi
Paraules addicionals: 4 acres plantats
- Incomplete section
{{convert|4|acre||adj=pre|planted}}
→ Plantilla:Convert/acre
Paraules adjectiu addicionals: Un Plantilla:Convert/ft corridor
{{convert|4|ft|m|adj=mid|-long}}
→ Plantilla:Convert/ft
Plurals: 1 polzada, 2 polzades
The unit symbol is singular always. Depending on the preceding number only, a unit name can be shown plural.
{{convert|1|metre}}
→ Plantilla:Convert/metre{{convert|2|metre}}
→ Plantilla:Convert/metre{{convert|2|metre|abbr=on}}
→ Plantilla:Convert/metre
- Exception
Entering the unit spelled |foot|
forces singular output "foot", whatever the number is.
{{convert|100|foot|abbr=off}}
→ Plantilla:Convert/foot
Canvis extrems de l'estructura gramatical: Les 18-, 24- i 32-lliures (8, 11 and 15 kg) cannons
This example is from the article Fort McHenry:
The American defenders had 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons.
You can't get this sentence structure as a direct result of using {{convert}} and its options. However, you can get the correctly converted numbers and the grammatical structure you want to use by using {{convert}} plus three stages of editing, previewing and saving versions of the text you wish to change.
- Stage 1: Enter the input numbers and units in {{convert}} as usual (this stage is just to get the calculated output):
had {{convert|18 |, |24 |, |32 |lb |kg |0 }} cannons
- Get the converted data below by clicking Preview or Save:
- → had Plantilla:Convert/, cannons
- Stage 2: Change the resulting text from a {{convert|...}} template result to plain code by adding
subst:
to the template name (short for "substitution") :
had {{subst:convert|18 |, |24 |, |32 |lb |kg |0 }} cannons
- Double-check this by clicking Preview. The preview will show the converted numbers are still correct:
- → had 18, 24, 32 pounds (8, 11, 15 kg) cannons
- Then click Save.
- Stage 3: Click Edit at the top of the article again, and then go to the text in the editing window. You'll see that the text is there in plain code. The template {{convert|...}} itself will have disappeared. You can change the text as needed. The substituted text and plain code in the editing window in this example would be:
had 18, 24, 32 pounds (8, 11, 15 kg) cannons
- You can edit this text as usual to add the grammatical features you wish. In this example, editing the above text to:
had 18-,_24-_and_32-pounder (8, 11_and_15 kg) cannons
- And then saving your edit will show the following result in the article text:
- → "had 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons"
Números
L'ús d'un prefix SI: gigàmetre (Gm), or micròmetre (μm)
Prefixos del SI
Text
Símbol
Factor
yotta
Y
1024
zetta
Z
1021
exa
E
1018
peta
P
1015
tera
T
1012
giga
G
109
mega
M
106
quilo
k
103
hecto
h
102
deca
da
101
(cap)
(cap)
1
deci
d
10−1
centi
c
10−2
mil·li
m
10−3
micro
μ
10−6
nano
n
10−9
pico
p
10−12
femto
f
10−15
atto
a
10−18
zepto
z
10−21
yocto
y
10−24
Units can have an prefix del SI like G
before the unit: Gm
, and giga
before the name: gigameter
. These are plain multiplication factors.
To illustrate, these are trivial calculations (from meter to meter), showing the multiplication factor:
The prefix can be added before the SI unit (here: unit m
for meter):
{{convert|12|Gm|mi|abbr=on}}
→ Plantilla:Convert/Gm
Mm
: Plantilla:Convert/Mm
km
: Plantilla:Convert/km
mm
: Plantilla:Convert/mm
μm
: Plantilla:Convert/μm
um
: Plantilla:Convert/um (letter "u" can be used for "μ" here)
The prefix can be used in the output unit:
{{convert|12000|mi|Mm|abbr=on}}
→ Plantilla:Convert/mi
{{convert|12|in|μm|abbr=on}}
→ Plantilla:Convert/in
As an exception, the non-SI unit "inch" can have the "μ" prefix too)
{{convert|12|μm|μin|abbr=on}}
→ Plantilla:Convert/μm
- Per a més informació:
Notació d'enginyeria: 7 × 106 m
En la unitat: e6m
En la notació d'enginyeria like 7E6 (for 7 × 106) can be entered as a "prefix" to the unit:
{{convert|7|e6m}}
→ Plantilla:Convert/e6m
The same is possible for the output unit:
{{convert|23,000,000|ft|e6m}}
→ Plantilla:Convert/ft
Any standard unit (not a combination, multiple, or built-in unit) can have such a prefix:
e3
(thousand), e6
(million), e9
(billion), e12
(trillion), e15
(quadrillion).
Notació científica: 1,23×10−14
En la notació científica, a number is written like 1,23×10−14.
With {{convert}}, the input can be in e-notation such as 12,3e4
. 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.
{{convert|12,3e-15|atm|atm|abbr=on}}
→ Plantilla:Convert/atm
{{convert|0,00000005|atm|atm|abbr=on}}
→ Plantilla:Convert/atm
Entrada amb fraccions: Plantilla:Convert/in
The number to convert can be written in fractions. Both /
(keyboard slash) and ⁄
(fraction slash) are accepted:
{{convert|1/2|in|mm|1}} → Plantilla:Convert/in
{{convert|1⁄2|in|mm|1}} → Plantilla:Convert/in
With integers, use a +
sign
{{convert|2+1⁄2|in|mm|1}} → Plantilla:Convert/in
When negative, use a hyphen -
and repeat it:
{{convert|-2-1⁄2|in|mm|1}} → Plantilla:Convert/in
{{convert|2-1⁄2|in|mm|1}} → Plantilla:Convert/in Note: this is read as a range
{{convert|-2+1⁄2|in|mm|1}} → Plantilla:Convert/in Should be a number, not an expression (do not require a calculation)
Sortida amb barra horitzontal de fracció en: 12 polzada
Using a double slash (//
) returns a horizontal bar fraction:
{{convert|1//2|in|mm|1}}
→ Plantilla:Convert/in
{{convert|2+1//2|in|mm|1}}
→ Plantilla:Convert/in
Separador de milers: 1.000 mi i 1000 mi
In input, a comma for thousands separator is accepted but not required; a gap (space) is not accepted. In output, by default, the thousand separator is the comma:
{{convert|1234567|m|ft}}
→ Plantilla:Convert/m
{{convert|1.234.567|m|ft}}
→ Plantilla:Convert/m
{{convert|1 234 567|m|ft}}
→ Plantilla:Convert/m
Set |comma=off
to remove the separator from the output:
{{convert|1234567|m|ft|comma=off}}
→ Plantilla:Convert/m
Use |comma=gaps
to use digit grouping by gap (thin space) as a thousands separator:
{{convert|1234567|m|ft}}
→ Plantilla:Convert/m (To compare, default)
{{convert|1234567|m|ft|comma=gaps}}
→ Plantilla:Convert/m
Setting |comma=5
or |comma=gaps5
will only add the separator when the number of digits is 5 or more:
{{convert|1234|m|ft}}
→ Plantilla:Convert/m (To compare, default)
{{convert|1234|m|ft|comma=5}}
→ Plantilla:Convert/m
{{convert|1234567|m|ft|comma=5}}
→ Plantilla:Convert/m
{{convert|1234|m|ft|comma=gaps5}}
→ Plantilla:Convert/m
{{convert|1234567|m|ft|comma=gaps5}}
→ Plantilla:Convert/m
Manipulació de sortida
Parèntesis i separadors: 10 m [33 ft]
Punctuation that distinguishes the two measurements is set by |disp=
.
Options are: b
(the default), sqbr
, comma
, or
, br
, x|...
:
{{convert|10|m|ft}}
→ Plantilla:Convert/m—( ) brackets are the default
{{convert|10|m|ft|disp=sqbr}}
→ Plantilla:Convert/m
{{convert|10|m|ft|disp=comma}}
→ Plantilla:Convert/m
{{convert|10|m|ft|disp=or}}
→ Plantilla:Convert/m
Setting |disp=br
will force a new line (<br>
)
{{convert|10|m|ft|disp=br}}
→ Plantilla:Convert/m
Also |disp=br()
will force a new line, and keep the brackets:
{{convert|10|m|ft|disp=br()}}
→ Plantilla:Convert/m
Setting |disp=x|...
allows any text as separator:
{{convert|10|m|ft|disp=x|_MyText_}}
→ Plantilla:Convert/m—(To display spaces, use
)
Flipping (reordenament) en dos mesures: Plantilla:Convert/mi
Setting |order=flip
will flip (swap) the two measurements:
{{convert|1|mi|m}}
→ Plantilla:Convert/mi (To compare, default)
{{convert|1|mi|m|order=flip}}
→ Plantilla:Convert/mi
When converting to multiple units, the effect is:
{{convert|10|km|mi nmi|order=flip}}
→ Plantilla:Convert/km
{{convert|10|km|nmi mi|order=flip}}
→ Plantilla:Convert/km
Veient parts del resultat: Plantilla:Convert/cuyd
It is possible to display only parts of the conversion result:
Convert
Output
Description
{{convert|2|cuyd|m3}}
Plantilla:Convert/cuyd
Default, to compare
{{convert|2|cuyd|m3|abbr=values}}
Plantilla:Convert/cuyd
Input and output numbers
{{convert|2|cuyd|m3|disp=unit}}
Plantilla:Convert/cuyd
Input unit
{{convert|2|cuyd|m3|disp=unit|adj=on}}
Plantilla:Convert/cuyd
Input unit, adjective (hyphenated)
{{convert|2|cuyd|cuyd|0|disp=out|abbr=off}}
Plantilla:Convert/cuyd
Input (workaround)
{{convert|2|cuyd|m3|abbr=~}}
Plantilla:Convert/cuyd
Input: both name and symbol
{{convert|2|cuyd|m3|disp=unit2}}
Plantilla:Convert/cuyd
Output unit (symbol)
{{convert|2|cuyd|m3|disp=unit2|abbr=off}}
Plantilla:Convert/cuyd
Output unit (name)
{{convert|2|cuyd|m3|disp=number}}
Plantilla:Convert/cuyd
Output value
{{convert|2|cuyd|m3|disp=out}}
Plantilla:Convert/cuyd
Output value and unit
{{convert|2|cuyd|m3|disp=out|abbr=off}}
Plantilla:Convert/cuyd
Output value and unit
Visualització de noms d'entrada i de símbols: 2 quilopascals [kPa]
Setting |abbr=~
returns both name and symbol of the first (input) unit:
{{convert|2|kPa|psi|abbr=~}}
→ Plantilla:Convert/kPa
A {{convert|2|kPa|psi|abbr=~|adj=on}} pressure
→ A Plantilla:Convert/kPa pressure
Opcions de taula
Per l'estructura de les wikitables, there are three options: add a line-break, split the result over columns and make the table sortable.
Salt de línia forçada
|disp=br
adds a line-break and omits brackets.
|disp=br()
adds a line-break and does add brackets to the converted value. This may be useful in tables:
|disp=br
|disp=br()
Plantilla:Convert/km
Plantilla:Convert/km
Les columnes de la taula només mostren números
Using {convert} in a table cell, with |disp=table
splits the result over two columns:
{{convert|10|m|ft|disp=table}}
→ Plantilla:Convert/m
|disp=tablecen
does the same, and also centers the text:
{{convert|20|m|ft|disp=tablecen}}
→ Plantilla:Convert/m
The units are added as a column header:
m
ft
|disp=table
Plantilla:Convert/m
|disp=tablecen
Plantilla:Convert/m
|disp=<other>
(default)
Plantilla:Convert/m
Ordenació
Use |sortable=on
to include a hidden numerical sortkey in the output, suitable for use in a table with sortable columns. Technically, this places a hidden string before the actual displayed values:
{{convert|10|m|ft|sortable=on}}
→ <span style="display:none">7001100000000000000</span>10 metres (33 ft)
Use both |disp=table
and |sortable=on
together to produce table columns (pipe symbols) for each value in sortable columns:
The generated sortkey is calculated in a consistent way based on both the value and its unit as passed to the convert template. In most cases convert uses the passed value converted to SI base units. It is therefore not necessarily the displayed value or other alternate units and is calculated regardless of output format options. Using different units or different order of units in individual rows should therefore not lead to incorrect sorting, although variations in rounding can give surprising results, since an unrounded number is used for the sortkey.
Unitats
- See also: complete Convert/list of units
Units are case-sensitive: kW, not KW or kw
The table below lists units supported by template {{convert}}. The list is not complete—more complete lists are linked for each dimension. A complete list is at the full list of units.
The unit-code (column 3), is accepted as input by the template. These can be used as the second or third unnamed parameter. Some units have alternative codes; these are shown in brackets e.g. °F (F): either may be entered for Fahrenheit.
Column 7 lists standard combinations of multiple converted outputs. For example, {{convert|55|nmi|km mi}}
produces "Plantilla:Convert/nmi". Such a combination must be used as the third unnamed parameter.
Llista abreujada d'unitats suportades per {{Convert}}
Explanation
sistema
unitat
unitat-
codi
símbol o
abrev.
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
the system(s) to which the unit belongs
units listed by name
unit-code to use in template
symbols shown in output
other notes about the units
sample of the default conversion for the unit
output codes for multiple conversions
LONGITUD
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/Mm
Mm
(none)
US spelling: megameter
Plantilla:Convert/Mm
Plantilla:Convert/km
km
(none)
US spelling: kilometer
Plantilla:Convert/km
- km mi
Plantilla:Convert/m
m
(none)
US spelling: meter
Plantilla:Convert/m
- m ft
- m ftin
Plantilla:Convert/cm
cm
(none)
US spelling: centimeter
Plantilla:Convert/cm
- cm in
Plantilla:Convert/mm
mm
(none)
US spelling: millimeter
Plantilla:Convert/mm
- mm in
Plantilla:Convert/µm
µm (um)
(none)
US spelling: micrometer
Plantilla:Convert/µm
Plantilla:Convert/nm
nm
(none)
US spelling: nanometer
Plantilla:Convert/nm
non-SI metric
Plantilla:Convert/Å
Å
(angstrom)
(none)
Plantilla:Convert/Å
Imperial
&
US customary
Plantilla:Convert/mi
mi
(none)
Plantilla:Convert/mi
- mi km
Plantilla:Convert/furlong
furlong
(none)
Plantilla:Convert/furlong
Plantilla:Convert/chain
chain
(none)
Plantilla:Convert/chain
Plantilla:Convert/rd
rd
(none)
For other names of this unit see the full list.
Plantilla:Convert/rd
Plantilla:Convert/fathom
fathom
(none)
fathom ≡ 6 ft
Plantilla:Convert/fathom
Plantilla:Convert/yd
yd
(none)
assumes the international definition
Plantilla:Convert/yd
Plantilla:Convert/ft
ft (foot)
(none)
long code "foot" outputs foot (and never feet)
Plantilla:Convert/ft
- ftin (feet and inches)
- ft m (foot m)
Plantilla:Convert/in
in
(none)
Plantilla:Convert/in
- in cm
- in mm
Other
Plantilla:Convert/nmi
nmi
(none)
the international standard nautical mile
For other nautical miles see the full list.
Plantilla:Convert/nmi
Plantilla:Convert/pc
pc
(none)
Plantilla:Convert/pc
Plantilla:Convert/ly
ly
(none)
Plantilla:Convert/ly
Plantilla:Convert/AU
AU
(none)
Plantilla:Convert/AU
ÀREA
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/km2
km2
(none)
US spelling: square kilometer
Plantilla:Convert/km2
- km2 sqmi
Plantilla:Convert/m2
m2
(none)
US spelling: square meter
Plantilla:Convert/m2
- m2 sqft
Plantilla:Convert/cm2
cm2
(none)
US spelling: square centimeter
Plantilla:Convert/cm2
- cm2 sqin
Plantilla:Convert/mm2
mm2
(none)
US spelling: square millimeter
Plantilla:Convert/mm2
- mm2 sqin
non-SI metric
Plantilla:Convert/ha
ha
(none)
Plantilla:Convert/ha
Imperial
&
US customary
Plantilla:Convert/sqmi
sqmi
(none)
Plantilla:Convert/sqmi
- sqmi km2
Plantilla:Convert/acre
acre
(none)
Plantilla:Convert/acre
Plantilla:Convert/sqyd
sqyd
(none)
Plantilla:Convert/sqyd
Plantilla:Convert/sqft
sqft
(sqfoot)
(none)
long code "sqfoot" outputs square foot (and never feet)
Plantilla:Convert/sqft
- sqft m2 (sqfoot m2)
Plantilla:Convert/sqin
sqin
(none)
Plantilla:Convert/sqin
- sqin cm2
Other
Plantilla:Convert/sqnmi
sqnmi
(none)
Plantilla:Convert/sqnmi
Plantilla:Convert/dunam
dunam
(none)
For alternative spellings and definitions see the full list
Plantilla:Convert/dunam
Plantilla:Convert/tsubo
tsubo
(none)
Plantilla:Convert/tsubo
VOLUM
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/m3
m3
(none)
US spelling: cubic meter
one kilolitre
Plantilla:Convert/m3
Plantilla:Convert/cm3
cm3
(none)
US spelling: cubic centimeter
one millilitre
Plantilla:Convert/cm3
cc
Plantilla:Convert/cc
Plantilla:Convert/mm3
mm3
(none)
US spelling: cubic millimeter
Plantilla:Convert/mm3
non-SI metric
Plantilla:Convert/kl
kl
(none)
US spelling: kiloliter
one cubic metre
Plantilla:Convert/kl
kL
Plantilla:Convert/kL
Plantilla:Convert/l
l
(none)
US spelling: liter
one cubic decimetre
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/l
- l impgal
- l USgal
- l U.S.gal
- l USdrygal
- l U.S.drygal
L
Plantilla:Convert/L
- L impgal
- L impqt
- L USgal
- L U.S.gal
- L USdrygal
- L U.S.drygal
Plantilla:Convert/cl
cl
(none)
US spelling: centiliter
Plantilla:Convert/cl
cL
Plantilla:Convert/cL
Plantilla:Convert/ml
ml
(none)
US spelling: milliliter
one cubic centimetre
Plantilla:Convert/ml
- ml impoz
- ml USoz
- ml U.S.oz
mL
Plantilla:Convert/mL
- mL impoz
- mL USoz
- mL U.S.oz
Imperial
&
US customary
Plantilla:Convert/cuyd
cuyd
(none)
Plantilla:Convert/cuyd
Plantilla:Convert/cuft
cuft (cufoot)
(none)
long code "cufoot" outputs cubic foot (and never feet)
Plantilla:Convert/cuft
Plantilla:Convert/cuin
cuin
(none)
Plantilla:Convert/cuin
Imperial
Plantilla:Convert/impbbl
impbbl
(none)
36 imp gal
Plantilla:Convert/impbbl
Plantilla:Convert/impbsh
impbsh
(none)
8 imp gal
Plantilla:Convert/impbsh
impbu
Plantilla:Convert/impbu
Plantilla:Convert/impgal
impgal
(none)
4.54609 litres by definition, also
4 imp qt or 8 imp pt or 160 imp fl oz
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/impgal
- impgal l
- impgal L
- impgal USgal
- impgal U.S.gal
- impgal USdrygal
- impgal U.S.drygal
Plantilla:Convert/impqt
impqt
(none)
1/4 imp gal or 40 imp fl oz
Plantilla:Convert/impqt
Plantilla:Convert/imppt
imppt
(none)
1/8 imp gal or 20 imp fl oz
Plantilla:Convert/imppt
Plantilla:Convert/impoz
impoz (impfloz)
(none)
1/160 imp gal
Plantilla:Convert/impoz
- impoz USoz
- impoz U.S.oz
- impoz ml
- impoz mL
US customary
liquid measure
Plantilla:Convert/USbbl
USbbl
(none)
31½ US gal
used for liquids except for oil and beer (see the full list)
Plantilla:Convert/USbbl
U.S.bbl
Plantilla:Convert/U.S.bbl
Plantilla:Convert/oilbbl
oilbbl
(none)
42 US gal
Plantilla:Convert/oilbbl
Plantilla:Convert/USbeerbbl
USbeerbbl
(usbeerbbl)
(none)
Plantilla:Convert/USbeerbbl
U.S.beerbbl
(usbeerbbl)
Plantilla:Convert/U.S.beerbbl
Plantilla:Convert/USgal
USgal
(none)
231 cubic inches by definition, also
4 US qt or 8 US pt or 128 US fl oz
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/USgal
- USgal l
- USgal L
- USgal impgal
U.S.gal
Plantilla:Convert/U.S.gal
- USgal l
- USgal L
- USgal impgal
Plantilla:Convert/USqt
USqt
(none)
1/4 US gal or 32 US fl oz
Plantilla:Convert/USqt
U.S.qt
Plantilla:Convert/U.S.qt
Plantilla:Convert/USpt
USpt
(none)
1/8 US gal or 16 US fl oz
Plantilla:Convert/USpt
U.S.pt
Plantilla:Convert/U.S.pt
Plantilla:Convert/USoz
USoz
(USfloz)
(none)
1/128 US gal
Plantilla:Convert/USoz
- USoz ml
- USoz mL
- USoz impoz
U.S.oz
(U.S.floz)
Plantilla:Convert/U.S.oz
- U.S.oz ml
- U.S.oz mL
- U.S.oz impoz
US customary
dry measure
Plantilla:Convert/USdrybbl
USdrybbl
(none)
105/32 US bsh
Plantilla:Convert/USdrybbl
U.S.drybbl
Plantilla:Convert/U.S.drybbl
Plantilla:Convert/USbsh
USbsh
(none)
2150.42 cubic inches by definition
Plantilla:Convert/USbsh
U.S.bsh
Plantilla:Convert/U.S.bsh
Plantilla:Convert/USbu
USbu
(none)
2150.42 cubic inches by definition
Plantilla:Convert/USbu
U.S.bu
Plantilla:Convert/U.S.bu
Plantilla:Convert/USdrygal
USdrygal
(none)
1/8 US bsh
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/USdrygal
- USdrygal l
- USdrygal L
- USdrygal impgal
U.S.drygal
Plantilla:Convert/U.S.drygal
- U.S.drygal l
- U.S.drygal L
- U.S.drygal impgal
Plantilla:Convert/USdryqt
USdryqt
(none)
1/32 US bsh
Plantilla:Convert/USdryqt
U.S.dryqt
Plantilla:Convert/U.S.dryqt
Plantilla:Convert/USdrypt
USdrypt
(none)
1/32 US bsh
Plantilla:Convert/USdrypt
U.S.drypt
Plantilla:Convert/U.S.drypt
VELOCITAT
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/m/s
m/s
(none)
US spelling: meter per second
Plantilla:Convert/m/s
- m/s ft/s (m/s foot/s)
non-SI metric
Plantilla:Convert/km/h
km/h
(none)
US spelling: kilometer per hour
Plantilla:Convert/km/h
- km/h mph
Imperial
&
US customary
Plantilla:Convert/mph
mph
(none)
Plantilla:Convert/mph
- mph km/h
- mph kn
Plantilla:Convert/ft/s
ft/s (foot/s)
(none)
long code "foot/s" outputs foot per second (and never feet)
Plantilla:Convert/ft/s
- ft/s m/s
Maritime units
Plantilla:Convert/kn
kn (knot)
(none)
Plantilla:Convert/kn
- kn mph
FORÇA
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/GN
GN
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/GN
- GN LT-f
- GN LTf
- GN ST-f
- GN STf
Plantilla:Convert/MN
MN
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/MN
- MN LT-f
- MN LTf
- MN ST-f
- MN STf
Plantilla:Convert/kN
kN
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/kN
- kN LT-f
- kN LTf
- kN ST-f
- kN STf
Plantilla:Convert/N
N
(none)
Plantilla:Convert/N
- N lb-f
- N lbf
- N oz-f
- N ozf
Plantilla:Convert/mN
mN
(none)
Plantilla:Convert/mN
- mN oz-f
- mN ozf
- mN gr-f
- mN grf
Plantilla:Convert/µN
µN (uN)
(none)
Plantilla:Convert/µN
- µN gr-f
- µN grf
Plantilla:Convert/nN
nN
(none)
Plantilla:Convert/nN
- nN gr-f
- nN grf
cgs
Plantilla:Convert/Mdyn
Mdyn
(none)
Plantilla:Convert/Mdyn
Plantilla:Convert/kdyn
kdyn
(none)
Plantilla:Convert/kdyn
Plantilla:Convert/dyn
dyn
(dyne)
(none)
Plantilla:Convert/dyn
Plantilla:Convert/mdyn
mdyn
(none)
Plantilla:Convert/mdyn
Metric gravitational units
Plantilla:Convert/t-f
t-f
(none)
Plantilla:Convert/t-f
tf
Plantilla:Convert/tf
Plantilla:Convert/kg-f
kg-f
(none)
Plantilla:Convert/kg-f
kgf
Plantilla:Convert/kgf
Plantilla:Convert/g-f
g-f
(none)
Plantilla:Convert/g-f
gf
Plantilla:Convert/gf
Plantilla:Convert/mg-f
mg-f
(none)
Plantilla:Convert/mg-f
mgf
Plantilla:Convert/mgf
Avoirdupois-based units
Plantilla:Convert/pdl
pdl
(none)
Plantilla:Convert/pdl
Plantilla:Convert/LT-f
LT-f
(none)
Plantilla:Convert/LT-f
- LT-f ST-f
LTf
Plantilla:Convert/LTf
- LTf STf
Plantilla:Convert/ST-f
ST-f
(none)
Plantilla:Convert/ST-f
- ST-f LT-f
STf
Plantilla:Convert/STf
- STf LTf
Plantilla:Convert/lb-f
lb-f
(none)
Plantilla:Convert/lb-f
lbf
Plantilla:Convert/lbf
Plantilla:Convert/gr-f
gr-f
(none)
Plantilla:Convert/gr-f
grf
Plantilla:Convert/grf
ENERGIA
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/GJ
GJ
(none)
Plantilla:Convert/GJ
Plantilla:Convert/MJ
MJ
(none)
Plantilla:Convert/MJ
Plantilla:Convert/kJ
kJ
(none)
Plantilla:Convert/kJ
Plantilla:Convert/hJ
hJ
(none)
Plantilla:Convert/hJ
Plantilla:Convert/daJ
daJ
(none)
Plantilla:Convert/daJ
Plantilla:Convert/J
J
(none)
Plantilla:Convert/J
Plantilla:Convert/dJ
dJ
(none)
Plantilla:Convert/dJ
Plantilla:Convert/cJ
cJ
(none)
Plantilla:Convert/cJ
Plantilla:Convert/mJ
mJ
(none)
Plantilla:Convert/mJ
Plantilla:Convert/µJ
µJ (uJ)
(none)
Plantilla:Convert/µJ
Plantilla:Convert/nJ
nJ
(none)
Plantilla:Convert/nJ
cgs
Plantilla:Convert/Merg
Merg
(none)
Plantilla:Convert/Merg
Plantilla:Convert/kerg
kerg
(none)
Plantilla:Convert/kerg
Plantilla:Convert/erg
erg
(none)
Plantilla:Convert/erg
Watt-hour multiples
Plantilla:Convert/TWh
TWh
(none)
Plantilla:Convert/TWh
TW.h
Plantilla:Convert/TW.h
Plantilla:Convert/GWh
GWh
(none)
Plantilla:Convert/GWh
GW.h
Plantilla:Convert/GW.h
Plantilla:Convert/MWh
MWh
(none)
Plantilla:Convert/MWh
MW.h
Plantilla:Convert/MW.h
Plantilla:Convert/kWh
kWh
(none)
Plantilla:Convert/kWh
kW.h
Plantilla:Convert/kW.h
Plantilla:Convert/Wh
Wh
(none)
Plantilla:Convert/Wh
W.h
Plantilla:Convert/W.h
Electron-
volt multiples
Plantilla:Convert/GeV
GeV
(none)
Plantilla:Convert/GeV
Plantilla:Convert/MeV
MeV
(none)
Plantilla:Convert/MeV
Plantilla:Convert/keV
keV
(none)
Plantilla:Convert/keV
Plantilla:Convert/eV
eV
(none)
Plantilla:Convert/eV
Plantilla:Convert/meV
meV
(none)
Plantilla:Convert/meV
Calorie multiples
Plantilla:Convert/Cal
Cal
(none)
The thermo-chemical calorie is the default definition. For others, see the full list.
Plantilla:Convert/Cal
Plantilla:Convert/Mcal
Mcal
(none)
Plantilla:Convert/Mcal
Plantilla:Convert/kcal
kcal
(none)
Plantilla:Convert/kcal
Plantilla:Convert/cal
cal
(none)
Plantilla:Convert/cal
Plantilla:Convert/mcal
mcal
(none)
Plantilla:Convert/mcal
pound/
ounce-foot/
inch-hour-minute-second
Plantilla:Convert/ftpdl
ftpdl
(none)
Plantilla:Convert/ftpdl
Plantilla:Convert/ftlbf
ftlbf
(none)
Plantilla:Convert/ftlbf
ftlb-f
Plantilla:Convert/ftlb-f
Plantilla:Convert/inlbf
inlbf
(none)
Plantilla:Convert/inlbf
inlb-f
Plantilla:Convert/inlb-f
Plantilla:Convert/inozf
inozf
(none)
Plantilla:Convert/inozf
inoz-f
Plantilla:Convert/inoz-f
Plantilla:Convert/hph
hph
(none)
Plantilla:Convert/hph
British thermal unit
Plantilla:Convert/Btu
Btu
(none)
The International Steam Table British thermal unit is used. For others, see the full list.
Plantilla:Convert/Btu
BTU
Plantilla:Convert/BTU
TNT-based units
Plantilla:Convert/GtTNT
GtTNT
(none)
Plantilla:Convert/GtTNT
Plantilla:Convert/GtonTNT
GtonTNT
(none)
Plantilla:Convert/MtTNT
MtTNT
(none)
Plantilla:Convert/MtTNT
Plantilla:Convert/MtonTNT
MtonTNT
(none)
Plantilla:Convert/ktTNT
ktTNT
(none)
Plantilla:Convert/ktTNT
Plantilla:Convert/ktonTNT
ktonTNT
(none)
Plantilla:Convert/tTNT
tTNT
(none)
Plantilla:Convert/tTNT
Plantilla:Convert/tonTNT
tonTNT
(none)
Other
Plantilla:Convert/Eh
Eh
(none)
Plantilla:Convert/Eh
Plantilla:Convert/Ry
Ry
(none)
Plantilla:Convert/Ry
Plantilla:Convert/toe
toe
(none)
Plantilla:Convert/toe
Plantilla:Convert/BOE
BOE
(none)
Plantilla:Convert/BOE
cubic foot of natural gas
cuftnaturalgas (cufootnaturalgas)
Unit-code cufootnaturalgas will show "cubic foot of natural gas" if plural.
Plantilla:Convert/cuftnaturalgas
Plantilla:Convert/latm
latm
(none)
Plantilla:Convert/latm
Latm
Plantilla:Convert/Latm
Plantilla:Convert/impgalatm
impgalatm
(none)
Plantilla:Convert/impgalatm
Plantilla:Convert/USgalatm
USgalatm
(usgalatm)
(none)
Plantilla:Convert/USgalatm
U.S.galatm
(usgalatm)
Plantilla:Convert/U.S.galatm
TEMPERATURA
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/K
K
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/K
- K °C (K C)
- K °R (K R)
- K °F (K F)
Plantilla:Convert/°C
°C (C)
(none)
Plantilla:Convert/°C
- °C K (C K)
- °C °R (C R)
- °C °F (C F)
Imperial
&
US customary
Plantilla:Convert/°R
°R (R)
(none)
Plantilla:Convert/°R
- °R K (R K)
- °R °C (R C)
- °R °F (R F)
Plantilla:Convert/°F
°F (F)
(none)
Plantilla:Convert/°F
- °F K (F K)
- °F °C (F C)
- °F °R (F R)
Celsius change
C-change
Used for temperature intervals instead of actual temperatures
Example: {{convert|5|C-change|0}} warmer
Result: Plantilla:Convert/C-change warmer
Fahrenheit change
F-change
Used for temperature intervals instead of actual temperatures
Example: {{convert|10|F-change|0}} colder
Result: Plantilla:Convert/F-change colder
MASSA
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
SI
Plantilla:Convert/kg
kg
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/kg
- kg lb
- kg st
Plantilla:Convert/g
g
(none)
Plantilla:Convert/g
- g oz
Plantilla:Convert/mg
mg
(none)
Plantilla:Convert/mg
- mg gr
Plantilla:Convert/µg
µg (ug)
(none)
Plantilla:Convert/µg
non-SI metric
Plantilla:Convert/t
t
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/t
- t LT
- t ST
Plantilla:Convert/MT
MT
(none)
- MT LT
- MT ST
Avoirdupois
Plantilla:Convert/LT
LT
(none)
2,240 lb
used mostly in the British Commonwealth.
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/LT
- LT t
- LT MT
- LT ST
long ton
Plantilla:Convert/long ton
Plantilla:Convert/ST
ST
(none)
2,000 lb
used mostly in the US.
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/ST
- ST t
- ST MT
- ST LT
short ton
Plantilla:Convert/short ton
Plantilla:Convert/st
st
(none)
14 lb
used mostly in the British Commonwealth except Canada.
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/st
- st kg
- st lb
Plantilla:Convert/lb
lb
(none)
Permet unitats de sortida triples. Vegeu: full list.
Plantilla:Convert/lb
- lb kg
- lb st
Plantilla:Convert/oz
oz
(none)
Plantilla:Convert/oz
- oz g
Plantilla:Convert/drachm
drachm
(none)
Plantilla:Convert/drachm
Plantilla:Convert/dram
dram
(none)
Plantilla:Convert/gr
gr
(none)
equivalent to the troy grain
Plantilla:Convert/gr
Troy
Plantilla:Convert/ozt
ozt
(none)
Plantilla:Convert/ozt
other
Plantilla:Convert/carat
carat
(none)
Plantilla:Convert/carat
PARELL DE FORCES (Torsió)
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
Industrial
SI
Plantilla:Convert/Nm
Nm
(none)
Triple combinations are also possible. See the full list.
Plantilla:Convert/Nm
- Nm kg.m
- Nm lb.ft
Non-SI metric
Plantilla:Convert/kg.m
kg.m
(none)
Plantilla:Convert/kg.m
- kg.m Nm
- kg.m lb.ft
Imperial
&
US customary
Plantilla:Convert/lb.ft
lb.ft
(none)
Plantilla:Convert/lb.ft
- lb.ft Nm
- lb.ft kg-m
Scientific
SI
Plantilla:Convert/N.m
N.m
(none)
Triple combinations are also possible. See the full list.
Plantilla:Convert/N.m
- N.m kgf.m
- N.m lbf.ft
Non-SI metric
Plantilla:Convert/kgf.m
kgf.m
(none)
Plantilla:Convert/kgf.m
- kgf.m N.m
- kgf.m lbf.ft
Imperial
&
US customary
Plantilla:Convert/lbf.ft
lbf.ft
(none)
Plantilla:Convert/lbf.ft
- lbf.ft N.m
- lbf.ft kgf.m
DENSITAT
(Full list)
sistema
unitat
unitat-
codi
abre-
viatura
notes
conversió amb
l'exemple per defecte
combinació
d'unitats de sortida
Metric
Plantilla:Convert/kg/m3
kg/m3
(none)
Plantilla:Convert/kg/m3
- kg/m3 lb/ft3 (kg/m3 lb/cuft)
- kg/m3 lb/yd3 (kg/m3 lb/cuyd)
Plantilla:Convert/g/m3
g/m3
(none)
Plantilla:Convert/g/m3
- g/m3 kg/m3
- g/m3 lb/ft3 (g/cm3 lb/cuft)
- g/m3 lb/yd3 (g/cm3 lb/cuyd)
Imperial
&
US customary
Plantilla:Convert/lb/ft3
lb/ft3
(none)
Plantilla:Convert/lb/ft3
- lb/ft3 kg/m3 (lb/cu ft g/m3)
- lb/ft3 g/m3 (lb/cu ft g/m3)
Plantilla:Convert/lb/yd3
lb/yd3
(none)
Plantilla:Convert/lb/yd3
- lb/yd3 kg/m3 (lb/cuyd kg/m3)
- lb/yd3 g/m3 (lb/cuyd g/m3)
PRESSURE
unitat
unitat-
codi
abre-
viatura
conversió amb
l'exemple per defecte
Plantilla:Convert/GPa
GPa
(none)
Plantilla:Convert/GPa
Plantilla:Convert/MPa
MPa
(none)
Plantilla:Convert/MPa
Plantilla:Convert/kPa
kPa
(none)
Plantilla:Convert/kPa
Plantilla:Convert/hPa
hPa
(none)
Plantilla:Convert/hPa
Plantilla:Convert/Pa
Pa
(none)
Plantilla:Convert/Pa
Plantilla:Convert/mPa
mPa
(none)
Plantilla:Convert/mPa
Plantilla:Convert/mbar
mbar
(none)
Plantilla:Convert/mbar
mb
Plantilla:Convert/mb
Plantilla:Convert/dbar
dbar
(none)
Plantilla:Convert/dbar
Plantilla:Convert/bar
bar
(none)
Plantilla:Convert/bar
Plantilla:Convert/kBa
kBa
(none)
Plantilla:Convert/kBa
Plantilla:Convert/Ba
Ba
(none)
Plantilla:Convert/Ba
Plantilla:Convert/atm
atm
(none)
Plantilla:Convert/atm
Plantilla:Convert/Torr
Torr
(none)
Plantilla:Convert/Torr
Plantilla:Convert/mmHg
mmHg
(none)
Plantilla:Convert/mmHg
Plantilla:Convert/inHg
inHg
(none)
Plantilla:Convert/inHg
Plantilla:Convert/psi
psi
(none)
Plantilla:Convert/psi
EFICIÈNCIA DE COMBUSTIBLE
unitat
unitat-
codi
notes
combinacions
kilometres per litre
km/l (km/L)
Use km/L
to get "km/L"
- km/l mpgimp
- km/l mpgus
litres per 100 kilometres
l/100 km (L/100 km)
Use L/100 km
to get "L/100 km"
- l/100 km mpgimp
- l/100 km mpgus
litres per kilometre
l/km (L/km)
Use L/km
to get "L/km"
- l/km impgal/mi
- l/km usgal/mi
miles per imperial gallon
mpgimp
- mpgimp mpgus
miles per US gallon
mpgus (mpgUS, mpgU.S.)
Use mpgUS
to get "US"
Use mpgU.S.
to get "U.S."
mpgus
will give "U.S." if spelling is
set to US & "US" otherwise
- mpgus mpgimp
imperial gallons per mile
impgal/mi
- impgal/mi
US gallons per mile
usgal/mi (USgal/mi, U.S.gal/mi)
As above with the us
vs US
vs U.S.
- usgal/mi
The mpgUS
, mpgU.S.
, USgal/mi
vs U.S.gal/mi
, km/L
, L/100 km
and L/km
variants work within combinations also (making 36 combinations in total).
FORÇA
Watts, kilowatts, milliwatts, etc. are supported. As is horsepower (English & metric). Use standard abbreviations as input code (lowercase hp for horsepower, for example)
DENSITAT DE POBLACIÓ
unitat
unitat-
codi
notes
combinacions
inhabitants per square kilometre
PD/sqkm
PD
stands for population density, i.e. humans (inhabitants)
- PD/sqkm PD/sqmi
per square kilometre
/sqkm
Used when the word 'inhabitants' would be inappropriate.
- /sqkm /sqmi
inhabitants per hectare
PD/ha
- PD/ha PD/acre
per hectare
/ha
- /ha /acre
inhabitants per square mile
PD/sqmi
PD
stands for population density, i.e. humans (inhabitants)
- PD/sqmi PD/sqkm
per square mile
/sqmi
Used when the word 'inhabitants' would be inappropriate.
- /sqmi /sqkm
inhabitants per acre
PD/acre
- PD/acre PD/ha
per acre
/acre
- /acre /ha
COST PER UNITAT DE MASSA
unitat
unitat-
codi
notes
combinacions
dollars per pound
$/lb
"$" can mean US$, HK$, etc.
- (none)
dollars per kilogram
$/kg
- (none)
dollars per troy ounce
$/ozt
12 troy ounces in 1 troy pound
- (none)
Unitats múltiples: 1 ft 5 in
En l'entrada
Base document #Input multiples lists options for multiple unit input (like ft,in). It can catch predefined sets only (units that can be subdivided, e.g. yd into ft):
{{convert|1|yd|2|ft|3|in}}
→ Plantilla:Convert/yd
{{convert|2|ft|3|in|cm}}
→ Plantilla:Convert/ft
{{convert|1|lb|5|oz|g}}
→ Plantilla:Convert/lb
En la sortida
Available multiple-unit output options predefined, like ftin
and ydftin
. The full list is at #Output multiples.
{{convert|2|m|ftin}}
→ Plantilla:Convert/m
{{convert|2|m|ft in}}
→ Plantilla:Convert/m—using a space, returns the decimal point
{{convert|2|m}}
→ Plantilla:Convert/m—the default
- See also
- {{hands}} a length used to measure horses.
'per' unitats: kg/hl
When using a slash (/
), a unit like kg/hl
is recognized as kilograms per hectolitre and will be converted with other mass/volume units.
{{convert|1000|kg/hl}}
→ Plantilla:Convert/kg/hl
Moneda per unitat: $/mi, $/km
Using currency symbols in a $ per unit value, you can convert the per-unit:
{{convert|10|$/mi|$/km}}
→ Plantilla:Convert/$/mi
- You can set the unit in both values using
|$=€
:
{{convert|10|$/mi|$/km|$=€}}
→ Plantilla:Convert/$/mi
You can not convert the currency. This outcome combination is not possible: $15 per mile (€8.6/km)
Llista de paràmetres
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 sigfig
|adj=ri1
Round input with precision 1
Rounding and sigfig
|adj=ri2
Round input with precision 2
Rounding and sigfig
|adj=ri3
Round input with precision 3
Rounding and sigfig
|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|x=...
User-specified text before input and output units
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 sigfig
|round=25
Rounds calculation to the nearest multiple of 25
Rounding and sigfig
|round=each
In a range, each number is rounded by the default rounding
Rounding and sigfig
|sigfig=N
Round output number to N significant figures (N is a positive integer)
Rounding and sigfig
|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 sigfig
|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 sigfig
TemplateData
Aquesta és la documentació dels paràmetres de la plantilla utilitzada pel nou editor visual.
Convert
Converts measurements to other units.
Paràmetre Descripció Tipus Estat value 1
the value to convert
Nombre opcional from unit 2
Línia opcional to units 3
the unit to convert into
Línia opcional precision or suffix 4
significant digits after decimal dot or, if negative, exponent of ten
Nombre opcional link units lk
“on” all, “in” input, “out” output or “off” no units
- Per defecte
- off
Línia opcional abbreviation abbr
display for the units: “on” unit symbols, “off” all unit names in full words, “in” input unit symbol, “out” abbreviated output units, “values” no units at all
- Per defecte
- out
Línia opcional spelling sp
“us” display U.S. spelling of unit names
Línia opcional adjective adj
adjective form (singular unit name appended by hyphen) “on” or “mid” to put conversion at end
Línia opcional conversion disp
display conversion result: “or” after ‘or’, “x” with custom prefix and suffix, “b” in parentheses, “table”/“tablecen”, “output only” alone, “output number only” alone and without unit, “unit” not at all but input unit; if the value is a number it is used as precision
- Per defecte
- b
Línia opcional ordering order
“flip” returns converted value first, input value second.
Línia opcional significant figures sigfig
number that sets the number of significant figures
Nombre opcional rounding output round
“5” rounds the output number to nearest multiple of 5, “25” to nearest multiple of 25, “each” rounds each number in a range
Línia opcional thousands separator comma
Sets or suppresses thousand separator in the numbers. “off” = no separator; “gaps”: use space not comma; “5” and “gaps5”: only add separator when number > 5 positions (10,000 or more)
- Per defecte
- on
Línia opcional sort key sortable
“on” generates a hidden sort key
Línia opcional
Vegeu també
- {{Unitats del SI}}
{{Convert}} help, documentation and maintenance * template:Convert
Help Documentation Units
List of units (abriged)
Full list of units
Error categories Modules Related