Template talk:Convert/Archive May 2014

Template:Circle of latitude
Hi, I'm raising this here because the talk page of the template itself does not exist, and I see that there is some traffic here of people who may be able to help with it, as it is in the "Conversion templates" category.

In the articles Arctic Circle and Antarctic Circle, the template "Circle of latitude" is invoked to supply the figure for latitude, which is said in the articles to be as of 2012. However, there is no template documentation to indicate when the figure was last updated, and nothing to indicate that if one does change it then one should also change the "as of" date that is mentioned in articles that use it. In fact, it seems from the edit history that the figures have not been updated since 2010. The articles Tropic of Cancer and Tropic of Capricorn, which use the same template,* say that the date is as of 2014.

I think maybe in 4 years there could have been a small change to the least significant digit at the accuracy quoted, which is not a huge deal at the moment, but nevertheless the way this is currently organised is obviously very unsatisfactory for maintenance. Ideally, the "as of" date should be maintained once, in the template, and this should be automatically inserted into articles that use it. 86.169.185.1 (talk) 02:14, 8 May 2014 (UTC)


 * Sorry, I'm wrong about this. Tropic of Cancer and Tropic of Capricorn don't use the template, even though it was clearly intended that they should, using the syntax "Circle of latitude|Tropical". I don't know why that is. 86.169.185.1 (talk) 02:41, 8 May 2014 (UTC)
 * I guess you know about using "what links here": Special:WhatLinksHere/Template:Circle of latitude. That shows a total of eight pages using the template. You might find someone at WT:WikiProject Geographical coordinates who could offer some useful thoughts (I found that by looking at the headers at the top of Talk:Circle of latitude). Johnuniq (talk) 06:13, 8 May 2014 (UTC)

Double conversion, convert/spell
For Seboomook Lake and Saint John Railroad, instead of 8 to 10 cord 8 to 10 cord instead of  8 to 10 cord. Peter Horn User talk 17:00, 9 May 2014 (UTC)
 * see the last time you asked. Frietjes (talk) 17:13, 9 May 2014 (UTC)
 * My grandson Jozua tells me that I have the memory of a gold fish. Peter Horn User talk 02:29, 13 May 2014 (UTC)

fraction slash
{Convert} now accepts the slash in fractions. This is the keyboard slash. In typography, and in our frac, another character is used: $3 1/2$. That is.
 * 3+1/2 m &rarr; 3+1/2 m

We could consider that if it is correct in typography, {convert} should accept it as correct number input. I met this when I did a copy-paste with a frac number. There also exists, which I have not researched yet. I note that with fractions input, the ambivalent "3-1/2" input is still accepted: 3-1/2 m. -DePiep (talk) 10:22, 13 April 2014 (UTC)
 * 3+1⁄2 m &rarr; 3+1⁄2 m -- U+2044 used
 * Sorry to be a wet blanket, but unpicking the code that parses input numbers, including fractions, still is unappealing. One problem is that there are several alternatives that might be useful once or twice—if supporting fraction slash, why not support  and   because they look the same when viewing wikitext? I would have thought that using fractions for input was fairly rare, and since an editor has to insert a   before the numerator, they may as well also use a plain slash. I agree that accepting   to mean   is a bad idea. I'll put that on my to-do list. Johnuniq (talk) 02:29, 14 April 2014 (UTC)
 * As one can read, no "problem" involved. I only want to introduce the point that when some text is an accepted number, {convert} should have to eat it as a number. This is a next design step, after the (great & good) design step to repleace {convert}-wikitext 1:1. So, now that we are free of wikitext, we can propose to redesign the module. -DePiep (talk) 00:57, 26 April 2014 (UTC)


 * Fractions are more rare than dash ranges: Indeed, fractions are extremely rare in conversions, when compared to dash-ranges, although ironically, in real-world text, the text-slashes are 3x times more common than dashes (as in "April/May"). Consequently, {convert} has needed to handle unicode en dash "–" in several pages. So rather than support &frasl input, the higher priority is for dash-ranges or wp:non-breaking hyphen (&8209), as follows:
 * {convert|6|-|7|m|ft}} = 6 - 7 m, with hyphen
 * {convert|6|–|7|m|ft}} = 6 –, with dash
 * {convert|6|‑|7|m|ft}} = 6 ‑, with wp:NBHYPHEN
 * {convert|6|&amp;#8209;|7|m|ft}} = 6 &#8209;, with wp:NBHYPHEN
 * Currently, when people request unusual formats, we suggest they hand-code the conversion with whatever slashes or other characters are needed in the output. -Wikid77 (talk) 05:29, 14 April 2014 (UTC)
 * No priority or tradeoff was claimed here. It is just that the (higher) aim should be to accept accepted numbers. -DePiep (talk) 17:18, 14 April 2014 (UTC)


 * For more accepted numbers, use {convert/old}: The prior, wikitext-based convert/old allows other forms of accepted numbers, such as "2+3" or "pi" metres. Compare:
 * {convert|2+3 |m |ft }} = 2+3 m, with 2+3
 * {convert/old |2+3|m|ft}} =, with 2+3
 * {convert|pi |m |ft }} = pi m, with pi
 * {convert/old|pi|m|ft}} =, with pi
 * {convert/old|2*pi|m|ft}} =, with 2*pi
 * {convert|&pi;|m |ft }} = &pi; m, with &pi;
 * {convert |2+1/2 |ft |3/4 |in}} = 2+1/2 ft
 * {convert/old|2+1/2|ft|3/4|in}} =
 * To allow a larger variety of fraction inputs, then create a {convert/frac} wp:wrapper template to transform other fraction symbols into {convert} syntax. -Wikid77 (talk) 11:55, 14 May 2014 (UTC)
 * About the last example: could not find this option in Help:convert (current documentation). The /old outcome is wrong or misleading.  -- it is now. -DePiep (talk) 12:13, 14 May 2014 (UTC) 
 * Help:convert documents that is to be used in calculations:
 * undefined in &rarr; undefined in

