Template talk:Convert/Archive October 2008


cubic inch output

Over at the automobiles project, we have a convention specifying that the correct unit abbreviation for the English expression of an engine's piston displacement is in3. {{convert}} does not seem able to provide compliant output when converting engine displacement from litres. It'll give "cu in" or it'll give "CID" — neither of which is accepted in the automobile project — but it will not give in3, as it seems. Perhaps I'm not aware of the correct syntax? So far I've tried {{convert|3.7|L|CID}}, {{convert|3.7|L|CID|abbr=on}}, {{convert|3.7|L|in3}}, {{convert|3.7|L|in3|abbr=on}}, {{convert|3.7|L|cuin|abbr=on}}, and {{convert|3.7|L|cuin}}, without success. If there does not presently exist such a provision, I would suggest altering the behaviour of the CID argument such that it outputs in3. Thanks in advance!—Scheinwerfermann (talk) 20:27, 26 September 2008 (UTC)

This sounds to me like a case for '|in3|' as was predicted a while back. Lightmouse (talk) 10:42, 27 September 2008 (UTC)
CID makes sense in an automotive context, but in any case, I thought there were auto specific templates for the automotive project. —MJCdetroit (yak) 04:29, 28 September 2008 (UTC)
Automobile project protocol permits the use of either auto or convert templates. The present issue may become moot if there develops consensus to use cu in rather than in3, but for now the problem remains. For now, can anyone please comment responsively on the question at hand? Thanks. —Scheinwerfermann (talk) 15:42, 2 October 2008 (UTC)

Three dimensions?

Is there any possibility that three dimensions could be accepted in future ({{convert|3|x|4|x|5|ft|m}})? Chris Cunningham (not at work) - talk 10:40, 3 October 2008 (UTC)

Not impossible, of course, but not in the near future (unless someone else is up for it) and perhaps with this template (maybe a {{convert3D}} ... I dunno) meantime how about {{ft to m}}? JIMp talk·cont 19:17, 3 October 2008 (UTC)

Output with no comma?

This question is close to this so Ill add it for this same section, is it possible to output a value without comma, like {{convert|1910|cc|abbr=on|sp=us}} 1,910 cc (117 cu in) as we seems to have convention in WP:CAR to express it without comma. This could also give in3 output --— Typ932T | C  09:26, 27 September 2008 (UTC)

In my opinion, regardless of any convention agreed upon in any project, the MOS will supersede that. Specifically, the WP:MOSNUM#Large_numbers states that "commas are to be used" and "not spaces or dots". I interpret that to mean that 1,910 cc would be correct while 1910 cc would not. It appears that this part of WP:CAR should be changed to comply with the MOS. Since this template tries not to violate the MOSNUM, I think that the answer will be no. Sorry. —MJCdetroit (yak) 16:28, 2 October 2008 (UTC)
I disagree with you; there are valid reasons why specific projects may have some conventions that differ from the provisions in MOSNUM, and since this template is used across all of Wikipedia, it should contain provisions for generating output in accord with such valid project-specific conventions. —Scheinwerfermann (talk) 16:58, 2 October 2008 (UTC)
The whole point of having a MoS is so articles across the spectrum of Wikipedia have a unified format. The Projects are expected to abide by the site as a whole, not the other way around. If that was the case, every project would be clamouring to set up their own style rules...I can just imagine how five different U.S. State projects might approach any given problem. Huntster (t@c) 22:52, 2 October 2008 (UTC)
There's no need to exaggerate or raise the spectre of chaos and disarray that doesn't actually exist and likely never will. Yes, the MOS lays out uniform provisions for stylistic conventions that are generally to be used across all of Wikipedia, and that is an essential, good, and necessary part of the structure of Wikipedia, but flexibility is another important part of the structure of Wikipedia. Fact is, there are legitimate reasons why certain projects might choose to use slightly different conventions in certain specific kinds of cases. Like most of the world, this is not a yes/no, either/or, black/white situation. We neither promulgate nor enforce rigid, zero-tolerance strictures here; Wikipedia is not a legal system. These what we're working on are not regulations or rules, they are conventions and guidelines. —Scheinwerfermann (talk) 00:14, 3 October 2008 (UTC)
i agree that there always exists the special case, but ultimately side on the notion that convert should not be asked to facilitate the special case. Because it seems you are only seeking to convert a small number of formats specific to your topic, i don't see why you need to use convert at all, and can't use a {{convert-cars}} template. however, i wouldn't mind seeing convert have an option to output a single numbered conversion in raw format for use in other templates, to reduce redundant math, something like:
{{convert|10|ft|in|2|raw=yes}}
rendering as:
3.05
Happy editing! -16:38, 5 October 2008 (UTC)

