This page is within the scope ofWikiProject Trains, an attempt to build a comprehensive and detailed guide torail transport on Wikipedia. If you would like to participate, you can visit theproject page, where you can join the project and/or contribute to thediscussion. See also:WikiProject Trains to do list and theTrains Portal.TrainsWikipedia:WikiProject TrainsTemplate:WikiProject Trainsrail transport
Is there a function in convert for gradients, e.g. 1-in-X = y degrees or z%? I thought something like this might be useful for the article I'm currently working on, a narrow-gauge railway in Victoria, Australia -Walhalla railway line, to make the article more compatible with international readers who might be more used to expressions of slope in, say, percentage values whereas locally we almost always use "1 in X". At the moment my edit of the article has a mix of "1:30", "1-in-30" and "1 in 30" formats; I'll do a final sweep and standardise those before I finish, but the template could deal with all those at the same time as a side-benefit.This 1927 diagram[1] shows the gradients of the railway line expressed as 1 in X, e.g. a slope marked "30" is 1 in 30. For inputs, I think a code chain of{{convert|30|x|%dr}} might work, where the user inputs any one value, x for 1 in X, % (or pc?) for percentage, d for degrees or r for radians, and it provides outputs for all other terms, in this case %, d, and r, but fewer if not all three are specified in the final convert term. There'd also need to be something for rounding, e.g. maximum 2 decimals on percentage. A more complicated version might want to account for swapping from downhill to uphill, e.g. downhill 1 in 30 changes to uphill 1 in 30, net difference 1 in 60. I originally asked this in the page for the{Convert}} template page, @Johnuniq (talk·contribs) recommended that I bring it over here.Anothersignalman (talk)19:28, 13 January 2026 (UTC)[reply]
If the folks at convert sent you here I'd it's probably best as a separate template (c.f.{{rail gauge}}, but yes it absolute would be a good idea. For syntax perhaps{{gradient|x|in|y}} to output a percentage and{{gradient|x|%}} to out put 1 in x? I don't have anything approaching the ability to make this myself.Thryduulf (talk)13:00, 14 January 2026 (UTC)[reply]
I figured no need for x in y because as far as I've seen, it's always 1 in X, not say 3 in 65 or whatever; and that could be allowed for with decimals in any case. I also wanted to cover all the other possible ways someone might try to describe a slope, hence degrees and radians as well.Anothersignalman (talk)14:48, 14 January 2026 (UTC)[reply]
That's fair. I also now remember discussing this somewhere previously several years ago, I didn't find that in the archives ofTemplate talk:Convert but I did find other relevant discussions of gradients and angles in several different contexts (astronomy, railways, mountaineering, Egyptian pyramids):
ReI figured no need for x in y because as far as I've seen, it's always 1 in X, not say 3 in 65 or whatever If you supported the more general case, this might be useful for things likeRoof pitch.RoySmith(talk)15:20, 14 January 2026 (UTC)[reply]
Yeah, OK, roof pitch is a good argument for the more complex x-in-y option. Without knowing anything about programming, I'm guessing that means we can't have a single field each for input-type, number, output types plural as I'd shown above though?Anothersignalman (talk)16:00, 14 January 2026 (UTC)[reply]
I'm also not a programmer but given convert handles the same parameter doing different things depending on what it contains (e.g. {{convert|4|ft}}, {{convert|4|x|4|ft}}, {{convert|4|±|1|ft}} and {{convert|4|-|8|ft}} all do different things) it might be possible for "in" in the second parameter to trigger different handling. I guess it would make it a lot more complicated though. 16:13, 14 January 2026 (UTC)Thryduulf (talk)16:13, 14 January 2026 (UTC)[reply]
The next step would be to work out what inputs should be accepted, with any wanted limit checks. Then, determine the exact wikitext wanted for the outputs. The best way to show that would be in a list of examples with actual numbers. I suggest one list which others edit until it's at an agreed state. There are a few coders who would implement it (possibly me) but a specification is needed before thinking about that.Johnuniq (talk)01:17, 15 January 2026 (UTC)[reply]
This is what I originally envisaged, plus a few ideas from above. Open to other people adding to this list.
Example 01:{{slope|40|x|%dr}} generates1 in 40 (2.5%, 1.43°, 0.025 radians) - Base case
Example 02:{{slope|40|x|dr%}} generates1 in 40 (1.43°, 0.025 radians, 2.5%) - Note output order swap
Example 03:{{slope|2.5|%|xdr}} generates2.5% (1 in 40, 1.43°, 0.025 radians) - Input %, output slope
Example 04:{{slope|40|x|%}} generates1 in 40 (2.5%) - One calculated value only
Example 05:{{slope|-40|x|%}} generates-1 in 40 (-2.5%) - Support for negative inputs
Example 06:{{slope|3in8|x|%}} generates3 in 8 (37.5%) - Any letters between two numbers in the lead term would allow a fraction other than1 in X.
Auto-add spaces in this example, though per below we might standardise on dashes instead?
Example 07:{{slope|3 i 8|x|%}} generates3 i 8 (37.5%) - Letters copied verbatim causes this error missing the letter "n". This is intended as support for other languages.
Units are x, %, d, r. Are there any others we want?
Notes:
Commas inserted between multiple output terms in brackets automatically
Order of terms in brackets as defined by the order of letters to be converted to
Decimal and comma numbers permitted in inputs, e.g.|1.7 or|1,700.
|1in8|x would generate the same output as|8|x
For the full-length gradient expression, do we want "1 in 40" without dashes, or "1-in-40" with dashes? I think I prefer the former, but open to one or the other being default with option to select.
Optional terms after the final convert-to value:
Rounding:
|round=2u - Rounds all numbers to 2 significant digits, explicitly roundingup, e.g. 6.666...% becomes 6.7%
|round=2d - Rounds all numbers to 2 significant digits, explicitly roundingdown, e.g. 6.666...% becomes 6.6%
|round=4 - Rounds all numbers to 4 significant digits,rounding off, e.g. 0.14285714285 becomes 0.1426 (regardless of unit). Note an input with insufficient significant digits would be expanded, e.g.1 in 40 would become1 in 40.00. Not sure if that's desirable?
|round=2t - Rounds all numbers to 2 significant digits,trimming off any additional digits, e.g. 0.14285714285% becomes 0.14%
|round=-2 - Rounds all numbers to negative 2 significant digits, e.g. 142.85% becomes 140%.
Round must always have a number; optional letters u, d, t.
Term styles:
|style=: - Swaps in (with spaces) for:, e.g.1 in 40 becomes1:40
|abbr=off - Swaps% topercent;° todegrees;rad toradians - note this is the inverse of{{convert|...}}, where abbr=on has to be specified.
Question whether this and|style=: can/should be merged; and if it should be possible to specify abbreviations for some but not all terms? e.g.|xa,|%a for abbreviated versions of those two in lieu of|abbr=off altogether.
Need to think about how to allow16.2 in 37.5, for example, in the output side. We'd need to specify rounding (including negative rounding) for each of the numerator and the denominator, though default would be round to integers.
I think we should keep parameter names and operation the same as in{{convert}} where they do the same job, for ease of learning syntax and for merging if that were to ever happen in the future. For example:
Railway gradients tend to be much easier than road gradients - 1 in 30 issteep for a railway. In the UK, gradients like this are the exception rather than the rule - such as theLickey Incline. A gradient expressed as a percentage would need to be steeper than 1 in 100 (1.0 %) in order to get a non-zero digit before the decimal point. Since many railways have a gradient easier than this, a per mil figure is used, where any gradient between 1 in 100 and 1 in 1000 (which covers most of them) will have a single non-zero digit before the point. Consider theGreat Western Main Line between Paddington and Swindon, which does not exceed 1 in 660 (1.5‰) at any point - and that's in a distance of 77 miles. Even on this line, most of the line between Paddington and Reading (36 miles) is significantly easier: long stretches are either level or 1 in 1320 (0.8‰). --Redrose64 🌹 (talk)19:49, 16 January 2026 (UTC)[reply]
Ah, you might not be familiar with Australian railways. We have gradients that have horrified UK engineers. This is the case study I'm working with -[2] - note the 26 mile line has about 16 miles of 1 in 30 to 1 in 40, and from about the 87 mile mark to the end is almost entirely curves - and the standard gauge Main West line from Sydney apparently has a net of about 9 miles of 1 in 33 which forced us to use different gearing for our HST exports.Anothersignalman (talk)05:56, 17 January 2026 (UTC)[reply]
@Anothersignalman I've just replied in more detail in your crosspost (that I saw before I saw the question here). Per mille seems to be common in German-language sources but as far as I found not (or at least less so) in English ones.Thryduulf (talk)20:00, 16 January 2026 (UTC)[reply]
The train involved was an APD.20 diesel multiple unit. Unit 2521 is identifiable from the BBC ref used in the article. TheState Railway of Thailand article claims that unit 2515 was also involved, but without a reference. Can we confirm the second unit?Mjroots (talk)15:43, 15 January 2026 (UTC)[reply]
For this page -Template:Walhalla railway line - I've done the best I can with my existing skill set, but I need help adding a few other symbols including creating some that don't exist (e.g. some of the level crossings and road bridges). I've taken a screenshot and edited it to what I want for the final output here
Please drop a message below or on my talk page with a description of exactly which icons are required. If there are icons that exist in the default colour scheme that you need in a different colour set I can create them and upload them to Wikimedia Commons ready for use. You can also overlay BSicons by adding the first (bottom layer) BSicon, followed by !~ and then the next BSicon which is drawn over the top of the first.
A handy template for displaying BSicons inline on talk pages isTemplate:BS-q — use {{BS-q|}} with the BSicon name after the pipe symbol, for example adding {{BS-q|fexWBRÜCKE2}} displays as (fexWBRÜCKE2)
I also have a work-in-progress atCommons:User:AmosWolfe/BSicon which has galleries displaying BSicons in all of the current colour sets, with clickable redlinks to upload a new file in cases where that colour variant does not yet exist. Editing the SVG code of a BSicon to change the line colour is a fairly simple process which I can describe to you if required. -=# Amos E Wolfetalk #=-02:29, 15 January 2026 (UTC)[reply]
Thanks Arnos. I'd prefer not to overlap symbols unless absolutely necessary, because that would be more confusing for anyone who copies from this template for their own future project. These are the ones I need (I think):
(fexSKRZ-G2) - unprotected level crossing, closed green railway, will replace (fexBUE)
Is there a symbol for a water-wheel? That was a significant landmark. Otherwise I'll need a recoloured (uvxWDAMM+LOCKf), with both sides light blue; though I don't actually know whether the wheel was left or right of the stream, and I'm not sure I can find out.
There was a spot where the railway passed under a large tree trunk, that had burned through, fallen over and speared into the ground on the other side of a station. Not sure if there is, or should be, a symbol for that? Photo here -[3]
Thanks for that, I was searching for the wrong thing. Most of the options there are for straight rivers e.g. (uexWMILL R), not streams e.g. (WASSER), which is also slightly narrower and a different colour. I considered (exHELM), but it just so happens that the geometry of (ueMILL) is perfect in my use case, fitting neatly on top of (WASSER+l) with the hut and wheel parts correctly placed.Anothersignalman (talk)18:33, 15 January 2026 (UTC)[reply]
This is a topic I see come up time and time again. It’s common for editors to change the tense of an article from present tense to past tense when a class of train is withdrawn from service, despite the vehicles still being in existence, sometimes even in operations in preservation. To me this seems incorrect - if the trains still exist, then the present tense makes more sense. For example:
The FooBar class is a class of locomotive…
makes far more sense for when this class is still in existence than
The FooBar class was a class of locomotive…
which implies that even though 20 members of the class survive in preservation, they no longer “exist as a class” - that’s just patently false.
I typically use present tense unless every single instance of the locomotive has been scrapped (e.g.Ingalls 4-S). My standard wording is "TheArticle Name is a model of steam/diesel/electric locomotive produced by (manufacturer)..."
For a rather extreme example, theEMD FL9 was retired from revenue service in 2009 but more than a third of the units built survive in preservation. Using past tense clearly wouldn't be appropriate in that article. Wikipedians seem to have this instinct to immediately go change things from "is" to "was" the second any news about anything is released, to the point I had to insert an edit notice inMontana Rail Link when the merger with BNSF was announced because it wasn't approved and then made effective until two years after the first announcement.
I do want to remind Jessicapierce that rollback is meant to be used on vandalism or obviously disruptive edits, and edits likethis are not an appropriate use of that tool perWP:ROLLBACKUSE. The edit that was reverted was not vandalism or obviously disruptive, and any revert should have included an edit summary.Trainsandotherthings (talk)14:51, 26 January 2026 (UTC)[reply]
That's my thinking - we may be talking about things that aremostly historical, but they still very much exist in flesh and blood. If you were stood in front of an EMD FL9 delivering a talk, would you start the talk with "The locomotive behind mewas a class of..."? If you'll excuse the extreme language, it's utter nonsense in my opinion!Danners430tweaks made14:54, 26 January 2026 (UTC)[reply]
You're quite right, and I take your point. The first edit I reverted had wrecked the infobox, and several others changed only the first instance of the verb. I.e., the first sentence of the article said "is," and the rest of the article said "was." Since this was being done by an anonymous editor with no edit summary, I couldn't imagine it was being done constructively. I did attempt to discuss it with the editor.Jessicapierce (talk)17:15, 26 January 2026 (UTC)[reply]
"TheX is a retired class/model/type/etc. of..." seems fine to me, just like Wikipedia doesn't switch to "was" if a living person retires from their most notable occupation.XtraJovial (talk •contribs)15:01, 26 January 2026 (UTC)[reply]
Wouldn't at all be against this... but it does open a can of worms - how do you define "retired"? Great example being theBritish Rail Class 153 - when Scotrail and TfW retire them, it will be retired in passenger service, but very much active as a measurement train with Network Rail... Then you have preserved locomotives that operate on the main line for railtours... and it gets even messier when you start talking about theBritish Rail Class 50 which everyone would probably agree is in preservation - yet GBRf use them for freight!Danners430tweaks made15:08, 26 January 2026 (UTC)[reply]
how do you define "retired"? When a train ceases to be used in regular service, departmental or revenue-earning. Pretty straightforward inmost cases. The case with the Class 50 seems abnormal, at least within my scope of knowledge, so I don't want it to be something hard-and-fast.XtraJovial (talk •contribs)03:02, 28 January 2026 (UTC)[reply]
I've given that tool a quick (5 minutes) tryout and it seems pretty useful because any previews are instant. The only downsides I have found so far is that it doesn't support overlays or any "other colour" icons which use the colour name as a suffix separated by a space. -=# Amos E Wolfetalk #=-14:12, 8 February 2026 (UTC)[reply]
One of the biggest problems in advising users of which BSicons are available is that there are so many - far too many to show - or even list - on one page. When I started working with them way back in 2009, there was a much smaller set of shapes, and most were available in only five colours - red, blue, the light versions of those, plus green (used by the waterways people). Now, there are not only many more shapes, but many more colours too. One of the earliest icons to be created, and one of the most basic too, (STR), now exists in over thirty different basic colours - and that's not counting the "light" colours like (exSTR) or the "blue" set like (uSTR).
To get some idea of how the sheer scale of the problem is difficult to grasp, go tothis link on commons and keep on clicking the "Next page" link at the top or bottom. You get the somewhat strange figure of 345 entries per page, so ten pages is 3450 icons, but you run out of patience before you run out of pages. But it won't take long to realise that far from there being hundreds or thousands of BSicons, there are several tens of thousands if not hundreds of thousands. --Redrose64 🌹 (talk)22:56, 8 February 2026 (UTC)[reply]