Demonstration
London
United Kingdom
Channel Tunnel
France
Paris
Brussels
Belgium
Portugal
Lisbon
Amsterdam
Netherlands
Spain
Madrid
Bern
Switzerland
Italy
Rome
Vienna
Austria
Hungary
Budapest
Romania
Bucharest
Berlin
Germany
Ukraine
Kiev
Copenhagen
Denmark
Poland
Warsaw
Belarus
Minsk
Øresund/Öresund
Sweden
Stockholm
Oslo
Norway
Baltic Sea
Helsinki
Finland
Moscow
Russia
Nur-Sultan
Kazakhstan
Beijing
China
Pyongyang
North Korea
Seoul
South Korea
Korea Strait
Tokyo
Japan

The route diagram templates encompass a main container, named ((Routemap)) or ((BS-map)), and its auxiliary templates[1], most of them having BS (German: BahnStrecke) at the root of their name. This system provides a uniform layout for route-map infoboxes, mainly for railway lines but also for other modes of transport such as waterways. The more efficient ((Routemap)) template should be considered when creating new diagrams.

Each a map is built as a stack of rows, whose most significant part is a cell lining up one or several square or rectangular icons. There are more than 3,000 of these elementary pictograms. Several methods are provided to add text to each row and comments to individual graphic cells.

Standalone map container

((BS-map))
((BS-map
<<stack of params>>
|map=
<<stack of ((BS-templates))>>
))
((Routemap))
((Routemap
<<stack of params>>
|map=
<<stack of text! !icons~~text>>
))

Template ((BS-map)) acts as a container for a stack of BSn, BSn-2 templates (described below), each of them describing a row of the resulting structure. This stack is given to the template as the value of the |map= parameter. Beside this stack of row describers, various parameters can be given to describe the global behavior of the resulting map. They are:

Parameter names Function
inline Disables title and collapsible function, remove floating, margin and border, widens template width to 100% for transcluding this template into other templates such as ((Infobox rail line)). If the code of the diagram is not transcluded, but is contained within the code of the infobox, &#32; should be added before ((BS-map)) to force proper table layout.
float Which side the template floats to. Default to "right" but can be "left" or "center".
style Additional CSS syntax which defines the style of the whole box.
width Width of the whole box. Can be overridden by style entry. No default value because it will void the tw parameter in the BSn row template which is applied to override the text column width of BSn row collapsible section.
title Title of the map.
title-bg Background color of the title bar to indicate the livery color of the subject. But this is preferable not to be applied as per WP:COLOR and instead use ((color box)) or icon image next to the title text. #27404E is the background color by default.
title-color Disabled parameter- font color of title text. The foreground font color is now automatically selected (black or white) to provide the greatest color constrast as per WP:COLOR and WCAG level AA accessibility guidelines.
navbar Specify the template name if your map is written in a separated template page, it will include a mini bracketed ((Navbar)) in the title bar. Leave this parameter blank if you directly use this template in the article.
collapsible Allow the box collapsible or not. yes by default, no will void the "expand/collapse" button.
collapse Collapse state of the whole box. yes for collapsing, no by default.
legend Legend page link:
bg Background color of the whole diagram, including the text column in the row templates.
top Optional note above the map.
bottom Optional note below the map. Also a good place to include the ((Navbar)) if you do not want to display it in the title bar.
bottomstyle Optional CSS style for the note below the map, for example text-align:center;.
map BS row templates which comprise the diagram.
mapn n represents numbers 2 to 10. Additional map space. By separating maps into different map parameters, the column alignment of the maps will not affect each other. This is useful if you are displaying two maps where one uses the ordinary BSn row templates (single-side text columns) and the other one uses BSn-2 (dual-side text columns), as the different row templates are not compatible with each other.
map-title
mapn-title
n represents numbers 2 to 10. Optional title header for each map.
map-centered
mapn-centered
n represents numbers 2 to 10. Allows centering/centring each map; will be toggled on for any value.
map-collapsible
mapn-collapsible
n represents numbers 2 to 10. Allows changing the collapsibility of each map. no by default; yes will call the "expand/collapse" button. You must have something in the mapn-title; the mapn-collapsible alone cannot turn it on.
map-collapse
mapn-collapse
n represents numbers 2 to 10. Collapse state of the individual map. yes for collapsing, no by default.

Note re width: No default value because it will void the tw parameter in the BSn row template which is applied to override the text column width of BSn row collapsible section.

Differences between ((BS-map)) and ((Routemap))

