This is an archive of past discussions about Template:Track gauge. 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.
About Named gauges. Here is an overview list of all names used. See the column edit proposal for proposed edit.
Background: the linked-to name should be recognised (e.g., irish). Recognised names should link too (e.g., scot); abbreviations may be written in long form (e.g., provincial).
Proposal.
With named gauges, like "standard gauge", we have two options.
1. Use name as input: {{RailGauge|standard}} → 1,435 mm (4 ft 8+1⁄2 in)
I propose to add more names that should be recognised as input: scotch, scottish, victoria, victorian, provincial, irish, indian, iberian, toronto.
2. We can show a link to a gauge page, using |al=on|allk=on:
{{RailGauge|1435mm|al=on|allk=on}} → 1,435 mm (4 ft 8+1⁄2 in) standard gauge
I propose to add these links for all named gauges: scot and the newly addded names (see 1. above).
Also, these links should not be a redirect: prov should nopt lead to Provincial gauge (a Redirect), but directly to Indian gauge.
3. "standard gauge" and "metre gauge" should not be capitalised, it is not a proper name.
4. The names should not wrap (especially not in infoboxes). The space right before the name is always open for wrapping, not an NBSP. (see test table, columns are set extra tight to show this).
These proposals are in the table. Changes are notes in the "edit proposal" column. The rightmost column shows the sandbox (test) version. -DePiep (talk) 00:33, 20 February 2013 (UTC) Added: "standard gauge" link in lowercase. -DePiep (talk) 09:57, 20 February 2013 (UTC); adding nowrap note -DePiep (talk) 20:37, 21 February 2013 (UTC) adding metre to be lowercase. -DePiep (talk) 10:28, 22 February 2013 (UTC) add Toronto -DePiep (talk) 11:37, 23 February 2013 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
Question: This looks very good, and I was about to update the main template, but I noticed in the diff that 925 gauge would be removed. I couldn't see any mention of that change above - is that intentional, and might it break anything? Best — Mr. Stradivarius♪ talk ♪06:16, 2 March 2013 (UTC)
Good catch. Added, to testcases too (Line 925mm was added after I took the source code to the sandbox). The change now looks like: diff. -DePiep (talk) 11:15, 2 March 2013 (UTC)
Already in the sandbox: 3 ft 2 in (965 mm). Some more changes in there, I'll make a list of the proposals here shortly, to discuss. -DePiep (talk) 21:50, 6 March 2013 (UTC)
I think that we need to see if the changes made to sandbox are to be deployed before making these changes or we may start to get things out of step. Keith D (talk) 00:43, 10 March 2013 (UTC)
This single change is in the sandbox, and tested with visible results. One can oppose or discuss this single addition below. Please point issues you see. -DePiep (talk) 00:53, 10 March 2013 (UTC)
Added to the sandbox: 28.08 mm (1.106 in). I will check to put metric first. Formal proposal for all sandbox changes to follow here. -DePiep (talk) 22:09, 6 March 2013 (UTC)
I think that we need to see if the changes made to sandbox are to be deployed before making these changes or we may start to get things out of step. Keith D (talk) 00:45, 10 March 2013 (UTC)
This single change is in the sandbox, and tested with visible results. One can oppose or discuss this single addition below. Please point issues you see. -DePiep (talk) 00:53, 10 March 2013 (UTC)
I propose the next changes to the template. All these changes are made in the sandbox, and tested. If we agree in this, I'll prepare an "edit protect" request.
When a gauge is repeated in a section or table: we can prevent mentioning the 2nd measure (the conversion) again. Setting disp=1 allows us to use exactly the same RG format without repeating the conversion.
Wrap breaks (re)defined: 1. Never within a single measure (imp, met) 2. Not within a gauge name 3. Allow before gauge name 4. If wrap=y, allow after the separator (space or /).
Unknown gauge: The red error text does not appear any more. Input is shown as it is. But the page is still listed in the category. This way, the template can stay on the page, and we catch this unknown gauge (page) for improvement.
Internally, template workings have changed: 1. Pure measure strings (imp, met) are made just once 2. Then a subtemplate "composes" the whole (sequence, wrappings, separator, etc.) into the output. Added parameters |dflt1= and |first= to handle the sequence. Each entry has an "id" value (the gauge in mm) to help checking and sorting.
1945 mm Change fraction. By 1⁄16 is more usual in imperial. Current x+23⁄40=1945.005 mm, to be x+9⁄16=1944.688 mm. So within 0.5 mm, close enough.
Brunel Add name for gauge, imperial measure first.
BosnianImperial Add name for gauge
I wonder: is this word "imperial" really a name for the gauge, or just a saying of by imperial measure (with 2 mm diference)? -DePiep (talk) 18:36, 10 March 2013 (UTC)
Spaces in input Input with spaces is recognised (spaces are stripped).
0 in Output friendly. Situations like "0 1⁄16 in": no need to add the zero any more (to get the fraction shown). Some six gauges are affected (I have removed "0 in" in their output).
Display only one measure Output friendly. When a gauge is repeated in a section or table: we can prevent mentioning the 2nd measure (the conversion) again. Setting disp=1 allows us to use exactly the same RG format without repeating the conversion.
First measure Metric or imp first. All gauges have a default sequence defined (not changed). We can force a sequence by setting first=met or first=imp.
Wrap breaks Wrap breaks are (re)defined: 1. Never within a single measure (imp, met) 2. Not within a gauge name 3. Allow before gauge name 4. If wrap=y, allow after the separator (space or /).
Easier to link Link to named gauge. To give the link to the named gauge, al=on|allk=on was needed. Now only allk=on is enough (also by logical sense)
Unknown gauge: no error When an unknown gauge is entered, the red error text" does not appear any more. Input is shown as it is. But the page is still listed in the category. This way, the template can stay on the page, and we catch this unknown gauge (page) for improvement.
Template internals Internally, template workings have changed: 1. Pure measure strings (imp, met) are made just once 2. Then a subtemplate "composes" the whole (sequence, wrappings, separator, etc.) into the output. Added parameters |dflt1= and |first= to handle the sequence. Each entry has an "id" value (the gauge in mm) to help checking and sorting. The testcases should prove that the template works as expected.
I will add the name "Pennsylvania" for 62.25in and 62.5in to the proposal (and tests, to be sure).
I understand that Pennsylvania input should be recognised (so not the full P.T.G. name is needed for input). But we can have only one input hit: "Pennsylvania" input will show (I say) the 62.25in output. When asked |allk=on both inputs 62.25 and 62.5 input will link to the PTG page. -DePiep (talk) 22:54, 9 March 2013 (UTC)
Done. Thanks as always. The template is awfully slow to load, though - have you considered porting it to Lua? I'm still getting my head round all the various technical aspects, but as I understand it mw.loadData has been provided for cases like this one, and using it should provide a big performance increase. — Mr. Stradivarius♪ talk ♪08:07, 25 March 2013 (UTC)
I have added disp=or to use "or" as a separater e.g. {{railgauge|1000mm|disp=or}} → "1,000 mm or 3 ft 3+3⁄8 in". JIMptalk·cont11:14, 18 April 2013 (UTC)
...but it should be changed into: 3 ft 3+23⁄32 in (calculates to 1008.8563 mm, correct). It was originally defined in metric, so we should calculate the inches; not a nominal inch measure, if I understand it well. -DePiep (talk) 10:16, 21 June 2013 (UTC)
Double check {{convert|1009|mm|ftin|abbr=on}} 1,009 mm (3 ft 3.7 in) or {{convert|1.009|m|ftin|abbr=on}} 1.009 m (3 ft 3.7 in). So it should be corrected, asap, to 3 ft 3+23⁄32. Peter HornUser talk00:43, 29 June 2013 (UTC)
1587.50 should be rounded upwards for being 0.50, I'd say. A 0.4999 should go downward. If I am right, then 1588 is OK. -DePiep (talk) 13:12, 27 June 2013 (UTC)
We should alway require the input unit (that is: mm, in, m or ft ... in, '.. ' and sometimes m). Any unspecified number ("1.45") should be specified (that is: in, mm etc.).
I'll remove non-dimension input from the template, next edit. Have done so from the big /doc page list. -DePiep (talk) 01:42, 7 July 2013 (UTC)
This better be reduced.
iconic values can stay (brunel gauge, s.g.).
non-confusing integers ("1000" and "34") should stay (for these are used widely)
remove these fractions from one unit only (imp or met), so that cleanup is easier (don't have to check which unit to add). -DePiep (talk) 14:21, 12 July 2013 (UTC)
Here is a list of gauge definitions from the template list. It looks like they are definitions of the same gauge but with a different value. For each of them, please discuss per pair: are they different (then keep) or are they the same (we merge them into one definition (the disposed definition will be put in a maintenance category so we can edit the article that uses it). -DePiep (talk) 10:27, 16 May 2013 (UTC)
Sandbox: rm 0.649in options & definition. Suspiciously close to 0.650in (0.02 mm), looks like an old rounding variant for the same gauge.
6.5 mm
6.5mm → 6.5 mm (0.256 in)
0.256in → 0.256 in (6.5 mm)
0.257in → 0.257in
-- is this really a different one, or just a rounding variant?
Sandbox: removed 0.257in gauge. Most likely a rounding variant for 0.256in.
22 in
558mm → 558mm
22in → 1 ft 10 in (559 mm)
-- better define 558mm to be 22 in right?
Sandbox. Changed: 558mm into 559mm, and being exactly 22in. (so 558mm does not exist here any more).
860 mm
860 → 860
34in → 2 ft 10 in (864 mm)
-- While 34 inches (863.600 mm) = 864 mm, why split them?
The diff is 4mm, which is much. So we treat them as different gauges:
860mm=33+27⁄32 in.
34in=864mm (from 863.6mm).
Sandbox: added
864mm → 864mm
Input 860mm, 34in puts page in the maintenance category, so we can check these pages individually on whether 860mm or 864mm was intended. (After these checks this category could be removed, in a next list version).
Todo: check documentation to list 860mm, 864mm, and 34in correctly.
I am editing this in the sandbox (to go into the live template later on). Any input options that are removed, and that are actually used in articles, will then show up in the maintenance category. We can inspect these listed pages individually. -DePiep (talk) 13:32, 27 June 2013 (UTC)
Conclusions after it was processed into the live code: there is no reason to delete an entry. Mostly the minorly differences between gauges are based on true background like scale definitions, or some are not sourced. We must keep them, until either: a. the rounding/error is proven to be the cause of separation, or b. some gauge is not sourced or used. So far, today, I did not meet any of these deletion/merging reasond in these. -DePiep (talk) 21:15, 12 July 2013 (UTC)
Maintenance category changes
rm the temporal check things added last time. After maint check, done?
Use {{main other}} to have only article pages - is already there.
Some gauges that should be checked, added or improved in the template list:
This list is evolving over time
Add
36.75 mm (1.447 in): to add. ScaleSeven, 1:43.5 for Irish gauge. Well sourced. Or 1.447 in (is 36.754 mm. 1.45 in would yield 36.83 mm is too imprecise, so we use 4 sigfig)
49.20 mm: to add. ScaleSeven, 1:43.5 for Brunel (GWR) gauge. Well sourced. Or 1.937 inch (is 49.1998 mm. 1.94 in would yield 49.276 mm; too much off so we use 4 sigfig).
557 mm (21+15⁄16 in): to be added. Said to be 2 castilian feet @ 278.6 mm (557.2 mm). See Transport_in_the_Dominican_Republic#Railways, and especially Iberian gauge (with talkpage). still needs a source. Imperial: 21+15⁄16 in yields 557.21 mm.
Change
33 mm (1.3 in): 1.299 inch could be rounded to 1.3 inch within reasonable precision (being 33.02 mm). The mm size is well sourced at ScaleSeven.
0.470in: should accept 0.47in too.
0.650in; same. Check whole list for this feature. Done: no more of these.
Trailing zero in output, check correctness (precision suggested): 15.76mm --16.5 mm (0.65 in) -- 32 mm (1.26 in).
Delete the zero from 16.5mm and 32mm. Keep in 15.76 (to be 15.75) mm.
15.76mm; change into 15.75 mm (3mm scale says 101.6 × 15.75 = 1.600.2 mm). Keep 0.62(0)in for imperial.
Check
1.766 in (44.85 mm): check whether this is really different from 1.75in (mentioned above btw).
No change. Is the exact 1:32 of s.g. (but nominal set to 1.75 in (44.45 mm). See 1 gauge).
12 mm (0.472 in) and 0.470in and 0.472 in (12 mm): all different really?
12 mm is well defined (in three standards!). 0.472 in (imp first) is not used because HO and TT scales are defined in metrics (US, Europe). See HOm, HOn3-1/2 scale, TT scale. 0.470in I could not find any source or usage. We leave 0.470in unchanged until proven superfluous.
Change: delete move 0.472in input options for being not the standard (or: merge them with the 12mm first).
5 ft 3 in (1,600 mm): imp first? (Victoria, Victorian, Irish): British empire age, so most likely defined in inches not mm.
No change. Sure they were defined in inches (in the 1846 Law for Ireland), but today these countries use metric units. In articles on history, one could swith to |first=imp anyway. See Rail gauge in Australia.
These are rail gauges we should check for improvements.
This list may evolve over time
Add
1065 mm: 1,065 mm (3 ft 5+15⁄16 in): in page Cape gauge, wrt South Africa. To be sourced. Would be (41.929in=) 41.3in. will be 41+15⁄16 in being 1065.21 mm. -DePiep (talk) 23:34, 27 July 2013 (UTC)
added to sandbox: 1,065 mm (3 ft 5+15⁄16 in)
Done
Delete
0.472in → 0.472 in (12 mm): I've recently set this one to give metric first (because it is only defined in metric, see [ScaleSeven]]). Still this is a bad idea, and counter-intuitive. I propose to delete this imperial entry, as it is never defined as such.
Deleted from sandbox: 0.472 in (12 mm)
Done
Change
0.26, 0.75, 1.75 → 0.26
etc.: rm these input options. They are broken metric values, without their unit (m). To prevent confusion, better rm them. (recently all other such input was removed; these slipped through).
Deleted from sandbox:
0.26, 0.75, 1.75.
Done
1 → 1. to produce 1,000 mm (3 ft 3+3⁄8 in). Reintoduce "1" for 1m gauge. No fraction. Iconic and named; should not have been deleted last time really.
Done
4.75in → 4+3⁄4 in (121 mm): metric "121mm" is imprecise: it would calculate back to 4.764in. Better change it to "120.7mm" (for 4.752in).
Named gauges have input option(s), Wikipage to link to. There can be a label (not at present; made up example: [[Victorian gauge#Broad|Victorian broad gauge]]).
Scottish → Scottish: remove this option, it is named "Scotch gauge".
Toronto: → 4 ft 10+7⁄8 in (1,495 mm) Toronto gauge. What is the best name? Links to: Toronto streetcar system#Track gauge. Label this: "Toronto streetcar and metro system/gauge" (correct but long), or "Toronto Transit Commission gauge" (nah)?
So |lk=on shows units linked: 4 ft 8+1⁄2 in (1,435 mm). Where would we need that? Maybe a link (or reference) may be needed to detail the definition-issues, yes. But not the unit lnks. I'll have these pages listed, to see whether this link is needed.
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.
The return after the template and before the conditional catergory needs to be removed, as I have done in the sandbox here [[4]]. I've added a couple of lines at the bottom of Template:RailGauge/testcases to show the problem and that this solves it. Edgepedia (talk) 05:49, 28 July 2013 (UTC)
Currently 12mm in produces 12 mm (0.472 in). I got the impression that 0.472 in and 0.473 in are also commonly used to describe that same gauge, by inches (see List of rail transport modelling scale standards). Both calculate to the right mm size:
0.472 in => 11.9888 mm
0.473 in => 12.0142 mm
I withdraw this proposal. The imperial input (two variants?) is not defining. It is defined by metric, end of topic. Whenever some article requires imperial unit first, the editor can add |first=imp atop the |1=12mm input. -DePiep (talk) 22:53, 12 August 2013 (UTC)
I am confusing myself. TT scale says it is from 1⁄10 to 1 ft (1:120), so defined in imperial units. But s.g. / 120 is not exactly 12mm (a rounding issue). -DePiep (talk) 13:00, 13 August 2013 (UTC)
This should be it: both 0.472in and 0.473in are imperial measures of exact 12mm (12mm itself is rounded from 11.94mm from a scaling). They are not results of scaling by themselves. So they are OK as inputs. Propose to add them. Both lead to the same gauge, to be defined "0.472 in" (because most closest; sources not clear on this detail). -DePiep (talk) 14:12, 26 August 2013 (UTC)
source "Collection" (in Dutch). Decauville Spoorweg Museum. Retrieved 2013-08-06. In de collectie bevinden zich voertuigen met 350, ..., 550, ..., 620, ... mm spoorwijdte.
source "Collection" (in Dutch). Decauville Spoorweg Museum. Retrieved 2013-08-06. In de collectie bevinden zich voertuigen met 350, ..., 550, ..., 620, ... mm spoorwijdte.
Source: "Faxe Jernbane" (in Danish). Retrieved 2013-08-06. Google translated: In the following book, Østbanen 1879-2004, indicated gauge to 2 ½ feet or 791 mm. Nevertheless acquired Garde in 1866 a used German mine locomotive gauge 785 mm. This difference in gauge targets impossible did not [did not make impossible], however, use of the locomotive, which was in operation on the field all the way to 1921. This is perhaps one of the reasons for the doubts surrounding the runway actual gauge, there are several places specified for both 785 mm (evp have even one such example) and 791 mm. Thus mention Wikipedia [da:Faxe Jernbane]: "There is no doubt about the route originally used gauge. Figures have admittedly several places in the literature as 791 mm, but in the delivery protocol of train factory Krauss set in 1874, 1907, 1914 and 1927 having delivered locomotives gauge 785 mm. It is somewhat unclear why mentioned one at the track width 791 mm. There should probably be a shift over the years, since Faxe Limestone Quarry around 1970 ordered 2 diesel locomotives in Schöma with a desired track width of 791 mm."
So the gauge 791 mm indeed, and 785 mm gauge locomotive(s) was used. The "2+1⁄2 ft" remark is strange (2 ft 6 in / 762 mm does not fit; possibly used in a different track?). We can add this one. -DePiep (talk) 11:01, 6 August 2013 (UTC)
This introduces ambiguity: which link to expect with input {{RailGauge|1600mm|allk=on}}? Looks like Victorian should get its own entry by name only ... -- if we maintain her name. -DePiep (talk) 00:09, 5 August 2013 (UTC)
We can create something like this: only input |1=victorian produces output "1600 Victorian gauge". Otherwise 1600, Irish will go as was. (Note: this is a data concept change: we use gauge "id=x, first=imp twice) -DePiep (talk) 20:53, 11 August 2013 (UTC)
I have split "Victorian" from "Irish, 1600mm" to create the link option Victorian broad gauge.