Template:RailGauge/doc

Usage
The first parameter specifies the gauge:
 * &rarr;

Most existing rail gauges can be entered by their definition using units mm, m, ft, in or ', ". Spaces are allowed (both 45.5in and 45.5 in are valid). Sizes can be decimal (like 16.5mm, 45.5in, 0.65in), but not in fractions (45$1/2$in). Using a thousands-separator is not possible (1,435mm).

The names of some twenty rail gauges are recognised, and can be used:
 * &rarr;

The template is case-insensitive (both Iberian and iberian are OK). Standard gauge even has abbreviations like sg. More on this below


 * When an input value is not recognised by the template (see last two table examples), the template simply returns the input as it is:
 * &rarr;

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 this below.
 * Some gauges in metric are defined in metres: 1m is recognised. However, it is not available for all metric defined gauges. Using mm is a safer bet.
 * Allthough some gauges are recognised without a unit (3 meaning 3ft), it is advised to always enter units. This will prevent confusion.

All input options

 * For a more technical overview, see RailGauge/entry check.

Gauge color key
The colors below are used as legend colors for specific gauges

Maintenance categories
Sometimes an input parameter is not recognised by the template (that is: it is not defined in the internal list). The article page with this is added to a background "maintenance category" (named Category:Pages with incorrect use of RailGauge template). Interested editors will check that category. they can, edit that article page (for a spelling error), or propose to add that rail gauge to the template.

There are two categories under Category:Wikipedia rail gauge categories that can help in maintenance of the template.
 * Category:Pages with incorrect use of RailGauge template: input to be checked. No error message on the page, but it needs attention.
 * Category:Pages with no gauge entered in Infobox rail line: template Infobox rail line is used, but parameter gauge is empty.

Technical background
This template uses the Lua module Module:RailGauge to format the gauge data. The data itself is stored at Module:RailGauge/data. Please see the /data subpage for information on how to add new gauges.

In the future, this module may be merged into the generic module:Convert. However, rail gauges can be normative, not scaled. For example, many model gauges are defined not calculated.

TemplateData
{       "description": "The template formats a rail gauge (length) into standard notation and adds the conversion into imperial/metric size", "params": { "1": {                       "label": "Rail gauge definition", "description": "Rail gauge by definition, in mm or ft in. Also can accept: ' '', m, gauge name)",                       "type": "string",                        "required": true                },                "allk": {                        "label": "Alternative name link",                        "description": "=on: Add gauge name (if known) and link to its wiki page",                        "type": "string",                        "required": false                },                "al": {                        "label": "Alternative name",                        "description": "=on: Add gauge name (if known)",                        "type": "string",                        "required": false                },                "disp": {                        "label": "Display converted gauge",                        "description": "Separator of the second, converted value (imperial or metric): 1=none (first value only); =s: / (slash separator); =or: 'or' separator. Default: brackets",                        "type": "string",                        "required": false                },                "first": {                        "label": "Which units to mention first",                        "description": "=met: metric first; =imp: imperial first (default: as defined)",                        "type": "string",                        "required": false                },                "wrap": {                        "label": "Allow line wrapping of text",                        "description": "wrap=y allows line-breaking at the separator",                        "type": "string",                        "required": false                },                "lk": {                        "label": "Link top measurement units",                        "description": "=on: adds links",                        "type": "string",                        "required": false } } }