BS-map Routemap
Row syntax
((BSn| icons | Margin | Right Text | Right Text2 | Comment ))
n n+1 n+2 n+3 n+4
((BSn-2| icons | Left Text | Right Text | Left Text2 | Right Text2 | Comment ))
n n+1 n+2 n+3 n+4 n+5
Left Comment ~~ Left Text2 ~~ Left Text ~~ Left Margin ! ! icons ~~ Right Margin ~~ Right Text ~~ Right Text2 ~~ Right Comment

Left Text ! ! icons ~~ Right Text
Icon separator | \
Overlays |O
column
number
 overlay
 number
=
icon
!~icon
Text column separator | ~~

Transcluding map in other infoboxes

Besides standalone BS-map, row templates can be transcluded in other infobox templates such as ((Infobox rail line)) or ((Infobox public transit)). The map syntax by BS row templates needs to be written in a separate template page and then transcluded in the infobox.

((BS-map)) rows with icons and text

The real meat of designing the map are the templates BSn and BSn-2. Here BS is the German abbreviation of Bahnstrecke for stretch of track, and the number n indicate how many horizontal icons are put side by side to form the required picture. Templates BSn and BSn-2 differ by the number of text parameters that are given after the n icon names. We have:

((BSn| icons | Margin | Right Text | Right Text2 | Comment ))
n n+1 n+2 n+3 n+4
and 
((BSn-2| icons | Left Text | Right Text | Left Text2 | Right Text2 | Comment ))
n n+1 n+2 n+3 n+4 n+5

Both kind of templates result in a row made of four cells (and, at the end, in a <tr>...</tr> structure containing four <td>...</td> structures). However, these structures are not the same for the BSn and the BSn-2 templates: they cannot be mixed in the same map.

BSn row templates

When n>1, the unnamed parameters describing the text areas are shifted to make way for extra icon grids sequentially. Therefore, the unnamed (sequential) parameters of ((BS)), ((BS2)), ((BS3)) are as follows:


((BS| Icon ID | Margin | Right Text | Right Text2 | Comment ))
1 2 3 4 5
((BS2| Icon 1 ID | Icon 2 ID | Margin | Right Text | Right Text2 | Comment ))
1 2 3 4 5 6
((BS3| Icon 1 ID | Icon 2 ID | Icon 3 ID | Margin | Right Text | Right Text2 | Comment ))
1 2 3 4 5 6 7

These parameters are used to build four columns as follows:

1..n Icon ID the name of the n icons that will be put side by side to form the first column of the map. The result is centered, allowing to mix BSn with various values of n. For no icon to be shown leave blank (or use leer).
n+1 Margin. Left aligned column. Can be used to give the distance along track or traveling time from the starting point (displayed in small size).
n+2 Right Text. Left aligned column. Can be used to give the name of a station or other feature (displayed in usual size).
n+3 Right Text2. Displayed in small size, just after Right Text. In other words, Right_Text and Right_Text2 are in the same column, left aligned.
n+4 Comment. Right aligned self standing column. Displayed in small size. Can be used to display as another Dist./Time case.

When adding special styling in the text columns, be careful because the equals sign = will generate unexpected result because it functions exclusively as part of the named parameter syntax in the template (as text columns apply unnamed parameters). This can be bypassed by replacing the equals sign with ((=)) as in the case with vertical bar (pipe) that must be coded as ((!)).

BSn row templates
Icons Text columns
km / min
0 / 0 Airport
North terminal
Bus interchange
Main tracks
1 / 1.5 Airport
South terminal
BSn row templates
Icons Text columns
km / min
0 / 0 Airport
North terminal
Bus interchange
Main tracks
1 / 1.5 Airport
South terminal
((BS-map
|title=BS((mvar|n)) row templates
|width=400px
|legend=no
|map=
!style="border-bottom:2px solid #be2d2c; text-align:center"((!))Icons
!style="border-bottom:2px solid black; text-align:center" colspan=3((!))Text columns
((BS||km / min))
((BS3||KBHFa|BUS|0 / 0|Airport|North terminal|Bus interchange))
((BS|STR|5=Main tracks))
((BS|KBHFe|1 / 1.5|Airport|South terminal))
))

Cosmetic remark

Right Text and Comment on the same row
Main text
Comment
Some very long Comment
 Moving Comment to Right Text2 
Main text
Right Text2
Some very long Comment
 Applying ((float)) on Right Text2 
Main text
Right Text2
Some very long Comment

Sometimes applying both main text and Comment in the same row may cause the whole map to stretch too wide because there is some very long Comment text in another row regardless whether the main text and note 1 cells of that row are applied or not. This can be fixed by moving the Comment to note 1. If aligning to right is still highly desired, nest the note 1 text with ((Wikipedia:Route diagram template|top=-17px|...)).

