![]() | This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
At Jack Cade's Cavern there is range of "6ft to 11ft 6in", is there a way to express this using a single {{ convert}}? I wasn't able to come up with anything that didn't produce an error or a range of 6-11ft with a precision of 6 decimal places, so I went with the inelegant "{{Convert|6|ft||abbr=on}} to {{Convert|11|ft|6|in|abbr=on}}". Thryduulf ( talk) 15:19, 8 January 2018 (UTC)
{{convert|1.83|to|3.5|m|ftin|abbr=on|order=flip}}
→ 6 ft 0 in to 11 ft 6 in (1.83 to 3.5 m)Is it possible to change the way that links are produced by {{
convert}}. In order to link to
chains, it is also necessary to link to
miles. Arguably there is no need to link to miles as it's a very common unit, whereas the chain is relatively obscure nowadays and mainly used in horseracing and on UK railways. Would it be possible to change the coding so that a link can be specified rather that the current options of none, in, out, and on. Looking to be able to code |link=chain
which would then link chains but not miles in the output value.
Mjroots (
talk)
09:12, 13 January 2018 (UTC)
{{convert|232|mi|50|chlk|km|2}}
→ 232 miles 50
chains (374.37 km)Some changes to the convert modules are in the sandbox, and I intend switching the main modules to use the sandbox soon.
This release removes or flags deprecated options per discussion here. There are no other changes.
disp=5
as deprecated. Any occurences should be replaced with round=5
. There are apparently no instances of disp=5 in articles (thanks Quondum). Flagging means that a large error message is shown in preview and an asterisk and tracking category appear in a saved article.&
with and
, for example {{convert|11|and|22|ft}}
.to-
with to(-)
, for example {{convert|11|to(-)|22|ft}}
.Remove | Replacement |
---|---|
abbr=comma |
comma=off
|
abbr=mos |
(omit) |
adj=1 |
(omit) |
adj=flip |
order=flip
|
adj=j |
(omit) |
adj=nocomma |
comma=off
|
comma=gaps5 |
comma=gaps or comma=gaps3
|
disp=/ |
disp=or
|
disp=2 |
disp=out
|
disp=flip5 |
order=flip|round=5
|
disp=nocomma |
comma=off
|
disp=s |
disp=or
|
disp=slash |
disp=or
|
disp=u2 |
disp=unit2
|
near=5 |
round=5
|
sortable=in |
sortable=on
|
sortable=out |
sortable=on
|
See New version (above) for rationale and to discuss.
Release notes for earlier versions are listed here. Johnuniq ( talk) 00:35, 9 January 2018 (UTC)
Documentation #Displaying parts of the result lists options to return parts of the result, for example to return the converted value only:
At the moment, there is no option to return the input value only. A workaround is this:
Would it be helpful if we add this option by parameter, say |disp=in
? In practical use, it would allow the editor to have the measurement rounded, spelled and formatted consistently by {{Convert}}. By theoretical interest, it would nicely complete the partial-output option list. I am not sure if these two points merit adding it. One could also note that {{
Val}} does value formatting too (though I have not checked for similar behavior and for completeness wrt the Convert unit list). Thoughts? -
DePiep (
talk)
09:05, 13 January 2018 (UTC)
|disp=input only
BTW, similar to |disp=output only
. (|disp=out
does the same, but is less confusing in reading). -
DePiep (
talk)
14:27, 13 January 2018 (UTC)disp
ostensibly selects various parts of a complete output format; this is not perfect because it tries to control too many facets of the output. This means that every option becomes mutually exclusive (e.g. one cannot select both |disp=unit2
and |disp=table
simultaneously). Adding |disp=input only
might rationalize the matrix of options a little, but surely we should be properly redesigning the parameters in a top-down fashion? It should be possible to migrate over a few years to new well-designed parameters through
AWB cleanup. In the long run, all of template complexity, maintenance and ease of use should improve. Any interest? —
Quondum
16:31, 13 January 2018 (UTC)
|order=flip
). It is up to Johnuniq wanting to spend time on this. -
DePiep (
talk)
18:47, 13 January 2018 (UTC)|format=%vn2%awide_[%n1%br%us1]
that will produce: 12 meter-wide [39<br/>ft].spell
, adj
, abbr
, disp=unit
) are all core to this; everything else (at a first glance), including displaying the input value, can in principle be done externally to the template with multiple invocations, and could be thought of as supporting convenience at a higher level. Providing such convenience should not come at the expense of fragility, such as is clearly the case with multicolumn output (disp=table
), but one convenience factor stands out as "belonging": the ability to re-use the same quantity without having to re-enter it (e.g. for the default "in (out)" format, and in tables, not necessarily in adjacent columns).The cat weighed {{convert|4|kg|lb|format=%vn1 (which in the US would be %vn2)}}
. We need a cleaner duplication mechanism, so that the formatting problem disappears, and all the page formatting mechanisms remain available. Surely wiki HTML supports page-local variables? —
Quondum
19:54, 14 January 2018 (UTC)
|disp=flip
, or the solution {{
Chembox}} uses in showing three temperatures C, F, K -- ask me). -
DePiep (
talk)
08:47, 15 January 2018 (UTC)
disp=flip
would be replaced by two outputs, the second of which is converted to the same units and precision as the input. The usual case would also be replaced by two outputs, the first of which takes its units and precision from the input.disp=out
. The current {{
convert}} would change invoke it, and would provide all duplication, ordering, formatting, etc., to look just as it does now. Ideally, things like disp=table
would be removed, and implemented using a completely different template or mechanism. —
Quondum
13:16, 15 January 2018 (UTC)German cars are limited to 250 km/h, not to "155 mph (249 km/h)". Please fix the template. -- 82.113.113.82 ( talk) 18:24, 15 January 2018 (UTC)
Anyone know what a "bar spoon" is? It's used as a unit by the International Bartenders Association (IBA). I wouldn't care except it's used as a unit in the infoboxes of many of our cocktail articles, Tommy's Margarita for example, and I'd like to supply a conversion to standard units. If it's defined on the IBA web site I sure can't find it. We have a bar spoon article but it's no help either, giving two possible values and no source citation. Kendall-K1 ( talk) 21:11, 15 January 2018 (UTC)
I poured myself a double Elijah Craig last night and did some research in my modest but high quality bartending library. I have come to the conclusion that there is no such unit of measure. The IBA publishes a set of rules for their competition, and it includes a list of definitions, but bar spoon is not among them. None of the bartending scholars of the last 150 years (Thomas, Craddock, Embury, DeGroff, Regan, etc) list it as a measure. Vendors who sell bar spoons list their capacities as anywhere from 1⁄2 to 1 tsp (2.5 to 5 ml). I will chalk this up to sloppiness on IBA's part (it wouldn't be the first time). Kendall-K1 ( talk) 13:26, 17 January 2018 (UTC)
Would it be possible to get linear analogues of the density conversions? I have need of kg/m, and I suspect I'm not the only one. Maury Markowitz ( talk) 02:24, 19 January 2018 (UTC)
{{convert|12|kg/m}}
→ 12 kilograms per metre (24 lb/yd){{convert|12|kg/m|lb/ft}}
→ 12 kilograms per metre (8.1 lb/ft){{convert|12|kg/m|lb/ft|abbr=on}}
→ 12 kg/m (8.1 lb/ft){{convert|12|kg/m|g/mm|abbr=on}}
→ 12 kg/m (12 g/mm){{convert|12|oz/in|g/cm|abbr=off}}
→ 12 ounces per inch (130 grams per centimetre)I'm using the "convert" template (which is really astonishingly useful, by the way) for a "range measurement" column within a table. I've got the output displaying on a separate line, with disp=br(). Alas, the output sometimes wraps at the hyphen. Is it possible to use a non-breaking hyphen (or similar functionality) within the "convert" template? Or is there a suggested workaround? Here's a sample of one of my table cell's contents: {{convert|13|-|22|lb|kg|abbr=on|disp=br()}}
Thanks.
Timbuk-2 (
talk)
01:23, 28 January 2018 (UTC)
{{convert|13|-|22|lb|kg|abbr=on|disp=br()}} 13–22 lb<br />(5.9–10.0 kg)
|- pactTOC8|center=yes|num=no|seealso=yes|refs=yes|nobreak=yes
![]() | This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
At Jack Cade's Cavern there is range of "6ft to 11ft 6in", is there a way to express this using a single {{ convert}}? I wasn't able to come up with anything that didn't produce an error or a range of 6-11ft with a precision of 6 decimal places, so I went with the inelegant "{{Convert|6|ft||abbr=on}} to {{Convert|11|ft|6|in|abbr=on}}". Thryduulf ( talk) 15:19, 8 January 2018 (UTC)
{{convert|1.83|to|3.5|m|ftin|abbr=on|order=flip}}
→ 6 ft 0 in to 11 ft 6 in (1.83 to 3.5 m)Is it possible to change the way that links are produced by {{
convert}}. In order to link to
chains, it is also necessary to link to
miles. Arguably there is no need to link to miles as it's a very common unit, whereas the chain is relatively obscure nowadays and mainly used in horseracing and on UK railways. Would it be possible to change the coding so that a link can be specified rather that the current options of none, in, out, and on. Looking to be able to code |link=chain
which would then link chains but not miles in the output value.
Mjroots (
talk)
09:12, 13 January 2018 (UTC)
{{convert|232|mi|50|chlk|km|2}}
→ 232 miles 50
chains (374.37 km)Some changes to the convert modules are in the sandbox, and I intend switching the main modules to use the sandbox soon.
This release removes or flags deprecated options per discussion here. There are no other changes.
disp=5
as deprecated. Any occurences should be replaced with round=5
. There are apparently no instances of disp=5 in articles (thanks Quondum). Flagging means that a large error message is shown in preview and an asterisk and tracking category appear in a saved article.&
with and
, for example {{convert|11|and|22|ft}}
.to-
with to(-)
, for example {{convert|11|to(-)|22|ft}}
.Remove | Replacement |
---|---|
abbr=comma |
comma=off
|
abbr=mos |
(omit) |
adj=1 |
(omit) |
adj=flip |
order=flip
|
adj=j |
(omit) |
adj=nocomma |
comma=off
|
comma=gaps5 |
comma=gaps or comma=gaps3
|
disp=/ |
disp=or
|
disp=2 |
disp=out
|
disp=flip5 |
order=flip|round=5
|
disp=nocomma |
comma=off
|
disp=s |
disp=or
|
disp=slash |
disp=or
|
disp=u2 |
disp=unit2
|
near=5 |
round=5
|
sortable=in |
sortable=on
|
sortable=out |
sortable=on
|
See New version (above) for rationale and to discuss.
Release notes for earlier versions are listed here. Johnuniq ( talk) 00:35, 9 January 2018 (UTC)
Documentation #Displaying parts of the result lists options to return parts of the result, for example to return the converted value only:
At the moment, there is no option to return the input value only. A workaround is this:
Would it be helpful if we add this option by parameter, say |disp=in
? In practical use, it would allow the editor to have the measurement rounded, spelled and formatted consistently by {{Convert}}. By theoretical interest, it would nicely complete the partial-output option list. I am not sure if these two points merit adding it. One could also note that {{
Val}} does value formatting too (though I have not checked for similar behavior and for completeness wrt the Convert unit list). Thoughts? -
DePiep (
talk)
09:05, 13 January 2018 (UTC)
|disp=input only
BTW, similar to |disp=output only
. (|disp=out
does the same, but is less confusing in reading). -
DePiep (
talk)
14:27, 13 January 2018 (UTC)disp
ostensibly selects various parts of a complete output format; this is not perfect because it tries to control too many facets of the output. This means that every option becomes mutually exclusive (e.g. one cannot select both |disp=unit2
and |disp=table
simultaneously). Adding |disp=input only
might rationalize the matrix of options a little, but surely we should be properly redesigning the parameters in a top-down fashion? It should be possible to migrate over a few years to new well-designed parameters through
AWB cleanup. In the long run, all of template complexity, maintenance and ease of use should improve. Any interest? —
Quondum
16:31, 13 January 2018 (UTC)
|order=flip
). It is up to Johnuniq wanting to spend time on this. -
DePiep (
talk)
18:47, 13 January 2018 (UTC)|format=%vn2%awide_[%n1%br%us1]
that will produce: 12 meter-wide [39<br/>ft].spell
, adj
, abbr
, disp=unit
) are all core to this; everything else (at a first glance), including displaying the input value, can in principle be done externally to the template with multiple invocations, and could be thought of as supporting convenience at a higher level. Providing such convenience should not come at the expense of fragility, such as is clearly the case with multicolumn output (disp=table
), but one convenience factor stands out as "belonging": the ability to re-use the same quantity without having to re-enter it (e.g. for the default "in (out)" format, and in tables, not necessarily in adjacent columns).The cat weighed {{convert|4|kg|lb|format=%vn1 (which in the US would be %vn2)}}
. We need a cleaner duplication mechanism, so that the formatting problem disappears, and all the page formatting mechanisms remain available. Surely wiki HTML supports page-local variables? —
Quondum
19:54, 14 January 2018 (UTC)
|disp=flip
, or the solution {{
Chembox}} uses in showing three temperatures C, F, K -- ask me). -
DePiep (
talk)
08:47, 15 January 2018 (UTC)
disp=flip
would be replaced by two outputs, the second of which is converted to the same units and precision as the input. The usual case would also be replaced by two outputs, the first of which takes its units and precision from the input.disp=out
. The current {{
convert}} would change invoke it, and would provide all duplication, ordering, formatting, etc., to look just as it does now. Ideally, things like disp=table
would be removed, and implemented using a completely different template or mechanism. —
Quondum
13:16, 15 January 2018 (UTC)German cars are limited to 250 km/h, not to "155 mph (249 km/h)". Please fix the template. -- 82.113.113.82 ( talk) 18:24, 15 January 2018 (UTC)
Anyone know what a "bar spoon" is? It's used as a unit by the International Bartenders Association (IBA). I wouldn't care except it's used as a unit in the infoboxes of many of our cocktail articles, Tommy's Margarita for example, and I'd like to supply a conversion to standard units. If it's defined on the IBA web site I sure can't find it. We have a bar spoon article but it's no help either, giving two possible values and no source citation. Kendall-K1 ( talk) 21:11, 15 January 2018 (UTC)
I poured myself a double Elijah Craig last night and did some research in my modest but high quality bartending library. I have come to the conclusion that there is no such unit of measure. The IBA publishes a set of rules for their competition, and it includes a list of definitions, but bar spoon is not among them. None of the bartending scholars of the last 150 years (Thomas, Craddock, Embury, DeGroff, Regan, etc) list it as a measure. Vendors who sell bar spoons list their capacities as anywhere from 1⁄2 to 1 tsp (2.5 to 5 ml). I will chalk this up to sloppiness on IBA's part (it wouldn't be the first time). Kendall-K1 ( talk) 13:26, 17 January 2018 (UTC)
Would it be possible to get linear analogues of the density conversions? I have need of kg/m, and I suspect I'm not the only one. Maury Markowitz ( talk) 02:24, 19 January 2018 (UTC)
{{convert|12|kg/m}}
→ 12 kilograms per metre (24 lb/yd){{convert|12|kg/m|lb/ft}}
→ 12 kilograms per metre (8.1 lb/ft){{convert|12|kg/m|lb/ft|abbr=on}}
→ 12 kg/m (8.1 lb/ft){{convert|12|kg/m|g/mm|abbr=on}}
→ 12 kg/m (12 g/mm){{convert|12|oz/in|g/cm|abbr=off}}
→ 12 ounces per inch (130 grams per centimetre)I'm using the "convert" template (which is really astonishingly useful, by the way) for a "range measurement" column within a table. I've got the output displaying on a separate line, with disp=br(). Alas, the output sometimes wraps at the hyphen. Is it possible to use a non-breaking hyphen (or similar functionality) within the "convert" template? Or is there a suggested workaround? Here's a sample of one of my table cell's contents: {{convert|13|-|22|lb|kg|abbr=on|disp=br()}}
Thanks.
Timbuk-2 (
talk)
01:23, 28 January 2018 (UTC)
{{convert|13|-|22|lb|kg|abbr=on|disp=br()}} 13–22 lb<br />(5.9–10.0 kg)
|- pactTOC8|center=yes|num=no|seealso=yes|refs=yes|nobreak=yes