-DePiep (talk) 12:09, 14 May 2014 (UTC)

Wrap behavior
What is the wrap behavior (default & options)? Especially between the basic two output units (their joint). Internally a measurement is nowrap, OK. Help page gives option br, which is clear. -DePiep (talk) 12:59, 15 May 2014 (UTC)
 * The details are ugly, but something should be documented. You are possibly only asking about Help:Convert, but other cases also need documentation, so I have added the "Separators" section below with nearly all the details, I think. The notes should be recast in terms of wrapping, and perhaps nowrap should be mentioned. I'll put some of this at Help:Convert later, but most of it should be in an "advanced" section for anyone wanting details because including all this in the standard documentation would make too much of an impenetrable mess. Johnuniq (talk) 06:52, 16 May 2014 (UTC)
 * Great, as always. I was expecting a yes/no answer ;-). I've shuffled your points, as a proposal (towards documentation). -DePiep (talk) 10:44, 16 May 2014 (UTC)

Wrapping and line breaking
Wrapping is possible where a regular space (" ") is used. Nowrap is enforced by using nonbreaking space, tying and keeping text elements together.
 * may break after "3"
 * will not break after "3"

In the examples below, a  is shown as "" (a red underscore): " ".

A line break overrules any nowrap setting at that point.

The separator between the value and the unit can be a space or a nonbreaking space :
 * Within a measurement (value+unit)
 * When a unit is abbreviated (symbol is shown), the separator is.
 * → 12 m


 * When a unit is not abbreviated (name is shown), the separator is a space.
 * → 12 m
 * This can be set (overruled) to be  by j (for 'join').
 * → 12 m


 * Some units do not have a symbol and always use a space (such as acre).
 * → 3 acre


 * Except, option  ("join") forces the separator to be.
 * → 3 acre


 * Except,  is always used when a measurement is in multiple units.
 * → 1 ft
 * → 2 m


 * Except, if option  is used and the unit is not abbreviated, the separator is a hyphen ("-").
 * → 2 m


 * When the name of a number is used,  is used as the separator between the value and the name. For example, a measurement spelled as "12 million metres" has   before "million" and a space afterwards.
 * → 12 e6m


 * Between measurements
 * A space is used as the separator in a join between the first and second measurement.
 * → 3 ft


 * Except for the special cases before "/" and before "["&thinsp;:
 * → 12 in ( before "/")
 * → 12 in ( before "[")


 * Multiple output measurements (by listing units) always use a space between measurements ("; " has a space after ";").
 * → 2 acre


 * Between components of a measurement (e.g., in a range; between foot–inch)
 * A measurement in multiple units always uses a space between components ("1 foot 6 inches" has  before the unit names, but a space after "foot").
 * → 1 ft


 * In a range, spaces are generally used to separate items. For example, "to" and "or" have a space before and after in the following.
 * → 12 to 20 in
 * → 12 or


 * The ranges  and   and   always use  :
 * → 12 +/-
 * → 12 ,
 * → 12 xx


 * The "to-" range (same as "to(-)") is an exception. When a unit is not abbreviated, "to" has  before and a space after.
 * → 12 to-


 * The "x" range is an exception. When a unit is abbreviated, "×" has a space before and  after.
 * → 12 x


 * Overrule by setting a line break
 * Parameter br adds a forced line break between measurements; brackets are omitted.
 * → 12 m