Grams to Ounces and Troy Ounces

These samples works:

  • 31.103 g (1.10 oz)
  • 31.103 g (1.00 ozt)

Why this one does not?

  • 31.103 g (1.10 oz; 1.00 ozt)

Thanks, Miguel.mateo (talk) 02:56, 3 October 2008 (UTC)

Done. JIMp talk·cont 19:21, 3 October 2008 (UTC)
Thanks, that was fast! Miguel.mateo (talk) 01:29, 4 October 2008 (UTC)
Sorry to bring more bad news, the following samples do not work either:
  • 31.103 kg (68.57 lb; 999.98 ozt)
  • 31.103 g (1.00 ozt; 1.10 oz)
Can you please take a look again? Thanks, Miguel.mateo (talk) 01:52, 4 October 2008 (UTC)

Done too ... note that it's not as if everything should work, each of these combos have to be created individually so there'll always be combos that you can't use, however, if you need any, just ask, they're not hard to create. JIMp talk·cont 22:28, 5 October 2008 (UTC)

using the symbol m² instead of m2

could we change the way convert formats "squared" to use the symbols which are nicer formatting wise as they don't offset linespacing? -ΖαππερΝαππερ BabelAlexandria 16:42, 5 October 2008 (UTC)

What are you using (browser, OS, etc) that has <sup> and <sub> damaging linespacing? This is an issue that was solved almost a year ago with a CSS fix. Huntster (t@c) 19:33, 5 October 2008 (UTC)

It used to use the prefab characters but due to a guideline change this was revised. JIMp talk·cont 22:25, 5 October 2008 (UTC)

Request (moved from User talk:TomTheHand)

Could you add to the template the option of using the British "gramme" spelling? Urhixidur (talk) 14:01, 8 October 2008 (UTC)

British spelling permits 'gramme' or 'gram' but 'gram' appears to dominate in Britain now, at least going by official usage:
See also:
Lightmouse (talk) 14:48, 8 October 2008 (UTC)

It is ever going to be used? JIMp talk·cont 00:07, 9 October 2008 (UTC)

I think the 'gram' spelling in the convert template is adequate for all purposes in English including British English. But that is just based on my limited knowledge. I am open to persuasion, I wonder what Urhixidur had in mind. Lightmouse (talk) 10:23, 12 October 2008 (UTC)

Turn off units

Can you add a function so that it turns off the units. That way it's easier to list in a table like this? Perhaps have a parameter units=off. Thanks. --Wizard191 (talk) 16:17, 12 October 2008 (UTC)

The table on the main page says:
Use in a table... attach |disp=table Note: For use in tables the template must start on a new line after a pipe. Only the number will be displayed unless you set |abbr=on, |lk=on, |lk=in or |lk=out. Example: here
Oilpanhands (talk) 16:42, 13 October 2008 (UTC)
That doesn't do what I'm asking. That adds another column with the new value. I want something that just displays the original value and then then converted value in parentheses with no units on either value (see my original example). --Wizard191 (talk) 16:47, 13 October 2008 (UTC)

Force a break

