This template accepts a track gauge and returns thatdefined track gauge well formatted, plus theconverted size value by another unit:
{{Track gauge|1520 mm}} →1,520 mm (4 ft 11+27⁄32 in)
{{Track gauge|4 ft}} →4 ft (1,219 mm)
Extra options are available:
{{Track gauge|1520 mm|lk=on}} →1,520 mm (4 ft 11+27⁄32 in)
{{Track gauge|1520 mm|al=on}} →1,520 mm (4 ft 11+27⁄32 in)Russian gauge
{{Track gauge|1520 mm|allk=on}} →1,520 mm (4 ft 11+27⁄32 in)Russian gauge
Input options
The first parameter specifies the gauge:
{{Track gauge|1435 mm}} →1,435 mm (4 ft 8+1⁄2 in)
{{Track gauge|4 ft 8.5 in}} →4 ft 8+1⁄2 in (1,435 mm)
{{Track gauge|4 ft 8 1/2 in}} →4 ft 8+1⁄2 in (1,435 mm)
{{Track gauge|56.5 in}} →4 ft 8+1⁄2 in (1,435 mm)
{{Track gauge|Standard gauge}} →1,435 mm (4 ft 8+1⁄2 in)
Rail track gauges can be entered as they are defined: in unitsmm orft in. Also common accepted names can be used, seebelow.
The input value (a length, in metric or imperial units) must be a defined track gauge. Currently 135 gauges are defined by metric units, and 148 by imperial units. Some are defined in both unit systems, such as the standard gauge.
When an input value isnot recognised by the template, the template simply returns the input as it is: {{Track gauge|25in}} → 25in
The page with this unknown input is also listed in a maintenance category, in the background, that signals interested editors that there is a new rail gauge used in Wikipedia. More on thisbelow.
Some gauges in metric are defined in metres:1 m is recognised. However, it is not available for all metric defined gauges. Usingmm is a safer bet.
When entering a track gauge (like{{Track gauge|1435mm}}, these are formatting options. Keep in mind that only defined gauges are recognised.
Spacing is free, and fractions can be used in imperial units. Primes (' and") may be used for [foot, inch]. Any [foot, inch] size can be entered in all-inches (4 ft 8 1/2 in equals56 1/2 in and56.5 in).
Input options, examples
Parameter input
Result
Note
1435 mm
1,435 mm (4 ft 8+1⁄2 in)
standard gauge
standard gauge
1,435 mm (4 ft 8+1⁄2 in)
standard gauge, by name
4 ft 8.5 in
4 ft 8+1⁄2 in (1,435 mm)
standard gauge, this way puts imperial units first
UK sg
4 ft 8+1⁄2 in (1,435 mm)
standard gauge, this way puts imperial units first
56.5 in
4 ft 8+1⁄2 in (1,435 mm)
standard gauge, by all-inches
56.5"
4 ft 8+1⁄2 in (1,435 mm)
standard gauge, using primes
56 1/2 in
4 ft 8+1⁄2 in (1,435 mm)
standard gauge, using slash for fraction
1 m
1,000 mm (3 ft 3+3⁄8 in)
1 m is recognised, but not many more inm. Better usemm
Not recognised (so no converted value). This track gauge, Brunel's, is not defined in mm.
65 in
65 in
Input not recognised (so no converted value); output copies the input. This is agood way to enter an uncovered rail gauge on a page: other editors will notice (and can add a new gauge to the template!).
Puts the requested measure first (metric, imperial)
{{Track gauge|1000mm|first=imp}}
3 ft 3+3⁄8 in (1,000 mm)
disp=any text
The text will be written between the measurements, two spaces added. Brackets are omitted. Text must be 2 characters or more. (codes for|disp= are processed as described: 1, s, /, br).
{{Track gauge|sg|disp=also defined as being}}
1,435 mm also defined as being4 ft 8+1⁄2 in
disp=s or /
Uses aslash as a separator rather than parentheses
{{Track gauge|sg|disp=s}}
1,435 mm /4 ft 8+1⁄2 in
disp=[]
Uses asquare brackets rather than parentheses
{{Track gauge|sg|disp=[]}}
1,435 mm [4 ft 8+1⁄2 in]
disp=1
Only shows thefirst measure (may be used when repeated on a page or in conjunction withfirst= to display the output only)
{{Track gauge|sg|disp=1}}
1,435 mm
disp=br
Forces a line break after the first size (and also before any gauge name)
{{Track gauge|sg|disp=br}}
1,435 mm (4 ft 8+1⁄2 in)
nowrap=off (default), on, all
Setspossible line break (line wrap): after between the measurements (off=defalt), not (on, all), or not at all when named gauge is present. (note: until May 2014, default behaviour wasno break between the measurements. This has changed.)
Names can beuniversal, being defined worldwide. For example: Iberian gauge,1,668 mm (5 ft 5+21⁄32 in)Iberian gauge. Other names can belocalor culturally restricted, for example the name "Cape gauge" is used in South Africa for3 ft 6 in (1,067 mm), but not in Japan (in Japan that same track gauge is not named).
Also, two sizes can lead to one gauge name.
Named gauges
Established gauge names can be entered. The word "gauge" can be omitted. Case-insensitive (A=a). See also the|al=,|allk= parameters (below), to show a gauge name in the outcome.
This template defaults to UK-English. For articles written in US-English, set parameter|engvar to|engvar=en-US. In this situation, the US-English spelling is shown:
{{track gauge|1000mm|allk=on|engvar=en-US}} →1,000 mm (3 ft 3+3⁄8 in)meter gauge
As of 2016, the only two gauges impacted are the 1000 mm and 1009 mm gauges. In UK-English these are spelled metre, in US-English these are spelled meter.
Why not use{{Convert}}?
To convert a track gauge, using{{Convert}} comes to mind. For example, standard gauge:
{{Convert|1435|mm|ftin|abbr=on}} → 1,435 mm (4 ft 8.5 in)
However, this has some disadvantages. First of all, track gauges aredefined by an institute, not just measured. The list of thosedefined track gauges is limited, and overseeable (today some 270 physical sizes are defined).
Using{{Track gauge}} allows us totrack (follow) all articles with a specific gauge. This way the list can be made more accurate, correct and complete.
Also, the track definition can be directly linked to the sourcing article:1,067 mm (3 ft 6 in).
Further more, the template allows to recognise named gauges such as "Russian gauge".
Tracking category
{{Track gauge}} detects that anundefined gauge is entered, and signal the page for maintenance. For example, metre gauge is only defined in metric. Entering an imperial size would categorise that article inCategory:Articles using Template:Track gauge with unrecognized input (0).
Defined track gauge, in mm or ft in. Also can accept: ' '', m, gauge name
String
required
Link top measurement units
lk
=on: adds link to the gauge defining article
String
optional
Alternative name
al
=on: Add gauge name (if existing)
String
optional
Alternative name, linked
allk
=on: Add gauge name (if existing) and link to its wiki page
String
optional
Display converted gauge
disp
Separator for the converted value: 1=none (first value only); =s, /: slash separator; =''Any text'' (2 or more characters): Any literal text written between the two values.
Default
(...) brackets
String
optional
Which unit to mention first
first
=met: metric first; =imp: imperial first (default: input unit)
Default
By input
String
optional
Allow line wrapping of text
nowrap
wrap=off, on, all: allows lin breaking between the two measurements. Default: on. 'all' disallows linebreaking wiothing an alternative name