To see the wikicode result of the convert template: put your  code into Special:ExpandTemplates and then preview by clicking.
 * Preview wikicode

Johnuniq (talk) 06:52, 16 May 2014 (UTC)
 * Proposal by edit: use terms "measurement", "component" with consistent meaning, and group existing points. Added ;label subheaders. Add "nowrap" starting point. -DePiep (talk) 10:40, 16 May 2014 (UTC)
 * Same for section title: "Wrapping and line breaking". Use a singular meaning in documentation helps. -DePiep (talk) 10:47, 16 May 2014 (UTC)
 * We could write the examples like 2metres(6ft7in) . -DePiep (talk) 10:53, 16 May 2014 (UTC)
 * Started the join & linebreak entries. Could use a check for completeness. -DePiep (talk) 07:55, 17 May 2014 (UTC)
 * Formatting. A rule has the bullet, the examples indent. (prepare for help documentation) -DePiep (talk) 07:07, 19 May 2014 (UTC)
 * More formatting and ce, Introduced the form for nbsp. -DePiep (talk) 08:07, 19 May 2014 (UTC)


 * Johnuniq@undefined About the first three "Except, ..." rules above. As they show now, it is not clear for which rule they are an exception: only #3 "Some units do ..", or for #1, #2, #3 together?
 * I think this can be made unambiguously clear by reordering the bullets and/or indenting the exceptions. Or if you simply answer here, I can do the layout. (Of course I could deduct this by trials, but that would be a tough job). -DePiep (talk) 08:07, 19 May 2014 (UTC)

I've added this section to Help:Convert (new). Whenever an "advanced" help or documentation is developed, parts could move there. -DePiep (talk) 11:07, 25 May 2014 (UTC)
 * Thanks. Johnuniq (talk) 11:25, 25 May 2014 (UTC)

TonCwt_to_t links
does not link to long ton as in does in 19 LT 19 LT. And cwt and t are not linked at all. Why? Peter Horn User talk 04:41, 7 May 2014 (UTC)
 * I don't know, but the documentation at TonCwt to t specifies that behavior, saying it is traditional for certain locomotives. That template is used on 266 articles so it's probably not a good idea to change what it does without a wide discussion on the relevant wikiproject talk. Johnuniq (talk) 05:38, 7 May 2014 (UTC).
 * Traditional, or not traditional, I fail to understand how a blanket link to avoirdupois is very helpfull, unless one is prepared to scroll through the article. Separate links to long ton and long hundredweight would perhaps he more useful7helpful. Peter Horn User talk 17:38, 7 May 2014 (UTC)
 * For Locomotive No. 1,   Peter Horn User talk 04:23, 8 May 2014 (UTC)

I checked all usage of the template in articles as they were at 2 May 2014. The template is used 605 times in 251 articles. Almost all of them are like " ", and the only exceptions are: If you think the template should do something different, I suggest you copy this comment (edit it however you like) to the relevant wikiproject. Make a proposal for how the lk=on examples should look, and allow at least two days for comments. If no objections, reply here with a link to the discussion and someone will probably help to change the template. Johnuniq (talk) 06:03, 8 May 2014 (UTC)
 * GWR 1101 Class  →
 * Great Western Railway Power and Weight Classification  →
 * NER 38 Class  →
 * GWR 378 Class  →
 * After going systematically through VRLocos I found a number of additional exceptions. The usage is consistently inconsistent. Peter Horn User talk 14:02, 8 May 2014 (UTC)
 * PS what is the link to the relevant project page? Peter Horn User talk 14:05, 8 May 2014 (UTC)
 * OK,I posted at Template talk:Convert/TonCwt to t Peter Horn User talk 01:01, 9 May 2014 (UTC)
 * Any change to that template would affect the articles I listed above. Looking in the headers at the top of the talk page for each article shows the relevant wikiprojects. I would say that only WT:WikiProject Trains is active, and a proposal should go there. Show the current output from one of the above examples, and add the wikitext to show what you believe the result should be. Invite comments. If no objections in two days ask someone to change the template. Johnuniq (talk) 06:32, 9 May 2014 (UTC)
 * I put a post at Wikipedia talk:WikiProject Trains referring back to Template talk:Convert/TonCwt to t. Peter Horn User talk 12:28, 9 May 2014 (UTC)
 * And that is where there are additional posts/comments. Cwt is now linked,see above. Peter Horn User talk 14:03, 27 May 2014 (UTC)