Is there a way to force a break in {{convert|4.21|x|4.88|in|mm|abbr=on}} between the end of the input (in) and the start of the output (mm) values? This: 4.21 in × 4.88 in (107 mm × 124 mm) proved to be a little long for a table. Thanks Oilpanhands (talk) 16:46, 13 October 2008 (UTC)

Aha. That gives me a good opportunity to remind people that:
  • Line breaks are good
I hope that we aren't doubling the problem for Oilpanhands by using nbsp between input and output values. Can anyone confirm this? Lightmouse (talk) 16:54, 13 October 2008 (UTC)

Is it possible to invert the output.

I was adding to an article a fact that a length was 10 metres long. Unfortunately, the rest of the article used imperial units first. Therefore I had to manually convert 10 metres into 33 feet, before I could use this template. Is there a way to reverse the output?

If not, I suggest a parameter reverse=yes which would display the passed parameter as the converted value.

  • {{Convert|10|m}} becomes 10 metres (33 ft)
  • {{Convert|10|m|reverse=yes}} becomes 33 feet (10 m)

MortimerCat (talk) 08:21, 12 October 2008 (UTC)

Just as a passerby, I too would find this quite useful. Sometimes I'm citing info from multiple sources where the article is in metric and I have customary units from another source and it's a pain to convert them just to use the {{convert}} template to bring it back again. --Wizard191 (talk) 16:09, 12 October 2008 (UTC)

This is not yet possible but is certainly on the to do list. However, it's a bit tricky & I don't quite have the time I once had (of course, if anyone else can figure out how to do it, great). JIMp talk·cont 07:57, 16 October 2008 (UTC)

Display pounders, pdrs, x-pounder or x-pdr using the lbs conversion please

For the naval and field artillery articles use the term pounders to describe an ordnance mass (in pounds).

  • 16 x {{convert|24|lb|kg|abbr=on}} → 16 x 24 lb (11 kg)

I would prefer if the result was: 16 x 24-pdr (11 kg) or 16 x 24 pounders (11 kg)

It would be clearer for presentation that there was an alternative display for the measurement lbs to be pdr (for pounders). For example the ship articles like HMS Victory and many others could be using this great convert template.

So I'm asking for a way of using the lb conversion but being able to output pdr instead.

--tony.rc (talk) 04:36, 16 October 2008 (UTC)

Done. How's it look? Anything odd?
  • {{convert|1|pdr}} → 1 pounder (0.45 kg)
  • {{convert|10|pdr|lk=in}} → 10 pounders (4.5 kg)
  • {{convert|100|pdr|adj=on}} → 100-pounder (45 kg)
  • {{convert|1000|pdr|abbr=on}} → 1,000 pdr (450 kg)
JIMp talk·cont 07:52, 16 October 2008 (UTC)

These 2 examples will works great with the adj=on because it drops the "s" allowing for the correct use of grammar when specifying the type of cannon (ie: longs or carronades).

  • 2 x {{convert|6|pdr|kg|adj=on|lk=in}} long guns → 2 x6-pounder (2.7 kg) long guns
  • 6 x {{convert|18|pdr|kg|adj=on|abbr=on}} carronades → 6 x18 pdr (8.2 kg) carronades

minor correction the preferred output: 6 x 18-pdr (8.2 kg) carronades is missing "-" for adj

These 2 examples will work great when you just want pounders or pdrs

  • 2 x {{convert|6|pdr|kg|lk=in}} → 2 x 6 pounders (2.7 kg)
  • 6 x {{convert|18|pdr|kg|abbr=on}} → 6 x 18 pdr (8.2 kg)

minor correction the preferred output: 6 x 18 pdrs (8.2 kg) is missing pdr"s" for values more than 1.

Also thanks for getting the range of values to work too:

  • {{convert|32|to(-)|42|pdr|kg}} → 32 to 42 pounders (15–19 kg)
  • {{convert|32|and|42|pdr|kg}} → 32 and 42 pounders (15 and 19 kg)


