வார்ப்புரு:Route diagram template
{{Shortcut|WP:RDT|WP:TRAIL|WP:ROUTE}}
 &lt;!-- {{transwiki guide}} --&gt;
 {{ombox
 |text= This page mainly describes the {{tl|BS-map}} template and its auxiliary templates. For the {{tl|Routemap}} template and how to compile BS-maps into Routemaps, see [[Template:Routemap]]. Use of {{tl|Routemap}} is currently preferred as it displays correctly on the mobile site.}}
 {{for|a tabulated list of many of the pictograms available for railway routemaps|Wikipedia:Route diagram template/Catalog of pictograms}}
  
 The '''route diagram templates''' encompass a main container, named {{tl|Routemap}} or {{tl|BS-map}}, and its auxiliary templates&lt;ref&gt;see the navbar at the end of the page&lt;/ref&gt;, most of them having BS (German: BahnStrecke) at the root of their name. This system provides a uniform layout for route-map [[Wikipedia:WikiProject Infoboxes|infobox]]es, mainly for railway lines but also for other modes of transport such as [[Wikipedia:WikiProject UK Waterways|waterways]]. Such a map is built as a stack of rows, whose most significant part is a cell lining up one or several square 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.
 {{Rdt demo}}
 {{TOCleft}}
 {{clear}}
 
 == Structure used before 2011 ==
 
 [[File:BS map table format.svg|300px|thumb|Obsoleted structure of standalone map]]
 
 Before the creation of {{tl|BS-map}} (in June 2011), the construction of a stand-alone map required several templates:
 * {{tl|Railway line header}}
 * {{tl|BS-header}} and
 * {{tl|BS-table}},
 
 as shown in the diagram to the right. Currently (2016), this format is still used in many maps. However, this format is deprecated and only the {{tl|BS-map}} template, which employs identical syntax, should be used as global container. The more efficient {{tl|Routemap}} template should be considered when creating new diagrams.
 {{-}}
 
 &lt;!--
 The templates may be considered to be in two classes:
 #General templates defining the product as a route map,
 #Detailing templates carrying information row by row into the route map. 
 
 === Master table margin style-defining templates ===
 {|{{railway line header|width:200px}}
 {{bs-header|railway line header}}
 {{bs-table|no}}
 {{bs1|BHF||text placeholder|placeholder}}
 |}
 |}
 {|{{railway line header2|width:200px}}
 {{bs-header|railway line header2}}
 {{bs-table|no}}
 {{bs1|BHF||text placeholder|placeholder}}
 |}
 |}
 The opening of a &quot;stand-alone&quot; map (i.e. without transcluded into other template such as infobox.) They do not call for the table themselves, so follow the command &lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;{|&lt;/nowiki&gt;&lt;/tt&gt; to call for a Wiki table. These templates also include the parameter {{{1}}} for extra CSS styling and {{{collapse}}} to define the collapse state of the table.
 {|style=&quot;border:1px solid #ccf&quot;
 |-
 | {{tl|Railway line header}} ||Right-aligned with collapsible button
 |-style=&quot;background-color:#ccf&quot;
 | {{tl|Railway line header (center)}} ||Centred in page with collapsible button
 |-
 | {{tl|Railway line header2}} ||Right-aligned, non-collapsible
 |-style=&quot;background-color:#ccf&quot;
 | {{tl|Railway line header2 (center)}} ||Centred in page, non-collapsible
 |-
 |}
 
 === Table title template ===
 {{tl|BS-header}} defines the text title of the table; use it right below the ''railway line header''. They are not necessary especially when included in the infobox. But editor has the option to set the colors for both title background and font, thus indicate the livery color of the line. 
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;border:1px solid black&quot;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;{{BS-header|&lt;/nowiki&gt;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Text&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Template name&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Background color&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Font color&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/tt&gt;
 |-
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;1
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;2
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;3
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;4
 |}
 
 {|{{railway line header2 (center)|width:600px}}
 {{BS-header|Pink Line|Pink Line RDT|pink|#000000}}
 |-
 |&lt;tt&gt;&lt;nowiki&gt;{|{{railway line header2 (center)|width:600px}}&lt;/nowiki&gt;&lt;/tt&gt;&lt;br /&gt;
 &lt;tt&gt;&lt;nowiki&gt;{{BS-header|Pink Line|Pink Line RDT|pink|#000000}}&lt;/nowiki&gt;&lt;/tt&gt;&lt;br /&gt;
 &lt;tt&gt;&lt;nowiki&gt;|}&lt;/nowiki&gt;&lt;/tt&gt;
 |}
 *Although there is the 5th unnamed parameter for defining table width, it is now recommended to define the table width in the outermost table header as shown above (CSS style syntax &quot;width:600px&quot; in the railway line header template.)
 *As per [[WP:COLOR]], editor should take accessbility of color in mind. {{tl|colorbox}} or a separate icon next to the map title is preferable over coloring the background of the text.
 
 === Railway company information template ===
 The optional provision of the details of a railway company. Preferably used between the {{tl|BS-header}} and {{tl|BS-table}}.
 {|style=&quot;border:1px solid #ccf&quot;
 |-
 | {{tl|Infobox rail line}} ||Infobox line data
 |-style=&quot;background-color:#ccf&quot;
 | {{tl|BS-Infobox}} ||Stripped down Infobox line data in English
 |-
 | {{tl|Infobox UK railway}} ||Provision of Railway Company Information (i.e. as in {{tl|Glasgow, Paisley, Kilmarnock and Ayr Railway}})
 |}
 --&gt;
 
 == Standalone map container ==
 &lt;dl style=&quot;margin-top: 1em; overflow: hidden;&quot;&gt;
 &lt;dt style=&quot;float: left; padding-top: 1em; font-size: 120%;&quot;&gt;{{tl|BS-map}}&lt;/dt&gt;
 &lt;dd style=&quot;float: left; margin-left: 0.5em;&quot;&gt;&lt;pre&gt;
 {{BS-map
 &lt;&lt;stack of params&gt;&gt;
 |map=
 &lt;&lt;stack of {{BS-templates}}&gt;&gt;
 }}
 &lt;/pre&gt;&lt;/dd&gt;
 &lt;dt style=&quot;float: left; padding-left: 2em; padding-top: 1em; font-size: 120%;&quot;&gt;{{tl|Routemap}}&lt;/dt&gt;
 &lt;dd style=&quot;float: left; margin-left: 0.5em;&quot;&gt;&lt;pre&gt;
 {{Routemap
 &lt;&lt;stack of params&gt;&gt;
 |map=
 &lt;&lt;stack of text! !icons~~text&gt;&gt;
 }}
 &lt;/pre&gt;&lt;/dd&gt;
 &lt;/dl&gt;
 
 Template {{tl|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 {{para|map}} parameter. Beside this stack of row describers, various parameters can be given to describe the global behavior of the resulting map. They are:
 
 {{BS-map/parameters}}
 
 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 {{tl|BS-map}} and {{tl|Routemap}} ===
 {|class=wikitable
 |
 ! scope=&quot;col&quot; | BS-map
 ! scope=&quot;col&quot; | Routemap
 |-
 ! scope=&quot;row&quot; | Row syntax
 |
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center; color:blue;&quot;
 |&lt;nowiki&gt;{{BS&lt;/nowiki&gt;{{mvar|n}}&lt;nowiki&gt;|&lt;/nowiki&gt;
 |{{black|''{{small|1=&lt;span style=&quot;font-family:sans-serif&quot;&gt;icons&lt;/span&gt;}}''}}
 |&amp;#124;
 |Margin
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 | }}
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+1
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+2
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+3
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+4
 |} 
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center;  color:blue;&quot;
 |&lt;nowiki&gt;{{BS&lt;/nowiki&gt;{{mvar|n}}&lt;nowiki&gt;-2|&lt;/nowiki&gt;
 |{{black|''{{small|1=&lt;span style=&quot;font-family:sans-serif&quot;&gt;icons&lt;/span&gt;}}''}}
 |&amp;#124;
 |Left Text
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Left Text2
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 |&lt;nowiki&gt;}}&lt;/nowiki&gt;
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+1
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+2
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+3
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+4
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+5
 |}
 |&lt;div style=&quot;font-family:monospace; text-align:center;&quot;&gt;
 {| cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;margin:0 auto&quot;
 |-
 |{{blue|Left Comment}}
 |'''~~'''
 |{{blue|Left Text2}}
 |'''~~'''
 |{{blue|Left Text}}
 |'''~~'''
 |{{blue|Left Margin}}
 |{{nowrap|1='''! !''' ''{{small|1=&lt;span style=&quot;font-family:sans-serif&quot;&gt;icons&lt;/span&gt;}}'' '''~~'''}}
 |{{blue|Right Margin}}
 |'''~~'''
 |{{blue|Right Text}}
 |'''~~'''
 |{{blue|Right Text2}}
 |'''~~'''
 |{{blue|Right Comment}}
 |}
 ----
 {| cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;margin:0 auto&quot;
 |{{blue|Left Text}}
 |{{nowrap|1='''! !''' ''{{small|1=&lt;span style=&quot;font-family:sans-serif&quot;&gt;icons&lt;/span&gt;}}'' '''~~'''}}
 |{{blue|Right Text}}
 |}
 &lt;/div&gt;
 |-
 ! scope=&quot;row&quot; | Icon separator
 | &lt;code&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/code&gt;
 | &lt;code&gt;\&lt;/code&gt;
 |-
 ! scope=&quot;row&quot; | Overlays
 | &lt;code&gt;&amp;#124;O{{BSsplit|column|number|4=i}}{{BSsplit|&amp;nbsp;overlay|&amp;nbsp;number|4=i}}=&lt;/code&gt;''icon''
 | &lt;code&gt;&lt;nowiki&gt;!~&lt;/nowiki&gt;&lt;/code&gt;''icon''
 |-
 ! scope=&quot;row&quot; | Text column separator
 | &lt;code&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/code&gt;
 | &lt;code&gt;~~&lt;/code&gt;
 |}
 
 *'''See the [[Template:BS-map/doc|template documentation]] for more information.'''
 *If you are creating table from scratch rather than by using templates, the [[vertical bar]] &lt;code style=color:red&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;&lt;/code&gt; – which is heavily used in Wiki table syntax – must be replaced by &lt;code style=color:red&gt;&lt;nowiki&gt;{{!}}&lt;/nowiki&gt;&lt;/code&gt;. For example, &lt;code style=color:red&gt;&amp;#123;&amp;#124;&lt;/code&gt; is coded as &lt;code style=color:red&gt;&lt;nowiki&gt;{{{!}}&lt;/nowiki&gt;&lt;/code&gt;, and &lt;code style=color:red&gt;&amp;#124;-&lt;/code&gt; as &lt;code style=color:red&gt;&lt;nowiki&gt;{{!}}-&lt;/nowiki&gt;&lt;/code&gt;. Otherwise, the presence of the bar will corrupt the structure of the template and following article content. This is because when processing a template, the bar functions as a parameter separating entries, which overrides other functions.
 *When a visual separator is desired in text fields, the [[Unicode]] [[Box Drawing]] character &lt;code style=color:red&gt;┃&lt;/code&gt; should be used. (It is visually identical to the vertical bar, but ignored by [[Wiki markup]].) This character can be coded in [[HTML]] by &lt;code style=color:red&gt;&amp;amp;#2503;&lt;/code&gt;. In Microsoft Windows it can be input directly from the keyboard by holding down {{key press|Alt}}, followed by {{key press|+}}{{key press|2}}{{key press|5}}{{key press|0}}{{key press|3}} on the numeric keypad; or the sequence {{key press|2}}{{key press|5}}{{key press|0}}{{key press|3}}{{key press|Alt|x}}.
 
 === Diagrams inside Infobox rail line templates ===
 If an editor wishes to place an RDT inside an {{t|Infobox}} instead of having it stand alone, it is recommended that the {{t|Infobox rdt}} template be used instead of direct [[transclusion]] in order to prevent the diagram from &quot;breaking apart&quot;. A complete explanation is at [[Template:Infobox rdt/doc]].
 
 === Transcluding map in other infoboxes ===
 Besides standalone BS-map, row templates can be transcluded in other infobox templates such as {{tl|Infobox rail line}} or {{tl|Infobox public transit}}. The map syntax by BS row templates needs to be written in a separate template page and then transcluded in the said infobox and usually requires the help of other templates.
 
 == {{tl|BS-map}} rows with icons and text ==
 The real meat of designing the map are the templates BS{{mvar|n}} and BS{{mvar|n}}-2. Here '''BS''' is the German abbreviation of '''B'''ahn'''s'''trecke for ''stretch of track'', and the number {{mvar|n}} indicate how many horizontal icons are put side by side to form the required picture. Templates BS{{mvar|n}} and BS{{mvar|n}}-2 differ by the number of text parameters that are given after the {{mvar|n}} icon names. We have:
 {|
 |
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center; color:blue;&quot;
 |&lt;nowiki&gt;{{BS&lt;/nowiki&gt;{{mvar|n}}&lt;nowiki&gt;|&lt;/nowiki&gt;
 |{{black|''{{small|1=&lt;span style=&quot;font-family:sans-serif&quot;&gt;icons&lt;/span&gt;}}''}}
 |&amp;#124;
 |Margin
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 | }}
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+1
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+2
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+3
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+4
 |} 
 | and&amp;nbsp;
 |
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center;  color:blue;&quot;
 |&lt;nowiki&gt;{{BS&lt;/nowiki&gt;{{mvar|n}}&lt;nowiki&gt;-2|&lt;/nowiki&gt;
 |{{black|''{{small|1=&lt;span style=&quot;font-family:sans-serif&quot;&gt;icons&lt;/span&gt;}}''}}
 |&amp;#124;
 |Left Text
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Left Text2
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 |&lt;nowiki&gt;}}&lt;/nowiki&gt;
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+1
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+2
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+3
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+4
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+5
 |}
 |}
 
 Both kind of templates result in a row made of four cells (and, at the end, in a &lt;code&gt;&lt;nowiki&gt;&lt;tr&gt;...&lt;/tr&gt;&lt;/nowiki&gt;&lt;/code&gt; structure containing four &lt;code&gt;&lt;nowiki&gt;&lt;td&gt;...&lt;/td&gt;&lt;/nowiki&gt;&lt;/code&gt; structures). However, these structures are not the same for the BS{{mvar|n}} and the BS{{mvar|n}}-2 templates: they cannot be mixed in the same map.
 
 === BS{{mvar|n}} row templates ===
 When {{mvar|n}}&gt;1, the unnamed parameters describing the text areas are shifted to make way for extra icon grids sequentially. Therefore, the unnamed (sequential) parameters of {{tl|BS}}, {{tl|BS2}}, {{tl|BS3}} are as follows:
 
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center; color:blue;&quot;
 |&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;
 |Icon ID
 |&amp;#124;
 |Margin
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 | }}
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|1
 |
 |style=&quot;border-top:1px solid red&quot;|2
 |
 |style=&quot;border-top:1px solid red&quot;|3
 |
 |style=&quot;border-top:1px solid red&quot;|4
 |
 |style=&quot;border-top:1px solid red&quot;|5
 |} 
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center; color:blue;&quot;
 |&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;
 |Icon 1 ID
 |&amp;#124;
 |Icon 2 ID
 |&amp;#124;
 |Margin
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 | }}
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|1
 |
 |style=&quot;border-top:1px solid red&quot;|2
 |
 |style=&quot;border-top:1px solid red&quot;|3
 |
 |style=&quot;border-top:1px solid red&quot;|4
 |
 |style=&quot;border-top:1px solid red&quot;|5
 |
 |style=&quot;border-top:1px solid red&quot;|6
 |} 
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center; color:blue;&quot;
 |&lt;nowiki&gt;{{BS3|&lt;/nowiki&gt;
 |Icon 1 ID
 |&amp;#124;
 |Icon 2 ID
 |&amp;#124;
 |Icon 3 ID
 |&amp;#124;
 |Margin
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 | }}
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|1
 |
 |style=&quot;border-top:1px solid red&quot;|2
 |
 |style=&quot;border-top:1px solid red&quot;|3
 |
 |style=&quot;border-top:1px solid red&quot;|4
 |
 |style=&quot;border-top:1px solid red&quot;|5
 |
 |style=&quot;border-top:1px solid red&quot;|6
 |
 |style=&quot;border-top:1px solid red&quot;|7
 |} 
 
 These parameters are used to build four columns as follows:
 
 {|class=&quot;wikitable&quot; style=&quot;valign:top;&quot;
 |-
 |'''1..{{mvar|n}}'''|| [[#About Pictograms|'''Icon ID''']] the name of the {{mvar|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 {{mvar|n}}. For no icon to be shown leave blank (or use {{code|leer}}).
 |-
 |'''{{mvar|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).
 |-
 |'''{{mvar|n}}+2'''|| '''Right Text'''. Left aligned column. Can be used to give the name of a station or other feature (displayed in usual size).
 |-
 |'''{{mvar|n}}+3'''|| '''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 column, left aligned.
 |-
 |'''{{mvar|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 [[M:Help:Template#Parameters|'''named''' parameter]] syntax in the template (as text columns apply '''unnamed''' parameters). This can be bypassed by replacing the equals sign with &lt;code style=&quot;color:red&quot;&gt;{{tl|1==}}&lt;/code&gt; as in the case with vertical bar (pipe) that must be coded as {{tl|1=!}}. 
 
 {{BS-map
 |title=BS{{mvar|n}} row templates
 |width=400px
 |legend=no
 |map=
 !style=&quot;border-bottom:2px solid #be2d2c; text-align:center&quot;{{!}}Icons
 !style=&quot;border-bottom:2px solid black; text-align:center&quot; 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}}
 }}
 {{BS-map
 |title=BS{{mvar|n}} row templates
 |legend=no
 |map=
 !style=&quot;border-bottom:2px solid #be2d2c; text-align:center&quot;{{!}}Icons
 !style=&quot;border-bottom:2px solid black; text-align:center&quot; colspan=3{{!}}Text columns
 {{BS||km / min}}
 {{BS3||KBHFa|BUS|0 / 0|Airport|North terminal|Bus interchange}}
 {{BS|STR|5=Main tracks|tw=200px}}
 {{BS|KBHFe|1 / 1.5|Airport|South terminal}}
 }}
 &lt;pre&gt;&lt;nowiki&gt;
 {{BS-map
 |title=BS{{mvar|n}} row templates
 |width=400px
 |legend=no
 |map=
 !style=&quot;border-bottom:2px solid #be2d2c; text-align:center&quot;{{!}}Icons
 !style=&quot;border-bottom:2px solid black; text-align:center&quot; 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}}
 }}
 &lt;/nowiki&gt;&lt;/pre&gt;
 {{clear}}
 
 ===Cosmetic remark ===
 {{BS-map
 |collapsible=0
 |legend=0
 |title=Right Text and Comment on the same row
 |map=
 {{BS|BHF||Main text||Comment}}
 {{BS|BHF||||Some very long Comment}}
 |map2-title=Moving Comment to Right Text2
 |map2=
 {{BS|BHF||Main text|Right Text2}}
 {{BS|BHF||||Some very long Comment}}
 |map3-title=Applying {{tl|float}} on Right Text2
 |map3=
 {{BS|BHF||Main text|{{float|top=-17px|Right Text2}}}}
 {{BS|BHF||||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 {{tlx|float|2=top=-17px|3=...}}.
 
 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. 
 {{clear}}
 
 === BS{{mvar|n}}-2 row templates ===
 
 BS{{mvar|n}}-2 templates place text on both sides of the diagram, without the '''Distance/Time''' column, as opposed to the previously-introduced BS{{mvar|n}} row templates which only has text displayed to the right of the icon column(s). All named parameters of the BS{{mvar|n}} row templates are also applicable here. These templates should not be used with other &quot;right-Text only&quot; BS{{mvar|n}} row templates in the same diagram. An example is the [[template:rdt demo|demonstration]] at the top of this project page.
 
 The unnamed parameters are:
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center;  color:blue;&quot;
 |&lt;nowiki&gt;{{BS-2|&lt;/nowiki&gt;
 |Icon ID
 |&amp;#124;
 |Left Text
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Left Text2
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 |&lt;nowiki&gt;}}&lt;/nowiki&gt;
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|1
 |
 |style=&quot;border-top:1px solid red&quot;|2
 |
 |style=&quot;border-top:1px solid red&quot;|3
 |
 |style=&quot;border-top:1px solid red&quot;|4
 |
 |style=&quot;border-top:1px solid red&quot;|5
 |
 |style=&quot;border-top:1px solid red&quot;|6
 |}
 
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
 |- style=&quot;font-family:monospace; text-align:center;  color:blue;&quot;
 |&lt;nowiki&gt;{{BS&lt;/nowiki&gt;{{mvar|n}}&lt;nowiki&gt;-2|&lt;/nowiki&gt;
 |Icon 1 ID
 |&amp;#124;
 |…
 |&amp;#124;
 |Icon {{mvar|n}} ID
 |&amp;#124;
 |Left Text
 |&amp;#124;
 |Right Text
 |&amp;#124;
 |Left Text2
 |&amp;#124;
 |Right Text2
 |&amp;#124;
 |Comment
 |&lt;nowiki&gt;}}&lt;/nowiki&gt;
 |- style=text-align:center;
 |
 |style=&quot;border-top:1px solid red&quot;|1
 |
 |
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+1
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+2
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+3
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+4
 |
 |style=&quot;border-top:1px solid red&quot;|{{mvar|n}}+5
 |}
 
 These parameters are used to build four columns, in the following order:
 
 {|class=&quot;wikitable&quot; style=&quot;margin-bottom: 3em; valign:top;&quot;
 |-
 |'''{{mvar|n}}+1'''|| '''Left Text'''. Right aligned column. Can be used to give the name of a station or other feature (displayed in usual size).
 |-
 |'''{{mvar|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..{{mvar|n}}'''|| [[#About Pictograms|'''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).
 |-
 |'''{{mvar|n}}+2'''|| '''Right Text'''. Left aligned column. Can be used to give the name of a station or other feature (displayed in usual size).
 |-
 |'''{{mvar|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.
 |-
 |'''{{mvar|n}}+5'''|| '''Comment'''. Right aligned self standing '''fourth''' column. Displayed in small size. Can be used to display ''Dist./Time'' (or anything else).
 |}
 
 {{BS-map
 |title=BS{{mvar|n}}-2 row templates
 |collapsible=no
 |legend=no
 |map=
 !style=&quot;border-bottom:2px solid black; text-align:center;&quot;{{!}}Left text column
 !style=&quot;border-bottom:2px solid #be2d2c; text-align:center;&quot;{{!}}Icons
 !style=&quot;border-bottom:2px solid black; text-align:center;&quot; colspan=1{{!}}Right text column
 !style=&quot;border-bottom:2px solid blue; text-align:center; font-color:blue&quot; 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|}}
 }}
 &lt;pre&gt;&lt;nowiki&gt;
 {{BS-map
 |title=BS{{mvar|n}}-2 row templates
 |collapsible=no
 |legend=no
 |map=
 !style=&quot;border-bottom:2px solid black; text-align:center;&quot;{{!}}Left text column
 !style=&quot;border-bottom:2px solid #be2d2c; text-align:center;&quot;{{!}}Icons
 !style=&quot;border-bottom:2px solid black; text-align:center;&quot; colspan=1{{!}}Right text columns
 !style=&quot;border-bottom:2px solid blue; text-align:center; font-color:blue;&quot; 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|}}
 }}
 &lt;/nowiki&gt;&lt;/pre&gt;
 
 === 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 BS{{mvar|n}} and the BS{{mvar|n}}-2 templates (except for tw-left). For a given '''{{mvar|n}}''', letter '''{{mvar|p}}''' designs a non greater integer, i.e. 1≤{{mvar|p}}≤{{mvar|n}}. Most of the time, {{mvar|p}}=1 is coded by nothing, rather than by &quot;1&quot;.
 * '''bg''': Use color name or HTML RGB hex code (with prefix &lt;span style=&quot;color:blue;&quot;&gt;#&lt;/span&gt;) as background to &quot;highlight&quot; or to emphasize certain sections, transparent by default
 * '''tw''': Width of the Right Text column. This is especially required for joining the icons cohesively when the text length in the &quot;normal&quot; BS row template text column is not wide enough to override the [[#Collapsible sections|BS row collapsible sections]]. 
 * '''tw-left''': Width of the Left Text column. This is especially required for joining the icons cohesively when the text length in the &quot;normal&quot; BS row template text column is not wide enough to override the [[#Collapsible sections|BS row collapsible sections]]. 
 * '''PX''', '''PX2''',... '''PX{{mvar|p}}''': size of the icon (e.g. PX=50px). Parameter PX is the default value of the PX2...PX{{mvar|p}}, while {{tl|BSpx}} is the default value of PX (actually, this amounts to x20px, coding for 20px high. This parameter acts only on its row.
 * '''O({{mvar|p}})({{mvar|q}})''' (Oh,p,q, not zero,p,q). These parameters are user to describe the icons overlay. For more details, see the [[#Overlay|overlay]] section.
 * '''alt1''', '''alt2''',... '''alt{{mvar|p}}''': User-defined [[alt attribute]] for the icon image to override the alt text generated by {{tl|BS-alt}}. See also [[Wikipedia:Alternative text for images]]. Note that this parameter has been deprecated and is no longer in use.
 * '''L1''', '''L2''',... '''L{{mvar|p}}''', etc.: User-defined internal link for the icon image to override the default link to file description page of the icon.
 
 &lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;display: inline-block;&quot;&gt;
 {{BS-map
 |title=Named parameters
 |collapsible=no
 |legend=no
 |map=
 {{BS|BHF||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|BHF||15px}}&lt;nowiki&gt;|PX=40px|bg=#ccccff|O1=&lt;/nowiki&gt;{{bs-q|CSTR||15px}}&lt;nowiki&gt;|O12=&lt;/nowiki&gt;{{bs-q|uSTRq||15px}}&lt;br&gt;&lt;nowiki&gt;|tw=500px|L1=Train station}}&lt;/nowiki&gt;&lt;/tt&gt;|PX=40px|bg=#ccccff|O1=CSTR|O12=uSTRq|tw=500px|L1=Train station}}
 }}
 &lt;/div&gt;&lt;/div&gt;
 
 === Lining up BS row templates ===
 {{BS-map
 |title=Lining up BS row templates
 |collapsible=no
 |legend=no
 |map-title=Example 1
 |map=
 {{BS2|STR|BHF||&lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|STR||15px}}&amp;#124;{{bs-q|BHF||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{BS2|BHF|STR||&lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|BHF||15px}}&amp;#124;{{bs-q|STR||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 |map2-title=Example 2
 |map2=
 {{BS|KBHFa||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|KBHFa||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{BS3|BHF|BHF|BHF||&lt;tt&gt;&lt;nowiki&gt;{{BS3|&lt;/nowiki&gt;{{bs-q|BHF||15px}}&amp;#124;{{bs-q|BHF||15px}}&amp;#124;{{bs-q|BHF||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 |map3-title=Example 3
 |map3=
 {{BS4|BHF|BHF|BHF|BHF||&lt;tt&gt;&lt;nowiki&gt;{{BS4|&lt;/nowiki&gt;{{bs-q|BHF||15px}}&amp;#124;{{bs-q|BHF||15px}}&amp;#124;{{bs-q|BHF||15px}}&amp;#124;{{bs-q|BHF||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{BS2|KBHFe|KBHFe||&lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|KBHFe||15px}}&amp;#124;{{bs-q|KBHFe||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 |map4-title=Example 4
 |map4=
 {{BS|BHF||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|BHF||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{BS2|BS2+l|BS2c4|O2=KBHFa||&lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|BS2+l||15px}}&amp;#124;{{bs-q|BS2c4||15px}}&lt;nowiki&gt;|O2=&lt;/nowiki&gt;{{bs-q|KBHFa||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{BS2|BS2l|BS2r||&lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|BS2l||15px}}&amp;#124;{{bs-q|BS2r||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{BS|STR||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|STR||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 }}
 
 Except for {{tl|BS}} and {{tl|BS-2}}, all BS{{mvar|n}} 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 BS{{mvar|n}} 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 {{tl|BS}} joins the 2nd icon of {{tl|BS3}} vertically; and the 2nd and 3rd icons of {{tl|BS4}} join the 1st and 2nd icons of {{tl|BS2}} respectively.
 
 When joining odd and even number row templates (example 4), specialized icons such as {{bs-q|BS2l}} and {{bs-q|BS2c3}} (supplementary corner) are required to patch the seam smoothly. (See [[Wikipedia:Route diagram template/Catalog of pictograms/branchings|branching icons catalog]].)
 
 The same rules applies for BS{{mvar|n}}-2 templates, where the icon columns also align to center. However, mixing BS{{mvar|n}} and BS{{mvar|n}}-2 rows should be avoided because it will ruin the layout of the whole map.
 {{clear}}
 
 == About Pictograms ==
 
 
 === Icons repositories ===
 {{main|Wikipedia:Route diagram template/Catalog of pictograms}}
 
 These two pages describe the pictograms which are currently available. Page  [[Wikipedia:Route diagram template/Catalog of pictograms/watercourses|waterways pictograms]] lists  separately the icons to be used for watercourses. Another directory of icons can be found at [[Commons:Category:Icons for railway descriptions|Wikimedia Commons]].
 
 The conventional file name format for image of this project is as follow: '''BSicon_(pictogram ID).svg'''. In BS''n'' row templates, editor only needs to type the ID for the desired icon. The name of a pictogram, or ID, is constructed by prefix, ROOT and suffix jointly (e.g. {{bs-q|uSTRlg}} forming by ''u-STR-lg''). Prefix and suffix are always lowercase but ROOT is all caps to distinguish from the affixes. All icons contain at least one ROOT, but may combine two or more to form some complex icons. Affixes mostly variate the &quot;base&quot; icon in color, directionality, 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 BS''n'' or BS''n''-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:
 
 * '''O1''' (Letter O one, not zero one), '''O12''', '''O13''', '''O14''', '''O15''': ID of an icon to overlay on the leftmost (p=1) icon of the cell, with five overlapping layers in maximum. The greater index of the parameter indicates the upper layer which is over the smaller (the base icon, described by {{para|1}} being at the bottom of the pile). 
 * '''O2''', '''O22''', '''O23''', '''O24''', '''O25''': ID of an icon to overlay on the 2&lt;sup&gt;nd&lt;/sup&gt; leftmost (p=2) icon of the cell (the base icon, described by {{para|2}} being at the bottom of the pile).  
 * '''O''p''''', '''O''p''2''', '''O''p''3''', '''O''p''4''', '''O''p''5''': ID of an icon to overlay on the ''p&lt;sup&gt;th&lt;/sup&gt;'' icon of the cell, etc.
 * '''For rows of 11 or more icons ({{tl|BS11}}, {{tl|BS12}}, {{tl|BS11-2}}, {{tl|BS12-2}}, etc)''': use two digits to reference ''p'', the icon number. In other words, use '''O''01''''', '''O''01''2''', '''O''01''3''', '''O''01''4''', '''O''01''5''' for 1&lt;sup&gt;st&lt;/sup&gt; icon, together with '''O''12''''', '''O''12''2''', '''O''12''3''', '''O''12''4''', '''O''12''5''' for 12&lt;sup&gt;th&lt;/sup&gt; icon, etc. In fact this is not logically required when n=11, but the doc was written that way. So we have &amp;#123;&amp;#123;BS11-2|O03= |O032=| already in use, and this can not be changed.
 * '''Overlay parameters''' require a valid entry for the corresponding base icon cell. Otherwise the overlay icons will not be loaded, and the page will be categorized in {{cl|RDTs with overlaps but no base icon}}.&lt;/span&gt;
 
 &lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;display: inline-block;&quot;&gt;
 {{BS-map
 |title=Overlay
 |collapsible=no
 |legend=no
 |map=
 {{BS|uSTRq|O1=STR2|O12=BHF|O13=lHUB||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|uSTRq||15px}}&lt;nowiki&gt;|O1=&lt;/nowiki&gt;{{bs-q|STR2||15px}}&lt;nowiki&gt;|O12=&lt;/nowiki&gt;{{bs-q|BHF||15px}}&lt;nowiki&gt;|O13=&lt;/nowiki&gt;{{bs-q|lHUB||15px}}&lt;nowiki&gt;}}&lt;/nowiki&gt;&lt;/tt&gt;}}
 }}
 &lt;/div&gt;&lt;/div&gt;
 
 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:
 &lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;display: inline-block;&quot;&gt;
 {{BS-map
 |title=Lining up overlay parameters
 |collapsible=no
 |legend=no
 |map=
 {{BS2|STR|STR||Example A &lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|STR||15px}}&lt;nowiki&gt;|&lt;/nowiki&gt;{{bs-q|STR||15px}}&lt;nowiki&gt;||Example A|O1=&lt;/nowiki&gt;{{bs-q|uSTRq||15px}}&lt;nowiki&gt;|O12=&lt;/nowiki&gt;{{bs-q|lINT||15px}}&lt;nowiki&gt;|O2=&lt;/nowiki&gt;{{bs-q|uSTRq||15px}}&lt;nowiki&gt;}}&lt;/nowiki&gt;&lt;/tt&gt;|O1=uSTRq|O12=lINT|O2=uSTRq}}
 {{BS2}}
 {{BS2|STR|O1=uSTRq|O12=lINT|STR|O2=uSTRq||Example B &lt;tt&gt;&lt;nowiki&gt;{{BS2|&lt;/nowiki&gt;{{bs-q|STR||15px}}&lt;nowiki&gt;|O1=&lt;/nowiki&gt;{{bs-q|uSTRq||15px}}&lt;nowiki&gt;|O12=&lt;/nowiki&gt;{{bs-q|lINT||15px}}&lt;nowiki&gt;|&lt;/nowiki&gt;{{bs-q|STR||15px}}&lt;nowiki&gt;|O2=&lt;/nowiki&gt;{{bs-q|uSTRq||15px}}&lt;nowiki&gt;||Example B}}&lt;/nowiki&gt;&lt;/tt&gt;}}
 }}
 &lt;/div&gt;&lt;/div&gt;
 
 == Collapsible sections ==
 
 === StartCollapsible ===
 
 It is possible to make sections of BS''n'' rows collapsible as if it were in a [[WP:NAVFRAME|NavFrame]]. The collapsible section begins with a '''BS''n''-startCollapsible''' row template (lacking the parameters '''Right Text2''', '''Comment''' and '''tw'''), then include other &quot;ordinary&quot; BS''n'' row templates which are set to be collapsible in the map, finally a table closing syntax &lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;{{!}}}&lt;/nowiki&gt;&lt;/tt&gt; to end the collapsible section.
 {|align=center
 |
 |}
 Parameter definitions are as follows:
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;border:1px solid black&quot;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;{{BS-startCollapsible|&lt;/nowiki&gt;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Icon ID&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&amp;#124;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Margin&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&amp;#124;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Right Text&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;}}&lt;/tt&gt;
 |-
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;1
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;2
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;3
 |}
 {|cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;border:1px solid black&quot;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&lt;nowiki&gt;{{BS2-startCollapsible|&lt;/nowiki&gt;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Icon ID 1&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&amp;#124;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Icon ID 2&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&amp;#124;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Margin&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;&amp;#124;&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;Right Text&lt;/tt&gt;
 |&lt;tt style=&quot;color:blue;&quot;&gt;}}&lt;/tt&gt;
 |-
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;1
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;2
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;3
 |
 |style=&quot;border-top:1px solid red&quot;|&lt;center&gt;4
 |} 
 
 {{BS-map
 |title=Collapsible section
 |collapsible=no
 |legend=no
 |map=
 {{BS|KBHFa||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|KBHFa||15px}}&lt;nowiki&gt;|tw=450px}}&lt;/nowiki&gt;|tw=450px}}
 {{BS-startCollapsible|LSTR||&lt;tt&gt;&lt;nowiki&gt;{{BS-startCollapsible|&lt;/nowiki&gt;{{bs-q|LSTR||15px}}&lt;nowiki&gt;|bg=#ccccff}}&lt;/nowiki&gt;|bg=#ccccff}}
 {{BS|eBHF||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|eBHF||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{!}}}
 {{BS|STR||&lt;tt&gt;&lt;nowiki&gt;{{!}}}&lt;/nowiki&gt;}}
 {{BS|KBHFe||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|KBHFe||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 }}
 &lt;source lang=&quot;xml&quot;&gt;
 {{BS-map
 |title=Collapsible section
 |collapsible=no
 |legend=no
 |map=
 {{BS|KBHFa||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|KBHFa||15px}}&lt;nowiki&gt;|tw=450px}}&lt;/nowiki&gt;|tw=450px}}
 {{BS-startCollapsible|LSTR||&lt;tt&gt;&lt;nowiki&gt;{{BS-startCollapsible|&lt;/nowiki&gt;{{bs-q|LSTR||15px}}&lt;nowiki&gt;|bg=#ccccff}}&lt;/nowiki&gt;|bg=#ccccff}}
 {{BS|eBHF||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|eBHF||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 {{!}}}
 {{BS|STR||&lt;tt&gt;&lt;nowiki&gt;{{!}}}&lt;/nowiki&gt;}}
 {{BS|KBHFe||&lt;tt&gt;&lt;nowiki&gt;{{BS|&lt;/nowiki&gt;{{bs-q|KBHFe||15px}}&lt;nowiki&gt;|}}&lt;/nowiki&gt;}}
 }}
 &lt;/source&gt;
 
 {{clear}}
 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 {{tl|BS5-startCollapsible}} when {{tl|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 BS''n'' 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 ===
 {{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}}
 }}
 &lt;pre&gt;&lt;nowiki&gt;
 {{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}}
 }}
 
 &lt;/nowiki&gt;&lt;/pre&gt;
 
 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 {{bsq|LUECKE}} or {{bsq|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 &lt;code style=&quot;background:#e9e9e9&quot;&gt;bg&lt;/code&gt;, 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 {{tl|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 {{bsq|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 BS''n''-2===
 StartCollapsible and its replacement row templates are available for BS''n''-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 BS''n''-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.
 
 &lt;span style=&quot;color:red&quot;&gt;Caveat: Older versions of [[Google Chrome]] cannot line up the BS''n''-2sc and BS''n''-2replace templates correctly.&lt;/span&gt;
 
 {{BS-map
 |title=BS''n''-2sc and replace templates
 |collapsible=0
 |legend=0
 |map=
 {{BS3-2|KBHFa||KBHFa|West Terminal|East Terminal|tw-left=170px|tw=140px}}
 {{BS3-2sc|STRl|KBHFa|O2=KINTeq|LSTR|Central Transfer|tw-left=170px|tw=140px|bg=#ddf}}
 {{BS3-2replace|eKRWgl|exKRW+r|STR|tw-left=170px|tw=140px|bg=#ddf}}
 {{BS3-2|XBHF-L|KXBHFxa-M|eXBHF-R|Cross-platform transfer|closed platform}}
 {{BS3-2|KDSTe|STR|CONTf|Depot||||to countryside}}
 {{!}}}
 {{BS-2|KBHFe||South Terminal}}
 }} 
 {{clear}}
 
 ===Lining up Collapsible sections ===
 
 This requires parameter {{para|tw}} (and {{para|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.
 
 
 == Rows with text only==
 There are a number of templates that assist and simplify the display of text in route diagrams.
 
 === Navbar ===
 {{BS-map
 |title=Template:Navbar
 |collapsible=no
 |legend=no
 |map=
 {{BS|||'''Input:'''|tw=212}}
 &lt;tt&gt;&amp;#123;&amp;#123;Navbar&amp;#124;''Template''&amp;#124;plain=1&amp;#125;&amp;#125;&lt;/tt&gt;
 {{BS|||'''Result:'''}}
 &lt;br&gt;{{pad|3.5em}}&lt;div class=&quot;noprint plainlinks hlist navbar&quot; style=&quot;&quot;&gt;
 &lt;ul&gt;
 &lt;li class=&quot;nv-view&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;view&lt;/span&gt;&lt;/li&gt;
 &lt;li class=&quot;nv-talk&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;talk&lt;/span&gt;&lt;/li&gt;
 &lt;li class=&quot;nv-edit&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;edit&lt;/span&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/div&gt;
 }}
 The '''{{tl|Navbar}}''' template can be used to place &lt;span style=&quot;color:blue;&quot;&gt;view • talk • edit&lt;/span&gt; links in a route diagram that does not automatically insert them (for example, when formatted for use in an {{tl|infobox}}). See [[Template:Navbar/doc]] for usage and options.
 
 {{clear}}
 
 {{BS-map
 |title=Template:BS-map
 |collapsible=no
 |legend=no
 |navbar=''Template''
 |map=
 {{BS3|d|dCONTg|||&lt;tt&gt;{{para|navbar}}''Template''&lt;/tt&gt;|tw=192}}
 }}
 
 {|{{railway line header}}
 {{BS-header|Template:BS-header|''Template''|||}}
 {{BS-table1}}
 {{BS|CONTg|tw=200}}
 |}
 |}
 The {{para|navbar}} parameter of {{t|BS-map}} and the second parameter of {{t|BS-header}} perform the same function. These should be given the name of the RDT, omitting the &lt;code&gt;Template:&lt;/code&gt; prefix.
 {{clear}}
 
 === BSntext ===
 {{BS-map
 |title=Template:BS3text
 |collapsible=no
 |legend=no
 |map=
 {{BS|||'''Input:'''}}
 {{BS-colspan}}
 &lt;tt&gt;&lt;nowiki&gt;{{BS|ENDExe||}}&lt;/nowiki&gt;&lt;br&gt;
 &lt;nowiki&gt;{{BS3text|Alternate proposals|||''via''}}&lt;/nowiki&gt;&lt;br&gt;
 &lt;nowiki&gt;{{BS3|exINT||exBHF||Route 1 {{!}} Route 2}}&lt;/nowiki&gt;&lt;/tt&gt;
 {{BS|||'''Result:'''}}
 {{BS|ENDExe||}}
 {{BS3text|Alternate proposals|||''via''}}
 {{BS3|exINT||exBHF||Route 1 {{!}} Route 2}}
 }}
 The '''&lt;nowiki&gt;{{BS#text}}&lt;/nowiki&gt;''' 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 &lt;tt style=&quot;color:blue;&quot;&gt;Right Text&lt;/tt&gt;, &lt;tt style=&quot;color:blue;&quot;&gt;Right Text2&lt;/tt&gt; and &lt;tt style=&quot;color:blue;&quot;&gt;Comment&lt;/tt&gt; (but no &lt;tt style=&quot;color:blue;&quot;&gt;Margin&lt;/tt&gt; column).
 {{clear}}
 
 === BS-colspan ===
 {{BS-map
 |title=Template:BS-colspan
 |collapsible=no
 |legend=no
 |map=
 {{BS|||'''Input:'''}}
 {{BS-colspan}}
 &lt;tt&gt;&lt;nowiki&gt;{{BS|KBHFxe||Terminal}}&lt;/nowiki&gt;&lt;br&gt;
 &lt;nowiki&gt;{{BS-colspan}}&lt;/nowiki&gt;&lt;br&gt;
 &lt;nowiki&gt;Opening ''ca.'' 2020 ↓&lt;/nowiki&gt;&lt;br&gt;
 &lt;nowiki&gt;{{BS|exBHF||Station}}&lt;/nowiki&gt;&lt;/tt&gt;
 {{BS|||'''Result:'''}}
 {{BS|KBHFxe||Terminal}}
 {{BS-colspan}}
 Opening ''ca.'' 2020 ↓
 {{BS|exBHF||Station}}
 }}
 The '''{{t|BS-colspan}}''' template is used to place text across the entire width of the table. All standard formatting can be used.
 {{clear}}
 
 == Fractional text display templates ==
 
 === BScvt ===
 {{bsmap
 |title=Template: BScvt
 |legend=0
 |collapsible=0
 |map=
 {{BS||&lt;big&gt;'''Result:'''&lt;/big&gt;|'''   Input:'''}}
 {{BS|KMW|{{BScvt|0}}|&lt;code&gt; &lt;nowiki&gt;{{BScvt|0}}&lt;/nowiki&gt;&lt;/code&gt;}}
 {{BS|TUNNEL2|{{BScvt|150|in=m}}|&lt;code&gt; &lt;nowiki&gt;{{BScvt|150|in=m}}&lt;/nowiki&gt;&lt;/code&gt;}}
 {{BS|HST|{{BScvt|100.0|align=left}}|&lt;code&gt; &lt;nowiki&gt;{{BScvt|100.0|align=left}}&lt;/nowiki&gt;&lt;/code&gt;}}
 }}
 
 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.
 * Inserting the optional second parameter (any character) reverses the units.
 * Decimal values are supported.
 * The template automatically adds the units &quot;mi&quot; and &quot;km&quot; after the values.
 * Yards, [[Chain (unit)|chains]] and metres are also supported.
 
 The text is right-aligned, but can be changed to left- by applying the parameter &quot;&lt;code&gt;align=left&lt;/code&gt;&quot;.
 {{clear}}
 
 === BSsplit ===
 {{BS-map
 |title=Template: BSsplit
 |collapsible=no
 |legend=no
 |map=
 {{BS|eBHF|{{BSsplit|opened 1900|closed 1969}}|&lt;code&gt;&lt;nowiki&gt;{{BSsplit|opened 1900|closed 1969}}&lt;/nowiki&gt;&lt;/code&gt;||simple}}
 {{BS|STR}}
 {{BS|pBHF|{{BSsplit|open|9 am–3 pm|align=right}}|&lt;code&gt;&lt;nowiki&gt;{{BSsplit|open|9 am–3 pm|align=right}}&lt;/nowiki&gt;&lt;/code&gt;||right}}
 {{BS|STR}}
 {{BS|pBHF|{{BSsplit|open|9 am–3 pm|align=left}}|&lt;code&gt;&lt;nowiki&gt;{{BSsplit|open|9 am–3 pm|align=left}}&lt;/nowiki&gt;&lt;/code&gt;||left}}
 {{BS|STR}}
 {{BS|STR+GRZq|{{BSsplit|Zone|free-fare||it|align=right|line=yes}}|&lt;code&gt;&lt;nowiki&gt;{{BSsplit|Zone|free-fare||it|align=right|line=yes}}&lt;/nowiki&gt;&lt;/code&gt;||it+line+right}}
 {{BS|STR||}}
 {{BS|eBHF|{{BSsplit|Canada|USA|bg1=#f00|bg2=lightblue|align=center}}|&lt;code&gt;&lt;nowiki&gt;{{BSsplit|Canada|USA|bg1=#f00|bg2=lightblue|align=center}}&lt;/nowiki&gt;&lt;/code&gt;||background}}
 {{BS|STR||}}
 {{BS|ABZ23|{{BSsplit|param1|param2|param3}}|&lt;code&gt;&lt;nowiki&gt;{{BSsplit|param1|param2|param3}}&lt;/nowiki&gt;&lt;/code&gt;||link}}
 }}
 '''BSsplit''' displays two lines of text in a single row table. 
 * The first two parameters are the two lines.
 * The third parameter (alternatively {{para|L}}) defines a shared wikilink for both lines of text (no &lt;code&gt;[[&lt;/code&gt; or &lt;code&gt;]]&lt;/code&gt; are needed).
 * The fourth parameter (alternatively {{para|4}}''anything'') will change both lines to ''italic'' text. Any character or text can be used.
 * The fifth parameter (alternatively {{para|5}}''anything'') will change both lines to '''bold''' text. Any character or text can be used.
 * Named parameter {{para|line}}''anything'' forces a separating line to appear. Any character or text can be used.
 * Named parameter &lt;code&gt;align=left&lt;/code&gt; or &lt;code&gt;align=right&lt;/code&gt; overrides the alignment inherited from the parent cell
 * Named parameters {{para|bg1}} (top line) and {{para|bg2}} (bottom line) are used to specify the background colors of the two displayed lines. They can be specified by providing a valid [[Web colors#HTML color names|html color]] or a [[Web colors#Hex triplet|hex triplet]].
 
 The template also adjusts the text height so that it will not cause spaces to appear between the rows of icons. 
 {{clear}}
 
 === BSto ===
 {{BS-map
 |title=Template:BSto
 |collapsible=no
 |legend=no
 |map=
 {{BS1-2||'''Input:'''|'''Result:'''}}
 {{BS3-2|dCONTgq|ABZgr|d|&lt;tt&gt;&lt;nowiki&gt;{{BSto|Line Name|to Destination}}&lt;/nowiki&gt;&lt;/tt&gt;|{{BSto|Line Name|to Destination}} }}
 {{BS1-2||&amp;nbsp;}}
 {{BS1-2||'''Input:'''|'''Result:'''}}
 {{BS3-2|d|ABZgl|dCONTfq|&lt;tt&gt;&lt;nowiki&gt;{{BSto|Other Route|to Somewhere Else|align=right}}&lt;/nowiki&gt;&lt;/tt&gt;|{{BSto|Other Route|to Somewhere Else|align=right}} }}
 {{BS1-2||&amp;nbsp;}}
 {{BS1-2||'''Input:'''|'''Result:'''}}
 {{BS1-2|HST|&lt;tt&gt;&lt;nowiki&gt;{{BSto|Station|for Nearby Town|it=off}}&lt;/nowiki&gt;&lt;/tt&gt;|{{BSto|Station|for Nearby Town|it=off}} }}
 {{BS1-2||&amp;nbsp;}}
 {{BS1-2||'''Input:'''|'''Result:'''}}
 {{BS1-2|CONTf|&lt;tt&gt;&lt;nowiki&gt;{{BSto|Continuing line|to Terminus|it=all}}&lt;/nowiki&gt;&lt;/tt&gt;|{{BSto|Continuing line|to Terminus|it=all}} }}
 }}
 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 &lt;code&gt;align&lt;/code&gt; parameter will left- or right-justify text; if omitted it will default to “inherit”. The optional &lt;code&gt;it&lt;/code&gt; parameter controls italicization.
 {{clear}}
 
 === 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 &lt;code&gt;railway station&lt;/code&gt; are not needed. All the formatting options of {{tl|BSsplit}} also apply to this template.
 
 &lt;div style=&quot;display: inline;&quot;&gt;&lt;code&gt;&lt;nowiki&gt;{{BSsrws|Stratford|International}}&lt;/nowiki&gt;&lt;/code&gt;displays&lt;/div&gt;&lt;div style=&quot;display: inline;&quot;&gt;{{BSsrws|Stratford|International}}&lt;/div&gt;&lt;div style=&quot;display: inline;&quot;&gt;and links to [[Stratford International railway station|&lt;nowiki&gt;[[Stratford International railway station]]&lt;/nowiki&gt;]].&lt;/div&gt;
 
 *''Do not'' use BSsplit, BSto or BSsrws inside the [[#Row replacement for Start-Collapsible|&amp;#123;&amp;#123;BS-collapsible}}]] row template. Due to their table-based design they will absorb the entire collapsible section and become completely invisible.
 
 == Element Formatting ==
 ===Stnlnk===
 {{BS-map
 |title=Template:Stnlnk
 |collapsible=no
 |legend=no
 |map=
 {{BS|||'''Input:'''}}
 {{BS|||&lt;tt&gt;&lt;nowiki&gt;{{Stnlnk|Junction}}&lt;/nowiki&gt;&lt;/tt&gt; ''or'' &lt;tt&gt;&lt;nowiki&gt;{{rws|Junction}}&lt;/nowiki&gt;&lt;/tt&gt;}}
 {{BS|||'''Result:'''}}
 {{BS|BHFSPLe||{{Stnlnk|Junction}}||''(links to &amp;#91;&amp;#91;[[Junction railway station]]&amp;#93;&amp;#93;)''}}
 }}
 '''Stnlnk''' (shortcut: '''{{tlx|rws}}''') expands its parameter to link to the appropriate railway station article, without displaying the text &quot;railway station&quot;. It is generally preferred to use the station, unless there is a specific reason to link to the place itself.
 
 {{Stnlnk/doc/other}}
 {{clear}}
 
 === RouteBox ===
 {{BS-map
 |title=Template:RouteBox
 |collapsible=no
 |legend=no
 |map=
 {{BS|||'''Input:'''}}
 {{BS|||&lt;tt style{{=}}&quot;whitespace:nowrap;&quot;&gt;&lt;nowiki&gt;{{RouteBox|Circle line|Circle line (London Underground)&lt;/nowiki&gt;&lt;br/&gt;&lt;nowiki&gt;|#{{LUL color|Circle}}|#{{LUL color|Piccadilly}}}}&lt;/nowiki&gt;&lt;/tt&gt;}}
 {{BS||||''Note that the command is split into two lines because of space constraints.''}}
 {{BS|||'''Result:'''}}
 {{BS2|uSTR+l|O1=ulBHF~L|uSTR+r|O2=ulBHF~R||{{RouteBox|Circle line|Circle line (London Underground)|#{{LUL color|Circle}}|#{{LUL color|Piccadilly}}}} }}
 {{BS2|uSTRl|O1=ulDST~L|uSTRr|O2=ulDST~R||}}
 }}
 The '''{{t|RouteBox}}''' (shortcut:'''{{tlx|rbox}}''') template displays a borderless box with colorable [[wikilink]]ed text, suitable for displaying a route or line name in its own color.
 {{clear}}
 
 === RoutemapRoute ===
 {{BS-map
 |title=Template:RoutemapRoute
 |collapsible=no
 |legend=no
 |map=
 {{BS|||'''Input:'''}}
 {{BS|||&lt;tt style{{=}}&quot;whitespace:nowrap;&quot;&gt;&lt;nowiki&gt;{{RoutemapRoute|Licon=U|Ricon=D|Red line|Blue line|enclosed=no}}&lt;/nowiki&gt;&lt;/tt&gt;}}
 {{BS|||&lt;tt&gt;&lt;nowiki&gt;{{RoutemapRoute|Commuter|Rapid transit}}&lt;/nowiki&gt;&lt;/tt&gt;}}
 {{BS|||'''Result:'''}}
 {{BS|mvSTR||{{RoutemapRoute|Licon=U|Ricon=D|Red line|Blue line|enclosed=no}}}}
 {{BS||||{{RoutemapRoute|Commuter|Rapid transit}}}}
 }}
 The '''{{t|RoutemapRoute}}''' (shortcut: '''{{tlx|rmr}}''') template can be used to indicate routes and connecting lines. It places directional arrow(s) and one or two text fields in a map row, optionally enclosed by parentheses. A complete explanation is at [[Template:RoutemapRoute/doc]].
 {{clear}}
 
 === Enlarge ===
 {{BS-map
 |title=Template:Enlarge
 |collapsible=no
 |legend=no
 |map=
 {{BS3-2|utHST||uetHST|{{lus|Chalk Farm}}|{{lus|South Kentish Town}} }}
 {{BS3-2|utKRWl|utKRW+lr|utKRWr||}}
 {{BS-2|utBHF||{{enlarge|Camden Town tube station}} {{lus|Camden Town}} }}
 {{BS3-2|utKRW+l|utKRWlr|utKRW+r||}}
 {{BS3-2|utINT|O1=HUB2|HUBc3|utHST|{{lus|Euston}}|{{lus|Mornington Crescent}} }}
 }}
 
 The '''{{t|Enlarge}}''' template displays a magnifying glass icon that links to another RDT to illustrate a small area in greater detail.
 
 {{clear}}
 
 == Icon display templates ==
 
 === RoutemapRouteIcon ===
 {|style=&quot;float:right&quot;
 |-
 |{{rmri|ul}}||{{rmri|u}}||{{rmri|ur}}
 |-
 |{{rmri|L}}|| ||{{rmri|R}}
 |-
 |{{rmri|LL}}||{{rmri|d}}||{{rmri|lr}}
 |}
 
 A single arrowhead can be displayed using the  '''{{t|RoutemapRouteIcon}}''' (shortcut: '''{{tlx|rmri}}''') template.
 {{clear}}
 
 === Rail-interchange ===
 {{BS-map
 |title=Template:Rail-interchange
 |legend=no
 |map=
 {{BS|STR|km|{{Rail-interchange|rail}}||''Generic modal icon''}}
 {{BS|STR||{{Rail-interchange|toronto|streetcar|501|x}}||''City-specific icon with links and optional colour change''|tw=100px}}
 }}
 
 The '''{{t|Rail-interchange}}''' (shortcut:'''{{tlx|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]].
 {{clear}}
 
 === BSflag ===
 {{BS-map
 |title=Template:BSflag
 |collapsible=no
 |legend=no
 |map=
 {{BS|pHST||{{stn|Arkadelphia}}|{{BSflag}}}}
 }}
 
 The '''{{t|BSflag}}''' template displays a colored flag to indicate a “flag” or request stop, and links to &amp;#91;&amp;#91;[[request stop]]]].
 {{clear}}
 
 === UK road ===
 {|class=&quot;wikitable&quot; align=&quot;right&quot;
 |-align=&quot;left&quot;
 ! Code !! Result !! Links to
 |-
 | &lt;code&gt;&lt;nowiki&gt;{{UK road|A1}}&lt;/nowiki&gt;&lt;/code&gt; || {{UK road|A1}} || &amp;#91;&amp;#91;[[A1 road (Great Britain)]]]]
 |-
 | &lt;code&gt;&lt;nowiki&gt;{{UK road|B1000}}&lt;/nowiki&gt;&lt;/code&gt; || {{UK road|B1000}} || &amp;#91;&amp;#91;[[B roads in Zone 1 of the Great Britain numbering scheme]]]]
 |-
 | &lt;code&gt;&lt;nowiki&gt;{{UK road|M10}}&lt;/nowiki&gt;&lt;/code&gt; || {{UK road|M10}} || &amp;#91;&amp;#91;[[M10 motorway (Great Britain)]]]]
 |}
 
 This template displays a small icon with an appropriate link for [[Great Britain road numbering scheme|A and B roads]] and [[List of motorways in the United Kingdom|Motorways]] in Great Britain.
 {{clear}}
 
 == Examples ==
 === Basic route diagram template using BS''n'' only ===
 {{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.
 }}
 
 Note: The code here produces the adjoining map. It does not mean to reflect the current situation.
 
 &lt;pre style=&quot;border:0px;overflow:auto;&quot;&gt;&lt;nowiki&gt;
 {{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.
 }}
 &lt;/nowiki&gt;&lt;/pre&gt;
 
 {{clear}}
 
 === An example with collapsible sections ===
 {{BS-map
 |title={{Color box|#27404E|border=darkgray}} 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||{{0|0:00}}|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)}}
 }}
 
 &lt;source lang=&quot;moin&quot; style=&quot;border:0px;overflow:auto;&quot;&gt;
 {{BS-map
 |title={{colorbox|#27404E}} 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)}}
 }}
 &lt;/source&gt;
 {{clear}}
 
 == Tips ==
 {{BS-map
 |collapsible=no
 |width=195px
 |legend=no
 |map-title=Options for vee station
 |map=
 {{BS2|STR|O1=MFADEg|||}}
 {{BS2|BHFABZgl+l|CONTfq|||[[:File:BSicon BHFABZld.svg|BHFABZld]]}}
 {{BS2|vSHI1+l-STR+l|CONTfq|||[[:File:BSicon vSTRg+l.svg|vSTRg+l]] with}}
 {{BS2|vBHF||||[[:File:BSicon vBHF.svg|vBHF]] and|}}
 {{BS2|SPLe||||[[:File:BSicon SPLe.svg|SPLe]]}}
 {{BS2|ABZgl+l|O1=lBHF|CONTfq|||[[:File:BSicon ABZld.svg|ABZld]] overlays }}
 {{BS2|STR|O1=MFADEf||||with [[:File:BSicon lBHF.svg|lBHF]]|}}
 {{BS|||&amp;nbsp;}}
 |map2-title=Interruptions
 |map2=
 {{BS|STR|O1=MFADEg||}}
 {{BS3|STR+l|KRZo|CONTfq|||{{BSto|Other Railway|to Somewhere|it=all}}{{rmri|R}}{{pad|1em}}}}
 {{BS3|LSTR|BHF|||Station}}
 {{BS3|KRWl|KRWg+r||||''Other Railway''}}
 {{BS|STR|O1=MFADEf||}}
 {{BS|||&amp;nbsp;}}
 |map3-title=Custom legend
 |map3=
 {{BS3|KBHFa-L|udKBHFa-M|utdKBHFa-R||Station A}}
 {{BS3|STR|udBHF-L|utdBHF-R||Station B}}
 {{BS3|STR|udBHF|utdSTR||Station C}}
 {{BS3|KBHFe-L|udKBHFe-M|utdKBHFe-R||Station D}}
 {{BS-colspan}}
 &lt;hr/&gt;{{center|''Key to services''}}
 {{BS|STRq||Express}}
 {{BS|uSTRq||Weekday local}}
 {{BS|utSTRq||Weekend, holiday local}}
 }}
 * If a station has a Wikipedia article, link to that rather than the town. 
 * Avoid [[WP:overlink|overlinkage]] to a city or railway when its occurrences are close together on the route map.
 * Connects lines should be linked to their own articles, particularly if there is a connection for passengers.
 * For [[Railway station layout#Vee (open_triangle)|vee stations]], show the lines as already joined in the station to show the connection or use the [[Wikipedia:Route diagram template/Catalog of pictograms/interchange|interchange set]]. The inclusion of a vee station shows that it has not been overlooked.
 * At the ends of a line, show tracks which go further with a CONTinuation arrow: {{bs-q|CONTgq|0}}{{bs-q|CONT2|0}}{{bs-q|CONTg|0}}{{bs-q|CONT3|0}}{{bs-q|CONTfq|0}}{{bs-q|CONT4|0}}{{bs-q|CONTf|0}}{{bs-q|CONT1|0}}.
 * For lines branching off, specify “to X”.
 ** In general, other lines are shown ''in italics''.
 ** Template {{tl|RoutemapRoute}} (shortcut: {{tl|rmr}}) is an option to help describing in the text column with arrow icons ) {{rmri|u}} {{rmri|d}} {{rmri|l}} {{rmri|r}}.
 * Crossing and connecting lines which are shown more than once can be connected with interruptions ({{bsq|LSTRq|0}}), but it should not normally be necessary to have more than two interruption icons in a row.
 ** Note that [[:WP:WikiProject UK Waterways|WikiProject UK Waterways]] uses dotted lines {{bsq|uLSTR}} to denote routes that are planned or under construction, in which case there is no restriction on the number needed.
 * At intermodal interchanges, it is not desirable to list all the routes of the other modes, just the mode(s). For example, at a central railway station it is enough to show {{rint|subway}}{{rint|bus}}, rather than {{rbox|A|3=red}} {{rbox|B||blue}} {{rbox|10}} {{rbox|11}}, etc.
 * In order to comply with the [[Wikipedia:No original research|no original research]] and [[WP:SPECULATION|Wikipedia is not a crystal ball]] policies, information regarding planned and proposed features need to be [[Wikipedia:Verifiability|verifiable]] with [[Wikipedia:Identifying reliable sources|reliable sources]].
 * When a map grows too large (such as [[Template:Shanghai Metro/Line 4|''this'']]), it is recommended to not transclude the map inside an infobox or table which floats or aligns to the left or right, otherwise it would compress the adjacent main text into too narrow a space. This problem is exaggerated for user with low [[screen resolution]]. It is a good idea to center align the standalone table (as explained in [[Template:BS-map#Note|BS-map]]). If a left- or right-aligned table is desired, adjust the map width for a minimum of 1024px display width in Monobook or Vector Wiki style. Setting the table to “collapsed” by default (by applying the parameter '''&lt;code&gt;collapse=yes&lt;/code&gt;''' in BS-map) also helps.
 * In rapid transit/light rail diagrams that show both canals and non-navigable waterways, the similarly-coloured [[:Commons:Category:Icons for railway descriptions/set cerulean|cerulean icons]] ({{bsq|STR cerulean|0}}) can be used to distinguish the former from the latter ({{bsq|WASSER}}.
 * If an unusual situation requires using an icon in a non-standard manner, give an explanation either on the text row with the icon, or by a note at the top or bottom of the map—separated by an empty row or horizontal line—showing the “misused” icon and its meaning.   
 {{clear}}
 
 
 == 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:
 
 * Check the [[Wikipedia:Route diagram template/Catalog of pictograms|icon catalog]] or [[:Commons:category:BSicon]] and its subcategories to see if such icon already exists.
 * Think if the icon you need can be displayed by [[#Overlay|overlaying]] two to six existing icons.
 * Use [[Scalable Vector Graphics|SVG]] file format '''only'''. This can be done by using CORELDraw, [[Inkscape]], [[Adobe Illustrator]] or an html/xml (text) editor.
 ** Graphic size is not restricted, but it should be in square shape, usually 500 by 500px (half-width icons rectangular 250 by 500px; double-width icons 1000 by 500px). Keep in mind how the image will look like when resized in the diagram to the default height of 20 pixels.
 ** The SVG file should not contain any [[raster graphic]] and all of its shapes should be done by [[vector graphics|vector]] tools.
 ** The image should be licensed as {{tl|PD-shape}}.
 *** '''Never''' use copyrighted materials such as [[Wikipedia:Logos|creatively designed logo]] per the [[Wikipedia:Non-free content]] policy. The copyright status of an image can be checked on the file's description page. If you think a logo should be reclassified as copyright-ineligible due to being solely composed of [[typeface]] and/or simple geometry (to allow the logo to be used in a diagram), you may post a request or comment at [[Wikipedia:Media copyright questions]].
 * Follow the colour scheme and naming conventions listed in the [[Wikipedia:Route diagram template/Catalog of pictograms|catalog of pictograms]] and {{t|RDT colors}}.
 ** Names should be of the form: &quot;BSicon_prefixROOTsuffix.svg&quot;
 *** ROOT defines a general function/shape,
 *** prefix specifies a color/style/usage, and
 *** suffix is a shape modifier
 ** [[Wikipedia:Redirect|redirects]] must be made for files containing diacritics from their dediacriticized name on [[:commons:|Commons]]. For example [[:file:BSicon BRUECKE.svg|file:BSicon BR'''UE'''CKE.svg]] redirects to [[:file:BSicon BRÜCKE.svg|file:BSicon BR'''Ü'''CKE.svg]].
 * [http://www.thepyramid.info/asp/icons.htm Tompw's Icon Generator] may be used to easily create some types of new SVG icons.
 * Preview your SVG image using [https://tools.wmflabs.org/svgcheck/ SVG Check]. Your SVG image may not look the same in Wikimedia from your SVG application or browser due to different font library and SVG rendering engine.
 * Upload files to [[Wikimedia Commons]] into [[commons:category:Icons for railway descriptions|Icons for railway descriptions]] or one of its sub-categories. The more specific the category the better. If you are uncertain, just apply the general category  [[commons:category:BSicon|BSicon]] and wait for another editor to change it.
 * If you are incapable or having trouble creating icon, post your question at [[:Commons:Talk:BSicon/New icons and icon requests]].
 
 
 == See also ==
 {{Portal|Transport}}
 ;Canal/Water icons
 *[[Commons:Category:Icons for canal descriptions|Category:Icons for canal descriptions]] (on Commons)
 *{{Tl|Waterways legend}}
 ;FootPath icons
 *[[Wikipedia:Route diagram template/Catalog of pictograms/trails|Catalog of pictograms: trails]]
 *[[Commons:Category:BSicon/railway/set f|Category:BSicon/railway/set f]] (on Commons)
 *{{Tl|Trails legend}}
 *[[Talk:Long-distance footpaths in the UK#Footpath Icons]]
 ;Motorway icons
 *[[Commons:Category:Icons for motorway descriptions/Detailed|Category:Icons for motorway descriptions/Detailed]] (on Commons)
 *[[Commons:Category:Icons for motorway descriptions/Simple|Category:Icons for motorway descriptions/Simple]] (on Commons)
 ;Rail icons
 *[[Commons:Category:BSicon/railway|Category:BSicon/railway]] (on Commons)
 ;Optional helper templates
 *{{tl|Railway-routemap}}: adds a category and basic description to the route template
 *{{tl|infobox rdt}}: assists transcluding diagrams into [[WP:Manual of Style/Infoboxes|infoboxes]] that don't properly support RDTs (not needed for diagrams that use {{tl|Routemap}}&amp;nbsp;)
 
 == Notes and references ==
 {{Reflist}}
 
 {{bsicon}}
 {{BS templates navigation}}