Remark: at present, this doesn't always work well with some web browsers. Some further research has to be done before this feature can be reused safely.

BSn-2 row templates

BSn-2 templates place text on both sides of the diagram, without the Distance/Time column, as opposed to the previously-introduced BSn row templates which only has text displayed to the right of the icon column(s). All named parameters of the BSn row templates are also applicable here. These templates should not be used with other "right-Text only" BSn row templates in the same diagram. An example is the demonstration at the top of this project page.

The unnamed parameters are:

((BS-2| Icon ID | Left Text | Right Text | Left Text2 | Right Text2 | Comment ))
1 2 3 4 5 6
((BSn-2| Icon 1 ID | | Icon n ID | Left Text | Right Text | Left Text2 | Right Text2 | Comment ))
1 n n+1 n+2 n+3 n+4 n+5

These parameters are used to build four columns, in the following order:

n+1 Left Text. Right aligned column. Can be used to give the name of a station or other feature (displayed in usual size).
n+3 Left Text2. Displayed in small size, just before Left Text (with a trailing space when Left_Text is not empty). In other words, Left_Text2 and Left_Text are in the same first column, right aligned.
1..n Icon ID the name of the n icons that will be put side by side to form the second column of the map. The result is centered, allowing to mix BSn-2 with various values of n. For no icon to be shown leave blank (or use leer).
n+2 Right Text. Left aligned column. Can be used to give the name of a station or other feature (displayed in usual size).
n+4 Right Text2. Displayed in small size, just after Right Text (with a leading space when Right_Text is not empty). In other words, Right_Text and Right_Text2 are in the same third column, left aligned.
n+5 Comment. Right aligned self standing fourth column. Displayed in small size. Can be used to display Dist./Time (or anything else).
BSn-2 row templates
Left text column Icons Right text column Last column
to City
to Town
Airport Express train
Airport
North terminal
Bus interchange
Main tracks
West terminal
Airport
Airport
South terminal
((BS-map
|title=BS((mvar|n))-2 row templates
|collapsible=no
|legend=no
|map=
!style="border-bottom:2px solid black; text-align:center;"((!))Left text column
!style="border-bottom:2px solid #be2d2c; text-align:center;"((!))Icons
!style="border-bottom:2px solid black; text-align:center;" colspan=1((!))Right text columns
!style="border-bottom:2px solid blue; text-align:center; font-color:blue;" colspan=1((!))Last column
((BS4-2|uCONTgq|uABZq+r|uSTRq|uCONTfq|||to City|to Town))
((BS4-2|LDER|uKXBHFe-L|KXBHFa-R|BUS||Airport|Airport Express train|North terminal|Bus interchange))
((BS3-2||BS2c1|BS2+r|||||Main tracks))
((BS3-2|KBHFaq|BHFq|STRr|Airport|Airport|West terminal|South terminal|))
))

Named parameters

All BS row templates have named (designated) parameters, providing advanced functions (beware of the uppercase/lowercase alphabets of the parameter names). They are the same for the BSn and the BSn-2 templates (except for tw-left). For a given n, letter p designs a non greater integer, i.e. 1≤pn. Most of the time, p=1 is coded by nothing, rather than by "1".

Named parameters
((BS|
 
 (BHF)
|PX=40px|bg=#ccccff|O1=
 
 (CSTR)
|O12=
 
 (uSTRq)

|tw=500px|L1=Train station))

Lining up BS row templates

Lining up BS row templates
 Example 1 
((BS2|
 
 (STR)
|
 
 (BHF)
|))
((BS2|
 
 (BHF)
|
 
 (STR)
|))
 Example 2 
((BS|
 
 (KBHFa)
|))
((BS3|
 
 (BHF)
|
 
 (BHF)
|
 
 (BHF)
|))
 Example 3 
((BS4|
 
 (BHF)
|
 
 (BHF)
|
 
 (BHF)
|
 
 (BHF)
|))
((BS2|
 
 (KBHFe)
|
 
 (KBHFe)
|))
 Example 4 
((BS|
 
 (BHF)
|))
((BS2|
 
 (BS2+l)
|
 
 (BS2c4)
|O2=
 
 (KBHFa)
|))
((BS2|
 
 (BS2l)
|
 
 (BS2r)
|))
((BS|
 
 (STR)
|))

Except for ((BS)) and ((BS-2)), all BSn row templates will join the icons in the same row cohesively, unless separated by an empty entry. To join the icons vertically, just open the same new BS row template and continue. (Example 1)