I've double checked other examples on the internet to make sure these minors changes are correct.
Thanks a lot for your help and these minor changes. --tony.rc (talk) 04:35, 17 October 2008 (UTC)

A tricky one (again)

I saw Template talk:Convert/Archive September 2008#A tricky one and wondered if it's possible to do a lb/sqft? Saw a use for it at Casimir Zeglen in the last sentence. CambridgeBayWeather Have a gorilla 04:47, 18 October 2008 (UTC)

Fathom unit can't use simple factions

Using the fathom unit with a integer value - correct

  • {{convert|4|fathom|0}} → 4 fathoms (24 ft; 7 m)
  • {{convert|4|fathom|m|2}} → 4 fathoms (7.32 m)


Converting to a fathom unit with a integer value - correct

  • {{convert|1|m|fathom|4}} → 1 metre (0.55 fathoms)
  • {{convert|1|ft|fathom|4}} → 1 foot (0.17 fathoms)
  • {{convert|1|fathom|m|4}} → 1 fathom (1.8288 m)
  • {{convert|1|fathom|ft|1}} → 1 fathom (6.0 ft)


Fathom unit using factions - wrong

  • {{convert|4+3/4|fathom|0}} → 4+34 fathoms (29 ft; 9 m) (wrong)
  • {{convert|4+3/4|fathom|2}} → 4+34 fathoms (28.50 ft; 8.69 m) (wrong)
  • {{convert|4+3/4|fathom|4}} → 4+34 fathoms (28.5000 ft; 8.6868 m) (wrong)

The correct answer for: 4.75 fathoms (28.5000 ft; 8.6868 m) however using ¾ factions will not work

Using inches unit with the same ¾ faction - correct

  • {{convert|10|ft|5+3/4|in}} → 10 feet 5+34 inches (3.194 m)

I would like the fathom unit to use simple factions just like inches does.
tony.rc (talk) 06:14, 21 October 2008 (UTC)

Why doesn't lb to kg & stlb work within an infobox?

{{convert|110|lb|kg stlb|abbr=on}}........110 lb (50 kg; 7 st 12 lb)

Height5 ft 4 in (1.63 m)

Raptus Regaliter Cattus Petasatus (talk) 15:00, 21 October 2008 (UTC)

On that topic, why on earth would you want to include the weight of an American person gone missing in Aruba into stones? I would really appreciate it if you undid that edit so that I didn't have to waste one of my reverts on it.—Kww(talk) 15:45, 21 October 2008 (UTC)
Because not everyone thinks as narrowly as you do. Raptus Regaliter Cattus Petasatus (talk) 16:19, 21 October 2008 (UTC)
Please refrain from insulting me, and answer the question.—Kww(talk) 16:50, 21 October 2008 (UTC)
Meaning that you may only think of someone's weight in terms of pounds, while Pierre thinks in terms of kilos, and I may think of someone's weight in stones, but that doesn't answer the technical question of why that doesn't work in that infobox.Raptus Regaliter Cattus Petasatus (talk) 18:41, 21 October 2008 (UTC)
It's definitely a problem with the "kg stlb" param. Omitting it works fine, as shown in the current revision of the article. Chris Cunningham (not at work) - talk 16:19, 23 October 2008 (UTC)

I've noticed this before but don't know exactly what it does this. JIMp talk·cont 09:31, 27 October 2008 (UTC)

Negative zero

I apologize if this has already been mentioned -- I scanned the archives and couldn't find it. {{convert|-18|°C|°F|0}} returns −18 °C (0 °F), a negative zero. Unless I don't completely understand the vagaries of Fahrenheit, I think that's an issue. — MusicMaker5376 18:28, 24 October 2008 (UTC)

No, it is an issue. JIMp talk·cont 09:30, 27 October 2008 (UTC)