Editor can also line up different BSn row templates, because their icon column is set to align to center. This is usually done by joining odd number row template by odd number row template, even number row template by even number row template, in order to omit the need of empty entry to stack up grid space. In examples 2 and 3, the only icon of ((BS)) joins the 2nd icon of ((BS3)) vertically; and the 2nd and 3rd icons of ((BS4)) join the 1st and 2nd icons of ((BS2)) respectively.

When joining odd and even number row templates (example 4), specialized icons such as

 
 (BS2l) and
 
 (BS2c3)
(supplementary corner) are required to patch the seam smoothly. (See branching icons catalog.)

The same rules applies for BSn-2 templates, where the icon columns also align to center. However, mixing BSn and BSn-2 rows should be avoided because it will ruin the layout of the whole map.

About Pictograms

Icons repositories

Main article: Commons:BSicon/Catalogue

These pages describe the pictograms which are currently available. Watercourse pictograms, for rivers and canals, are listed separately.

The conventional file name format for this project's icons is: BSicon_pictogram ID.svg. In route diagram templates, an editor only needs to type the ID to display the desired icon. The name of a pictogram, or ID, is constructed from prefix + ROOT + suffix jointly (e.g.

 
 (uSTRlg) formed from u STR lg). The prefix and suffix are usually in lowercase, and the ROOT is all caps to distinguish it. All icons contain at least one ROOT, but may combine two or more to form some complex icons. Affixes mostly vary the base icon's color, directional, structure, etc. and may not apply to simple icons.

Because of the number of projects using these icons, additional codes have been created for special uses, including parallel routes and type changes.

Overlay

If a required icon does not exist it may be produced from two to six existing icons using the overlay parameter to superimpose one icon over another. Add the overlay parameters in the BSn or BSn-2 row template. O1 corresponds to the first (leftmost) place in the cell (icon grid), O2 to the second place in the cell, etc. More precisely, for a cell comprising n icons side by side, we have:

Overlay
((BS|
 
 (uSTRq)
|O1=
 
 (STR2)
|O12=
 
 (BHF)
|O13=
 
 (lHUB)
))

In order to allow the other editors to edit the diagram code more easily, it is a good practice to list the overlay icons immediately following the corresponding “base” icon entry. That way we humans do not need to look back and forth at the codes.

The following examples A and B give the same result, but example B is recommended:

Lining up overlay parameters
Example A ((BS2|
 
 (STR)
|
 
 (STR)
||Example A|O1=
 
 (uSTRq)
|O12=
 
 (lINT)
|O2=
 
 (uSTRq)
))
Example B ((BS2|
 
 (STR)
|O1=
 
 (uSTRq)
|O12=
 
 (lINT)
|
 
 (STR)
|O2=
 
 (uSTRq)
||Example B))

Collapsible sections

StartCollapsible

It is possible to make sections of BSn rows collapsible. The collapsible section begins with a BSn-startCollapsible row template (lacking the parameters Right Text2, Comment and tw), then include other "ordinary" BSn row templates which are set to be collapsible in the map, finally a table closing syntax ((!))} to end the collapsible section.

Parameter definitions are as follows:

((BS-startCollapsible| Icon ID | Margin | Right Text ))
1
2
3
((BS2-startCollapsible| Icon ID 1 | Icon ID 2 | Margin | Right Text ))
1
2
3
4
Collapsible section
((BS|
 
 (KBHFa)
|tw=450px))
((BS-startCollapsible|
 
 (LSTR)
|bg=#ccccff))
((BS|
 
 (eBHF)
|))
((!))}
((BS|
 
 (KBHFe)
|))
((BS-map
|title=Collapsible section
|collapsible=no
|legend=no
|map=
((BS|KBHFa||<code><nowiki>((BS|</nowiki>((bs-q|KBHFa||15px))<nowiki>|tw=450px))</nowiki>|tw=450px</code>))
((BS-startCollapsible|LSTR||<code><nowiki>((BS-startCollapsible|</nowiki>((bs-q|LSTR||15px))<nowiki>|bg=#ccccff))</nowiki>|bg=#ccccff</code>))
((BS|eBHF||<code><nowiki>((BS|</nowiki>((bs-q|eBHF||15px))<nowiki>|))</nowiki></code>))
((!))}
((BS|STR||<code><nowiki>((!))}</nowiki>))
((BS|KBHFe||<code><nowiki>((BS|</nowiki>((bs-q|KBHFe||15px))<nowiki>|))</nowiki></code>))
))

If the map has a combined use of different BS# row templates, the editor should choose the startCollapsible template which provides the same icon grids quantity as the greatest BS# row template used in the map (e.g., use ((BS5-startCollapsible)) when ((BS5)) is the largest row template used in the map).

In the startCollapsible template the color parameter bg colors the background of the entire collapsible section rather than its effect in ordinary BSn row templates which is confined to a single row. This clearly distinguishes between the non-collapsible and expanded collapsible sections.

Row replacement for Start-Collapsible

BS-replace
Row 0
Row 0 Replaced
Row 1
Row 2
Row 3
Row 3 Replaced
Row 4
Row 5
((bsmap
|title=BS-replace
|collapsible=0
|legend=0
|map=
((BS3-startCollapsible|CONTg|CONTg|CONTg||Row 0|bg=#ccf))
((BS3-replace|ENDEa|KBHFa|ENDEa||Row 0 Replaced|bg=#ccf))
((BS3|STR|STR|STR||Row 1))
((!))}
((BS3|BHF|BHF|BHF||Row 2|tw=160px))
((BS3-startCollapsible|LSTR|LSTR|LSTR||Row 3|bg=#cbf))
((BS3-replace|STR|BHF|STR||Row 3 Replaced|bg=#cbf))
((BS3|STR|STR|STR||Row 4))
((!))}
((BS3|KBHFe|KBHFe|KBHFe||Row 5))
))

BS-replace templates are supplementary to the BS-startCollapsible (BS-sc) row template that they replace, or more accurately, overlap over, the original BS-sc row template after expansion. The design aim is to make maps correct, both when collapsed and expanded. Because most maps use

 
 (LUECKE) or
 
 (CONTg)
to indicate the section being collapsed, but these icons might not make sense when expanded. It works simply by placing the BS-replace (child) template under the BS-sc (parent) template to be replaced. The available parameters are same as the BS-sc templates. These templates are experimental and still require testing in various browsers. It might not work properly in IE7 or older browsers because they might shift BS-replace templates incorrectly after expansion.

Since BS-replace does not actually hide its parent BS-sc, if you have changed the background color of the BS-sc template with parameter bg, you should do the same for the child BS-replace template. If you want to hide the text in BS-sc (which is unnecessary in most case), you can use ((pad)) in the text cell of BS-replace and adjust the width that completely cover the text. Since the April 2013 update, if you want to cover the base icon with empty entry, you still need to use the

 
 (leer) icon to fill in the BS-replace icon cell manually, otherwise the BS-sc icon will still show up after expansion.

StartCollapsible and Row replacement for BSn-2

StartCollapsible and its replacement row templates are available for BSn-2 maps. When using these templates, entries for new parameter tw-left (width of left text cell) are required. It should be applied at any conventional BSn-2 template outside of the collapsible section, every startcollapsible and replace (if any) templates with exact same value otherwise the icon cells will be unable to align themselves correctly.

Caveat: Older versions of Google Chrome cannot line up the BSn-2sc and BSn-2replace templates correctly.

BSn-2sc and replace templates
West Terminal
East Terminal
Central Transfer
Cross-platform transfer
closed platform
Depot
to countryside
South Terminal

Lining up Collapsible sections

This requires parameter |tw= (and |tw-left=) to fix the width of the Right_Text column (and Left_Text column). They are naturally present in the collapsible templates. The way they are used in the ordinary bBSn, BSn-2 templates is to be rewritten.


Helper templates

There are a number of templates that assist and simplify the display of text in route diagrams.

Navbar

Template:RDTnavbar
Input:

((RDTnavbar|Template))

Result:

 

The ((RDTnavbar)) template can be used to place view • talk • edit links in a route diagram that does not automatically insert them (for example, when formatted for use in an ((infobox))). (This template is a wrapper for Template:Navbar, with options set for use in RDTs.)

Template:BS-map
|navbar=Template

The |navbar= parameter of ((BS-map)) performs the same function. It should be given the name of the RDT, omitting the Template: prefix.

BSntext

Template:BS3text
Input:

((BS|ENDExe||))
((BS3text|Alternate proposals|||''via''))
((BS3|exINT||exBHF||Route 1 ((!)) Route 2))

Result:
Alternate proposals
via
Route 1 | Route 2

The ((BS#text)) template is used to place a centered row of text in the area where icons are normally displayed. In all cases, the last three fields are the same as regular BS# templates, providing for Right Text, Right Text2 and Comment (but no Margin column).

BS-colspan

Template:BS-colspan
Input:

((BS|KBHFxe||Terminal))
((BS-colspan))
Opening ''ca.'' 2020 ↓
((BS|exBHF||Station))

Result:
Terminal

Opening ca. 2020 ↓

Station

The ((BS-colspan)) template is used to place text across the entire width of the table. All standard formatting can be used.

Two-line text display templates

BScvt

Template: BScvt
Result: Input:
0 mi
0 km
((BScvt|0))
150 m
164 yd
((BScvt|150|in=m))
100.0 mi
160.9 km
((BScvt|100.0|align=left))

This template displays a distance as two lines of text in a text field. The default input is miles, and the template calculates the kilometre equivalent.

The text is right-aligned, but can be changed to left- by applying the parameter "align=left".

BSsplit

Template: BSsplit
opened 1900
closed 1969
((BSsplit|opened 1900|closed 1969))
simple
open
9 am–3 pm
((BSsplit|open|9 am–3 pm|align=right))
right
open
9 am–3 pm
((BSsplit|open|9 am–3 pm|align=left))
left
Zone
free-fare
((BSsplit|Zone|free-fare||it|align=right|line=yes))
it+line+right
Canada
USA
((BSsplit|Canada|USA|bg1=#f00|bg2=lightblue|align=center))
background
param1
param2
((BSsplit|param1|param2|param3))
link

BSsplit displays two lines of text in a single row table.

The template also adjusts the text height so that it will not cause spaces to appear between the rows of icons.

BSto

Template:BSto
Input:
Result:
((BSto|Line Name|to Destination))
Line Name
to Destination
 
Input:
Result:
((BSto|Other Route|to Somewhere Else|align=right))
Other Route
to Somewhere Else
 
Input:
Result:
((BSto|Station|for Nearby Town|it=off))
Station
for Nearby Town
 
Input:
Result:
((BSto|Continuing line|to Terminus|it=all))
Continuing line
to Terminus

The BSto template is intended for labeling connecting routes or adding other secondary information, as the second line is smaller and italicized. It also lacks a separating line. The optional align parameter will left- or right-justify text; if omitted it will default to “inherit”. The optional it parameter controls italicization.

BSsrws

BSsrws displays a railway station name split over two lines of text in a single table row. The first and second parameters are the two lines, which are combined to form the station name. The words railway station are not needed. All the formatting options of ((BSsplit)) also apply to this template.

((BSsrws|Stratford|International))displays
Stratford
International
and links to [[Stratford International railway station]].

Element Formatting

Stnlnk

Template:Stnlnk
Input:
((Stnlnk|Junction)) or ((rws|Junction))
Result:
Junction
(links to [[Junction railway station]])

Stnlnk (shortcut: ((rws))) expands its parameter to link to the appropriate railway station article, without displaying the text "railway station". It is generally preferred to use the station, unless there is a specific reason to link to the place itself.

A number of other templates provide the same function for specific systems:

Template Shortcut(s) Used for
((Station)) ((stn)) Any transit, bus station or train station, with lowercase word "station"
((STN)) none Any transit, bus station or train station, with the word "Station" capitalized
((BSsrws)) none Any station, split over
two lines
of text
((Stnlnk)) ((rws)) Railway stations
((Gare)) none Any French railway station ("Gare de …")
((Hbf)) none Any German central station ("… Hauptbahnhof")
((Metro)) none Metro stations
((Metrod)) none Any metro station with disambiguating qualifier
((Subway)) none Subway stations
((LRT Station)) ((lrt)) or ((lrts)) Light rail transit stations
((MRT station)) ((mrt)) or ((mrts)) Mass rapid transit stations
((Rht)) none Railway halts
((Tram)) none Tram stops
((Tstop)) none Any transit stop
((Ferry)) ((fw)) Ferry wharves
Specific locations
North America
Amtrak stations ((amtk)) Amtrak
CTA stations ((cta)) Chicago Transit Authority
Exo stations ((Exos)) Exo (formerly RTM, Greater Montreal)
MAX stations ((maxs)) MAX Light Rail (Portland, Oregon)
MBTA stations ((bts)) MBTA (Boston)
MNRR stations ((mnrr)) Metro-North Railroad (New York and Connecticut)
MTA Maryland stations ((mtams)) Maryland Transit Administration (excluding MARC Train)
Muni stations ((munis)) San Francisco Municipal Railway and Muni Metro
NJT stations ((njts)) NJ Transit Rail Operations (New Jersey)
SCAX stations ((scax)) Metrolink (California)
WMATA stations ((wmata)) Washington Metro (Washington, D.C.)
Elsewhere
((StnlnkA)) ((rwsa)) Australia and New Zealand
((DLRstation)) ((dlr)) Docklands Light Railway (London)
((IWLR)) none Inner West Light Rail (Sydney)
((Komuter station)) ((kstn)) KTM Komuter (Kuala Lumpur)
((Tubestation)) ((lus)) London Underground
((Metro Madrid)) ((MdM)) Madrid Metro
((StnlnkR)) ((rwsr)) Russia
Template Shortcut Used for

RouteBox

Template:RouteBox
Input:
((RouteBox|Circle line|Circle line (London Underground)
|#((LUL color|Circle))|#((LUL color|Piccadilly))))
Note that the command is split into two lines because of space constraints.
Result:
 Circle line 

The ((RouteBox)) (shortcut:((rbox))) template displays a borderless box with colorable wikilinked text, suitable for displaying a route or line name in its own color.

Enlarge

Template:Enlarge
Chalk Farm
South Kentish Town
enlarge… Camden Town
Euston
Mornington Crescent

The ((Enlarge)) template displays a magnifying glass icon that links to another RDT to illustrate a small area in greater detail.

Icon display templates

RoutemapRouteIcon

UpperLeft arrow Up arrow UpperRight arrow
Left arrow Right arrow
LowerLeft arrow Down arrow LowerRight arrow

A single arrowhead can be displayed using the ((RoutemapRouteIcon)) (shortcut: ((rmri))) template.

Rail-interchange

Template:Rail-interchange
Mainline rail interchange
Generic modal icon
BSicon CLRV.svg  501 
City-specific icon with links
and optional colour change

The ((Rail-interchange)) (shortcut:((rint))) template is used to indicate types of connections. It places the appropriate icon (in some cases with a link) in a map row. Some cities have additional arguments for individual services, and sometimes options for modifying the display. A complete list of icons is at Template:Rail-interchange/doc.

BSflag

Template:BSflag
Arkadelphia
DodgerBlue flag waving.svg

The ((BSflag)) template displays a colored flag to indicate a “flag” or request stop, and links to [[request stop]].

Jctrdt

Code Result
((Jctrdt|state=CA|I|10)) I-10 (1961).svg I-10
((Jctrdt|state=CA|I|10)) I-10 (1961).svg I-10

The ((Jctrdt)) template will display a smaller highway shield for use in route diagram template rows.

UK road

Code Result Links to
((UK road|A1))  A1  [[A1 road (Great Britain)]]
((UK road|B1000))  B1000  [[B roads in Zone 1 of the Great Britain numbering scheme]]
((UK road|M10))  M10  [[M10 motorway (Great Britain)]]

This template displays a small icon with an appropriate link for A and B roads and Motorways in Great Britain.

Examples

Basic route diagram template using BSn only

Eurostar route map
km
hour
0 St. Pancras International
Underground no-text.svg
0:00
Stratford International
DLR no-text roundel.svg
(opening 2010)
37 Ebbsfleet International
0:15
90 Ashford International
0:30
Calais-Fréthun
0:54
Lille-Europe
1:20
Bruxelles Midi/Brussel-Zuid
1:51
492 Paris Gare du Nord
2:15
Marne la Vallée-Chessy 2:33
Avignon Centre
5:40
Moûtiers
(ski)
6:27
Aime la Plagne
(ski, set down only)
6:59
Bourg Saint Maurice
(ski)
7:17

Times shown are fastest timetabled journey from London St Pancras.

Note: The code here produces the adjoining map. It does not mean to reflect the current situation.

((BS-map
|title=Eurostar route map
|title-color=white
|title-bg=#27404E
|width=370px
|map=
((BS||km|||hour))
((BS|KBHFa|0|[[St Pancras railway station|St. Pancras International]] [[File:Underground no-text.svg|10px]]||0:00))
((BS|eHST||[[Stratford International station|Stratford International]] [[File:DLR no-text roundel.svg|10px]]|(opening 2010)))
((BS|HST|37|[[Ebbsfleet International railway station|Ebbsfleet International]]||0:15))
((BS3|exCONTgq|eABZg+r||||[[Fawkham Junction]] ((RoutemapRoute|Licon=L|[[Chatham Main Line]]|enclosed=yes|))|))
((BS|HST|90|[[Ashford International railway station|Ashford International]]||0:30))
((BS|tSTRa))
((BS3||tZOLL||||[[United Kingdom|GB]]-[[France|FR]] border ([[Channel Tunnel]] across [[Strait of Dover]])|bg=#558cd3))
((BS|tSTRe))
((BS|HST||[[Gare de Calais-Fréthun|Calais-Fréthun]]||0:54))
((BS|BHF||[[Gare de Lille-Europe|Lille-Europe]]||1:20))
((BS3||KRWgl|KRW+r|||))
((BS3||STR|GRENZE|||[[France]]-[[Belgium]] border))
((BS3|KRW+l|KRWgr|KBHFe||[[Brussels-South|Bruxelles Midi/Brussel-Zuid]]||1:51))
((BS3|KBHFe|KRWgl|KRW+r|492|[[Gare du Nord|Paris Gare du Nord]]||2:15))
((BS3||STR|KHSTe||[[Marne la Vallée-Chessy railway station|Marne la Vallée-Chessy]]|([[Disneyland Resort Paris|Disneyland]])|2:33))
((BS3|KRW+l|KRWgr))
((BS3|KHSTe|STR|||[[Avignon]] Centre||5:40))
((BS|HST||[[Moûtiers]]|(ski)|6:27))
((BS|eHST||[[La Plagne|Aime la Plagne]]|(ski, set down only)|6:59))
((BS|KHSTe||[[Bourg Saint Maurice]]|(ski)|7:17))
|bottom=Times shown are fastest timetabled journey from London St Pancras.
))

An example with collapsible sections

Eurostar route map
hours
London St. Pancras
Stratford International
Ebbsfleet International
0:00 Original terminal
0:50 Ashford International
Channel Tunnel (0:21 transit)
1:15 Calais-Fréthun
1:40 Lille-Europe
2:15 Brussels Gare du Midi
2:35 Paris Gare du Nord
2:53 Marne-la-Vallée – Chessy
(Disneyland)
6:00 Avignon Centre
6:47 Moûtiers
(ski)
7:19 Aime la Plagne
(ski: set down only)
7:37 Bourg Saint Maurice
(ski)
((BS-map
|title = Eurostar route map
|width = 330px
|map =
((BS | |hours))
((BS |KBHFa| |'''[[St Pancras railway station|London St. Pancras]]'''))
((BS |HST  | |((stn|Stratford International))))
((BS |HST  | |[[Dartford International railway station|Ebbsfleet International]]))
((BS3-startCollapsible| |hKRZWae| |        |Original terminal|bg=#c0c0f0))
((BS3-replace|exKBHFa   |hKRZWae| |''0:00''|[[Waterloo Station|London Waterloo]]|''(closed 2011)''|bg=#c0c0f0))
((BS3        |exKRWl    |eKRWg+r| |        |))
((!))}
((BS |HST  |O1=PORTALf |0:50|((rws|Ashford International))))
((BS |tZOLL|           |    |[[Channel Tunnel]] ''(0:21 transit)''))
((BS |HST  |O1=PORTALg |1:15|((Gare|Calais-Fréthun))))
((BS |BHF              |1:40|((Gare|Lille-Europe))))
((BS3|     |KRWgl|KRW+r|    |))
((BS3|     |STR |GRENZE|    |))
((BS3|KRW+l|KRWgr|KBHFe|2:15|'''[[Bruxelles Gare du Midi / Brussel-Zuid railway station|Brussels Gare du Midi]]'''))
((BS3|KBHFe|KRWgl|KRW+r|2:35|'''[[Gare du Nord|Paris Gare du Nord]]'''))
((BS3|     |STR  |KHSTe|2:53|'''[[Marne-la-Vallée – Chessy]]'''|(Disneyland)))
((BS3|KRW+l|KRWgr|     |))
((BS3|KHSTe|STR  |     |6:00|'''[[Avignon]] Centre'''))
((BS       |HST        |6:47|[[Moûtiers]]|(ski)))
((BS       |pHST       |7:19|[[La Plagne|Aime la Plagne]]|(ski: ''set down only'')))
((BS       |KHSTe      |7:37|'''[[Bourg Saint Maurice]]'''|(ski)))
))

Style guide

Main page: Wikipedia:Route diagram template/MOS

 Options for vee station 
vSTRg+l with
vBHF and
ABZld overlays
with lBHF
 
 Interruptions 
Other Railway
to Somewhere
Right arrow 
Station
Other Railway
 
 Custom legend 
Station A
Station B
Station C
Station D

Key to services
Express
Weekday local
Weekend, holiday local

Developer notes (Own icons)

In most case the icons available in Wikimedia Commons should be sufficient. However, if you think you need to create an icon of your own, please take note of the following points:


See also

Canal/Water icons
FootPath icons
Motorway icons
Rail icons
Optional helper templates

Notes and references

  1. ^ see the navbar at the end of the page