Wikipedia:Route diagram template
| This project or template has a transwiki guide for helping editors to adopt it to remote wiki when this cannot be done by simply copying the codes of one single template. See Wikipedia:Route diagram template/Transwiki guide for instruction. |
- Other such lists need to be integrated into that catalog.
Route diagram templates simplify the writing of Wiki tables and provide a uniform layout for route-map infoboxes, mainly for railway lines but also for other modes of transport such as waterways. Each of these templates carries a row of square icons, of which there are more than 3000, with optional text, to draw a cross-page element of the route diagram. The icons represent features such as railway track
, railway stations
, bridges
, rivers
, tunnels
, junctions
and interchanges
.
|
[edit] Structure of the map table
The format of the map is not obligatory but some of the syntax requires careful "programming" to avoid ruining the layout of the article which transcludes them. The following sections explain the function and usage of the templates.
Before the creation of {{BS-map}}, the construction of a stand-alone map required several templates:
- {{Railway line header}}
- {{BS-header}} and
- {{BS-table}},
as shown in the diagram to the right. This format is widely employed by many maps; however, new maps should use only the {{BS-map}} template for ease of editing by others.
[edit] Templates
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.
[edit] Standalone map container
{{BS-map}} is the container to include the row templates which comprise the map by parameter map. It has other parameters allow basic information and expansion.
| style | Additional CSS syntax which defines the style of the whole box. It is useful when you are transcluding this map box into other infobox, e.g. add "border:0px; width:100%" to remove the border and let it fully stretch inside the infobox. |
| width | Width of the whole box. Can be overridden by style entry. No default value because it will void the tw parameter in the BS# row template which is applied to override the text column width of BS# 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 {{colorbox}} or icon image next to the title text. White by default. |
| title-color | Font color of title text. Black by default. |
| 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 "show/hide" collapsible button. |
| collapse | Collapse state of the whole box. yes for collapsing, no by default. |
| legend | Legend page link:
|
| map | BS row templates which comprise the diagram. |
| map# | # represents 2 to 10. Additional map space. By separating maps into different map parameters, the column alignment of the maps will not implicate to each other. This is useful if you are displaying two maps, one uses the ordinary BS# row templates (single-side text columns) and the other one uses BS#-2 (dual-side text columns) which are not compatible to each other. |
| map-title map#-title |
# represents 2 to 10. Optional title header for each map. |
| map-collapsible map#-collapsible |
# represents 2 to 10. Allow the individual map collapsible or not. no by default, yes will call the "show/hide" collapsible button. You MUST have something written in the map#-title otherwise the map#-collapsible alone is not enough to turn it on. |
| map-collapse map#-collapse |
# represents 2 to 10. Collapse state of the individual map. yes for collapsing, no by default. |
| bg | Background color of the whole digram, including the text column in the row templates. |
| top | Optional note above the map. This is also the good place to include the {{BS-Infobox}} or {{Infobox UK railway}} for lining up image, line length and other informations. |
| 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. |
- If you are creating table from scratch rather than by using templates, the vertical bar
|which is heavily used in Wiki table syntax must be replaced by{{!}}, such as{|by{{{!}}and|-by{{!}}-. Otherwise the direct presense of the bar will ruin the structure of the template and subsequent article content. This is because when processing a template, the function of bar as a parameter entries separator overrides other functions. - When a visual separator is desired in text fields, the broken vertical bar (
¦) can be substituted for a vertical bar. This character can be input directly from the keyboard using the sequence Alt+0166, or coded in HTML by¦or¦.
[edit] Icon and text row templates
The real meat of designing the map. The number (#) after the template name BS (German abbreviation of Bahnstrecke for stretch of track) indicate how many horizontal icon grids available. Use these templates with icon images continuously on every new row to construct the map.
[edit] BS(#) row templates
|
{{BS2}} / bs2 {{BS3}} / bs3 {{BS4}} / bs4 {{BS5}} / bs5 {{BS6}} / bs6 {{BS7}} / bs7 {{BS8}} / bs8 {{BS9}} / bs9 |
The unnamed (sequential) parameters of {{BS}} are as follow. The order of these parameters are lined up just as how the output will look like:
| {{BS| | Icon ID | | | Dist./Time | | | Text | | | Note 1 | | | Note 2 | }} |
|
|
|
|
|
|
- 1: Icon ID for what icon will be displayed in the icon column. (For no icon to be shown leave blank or use "leer" [German for "empty"]).
- 2: Distance along track or traveling time from the starting point.
- 3: Text, name of station or other feature.
- 4: Note 1 - Written after Text with a leading space in smaller characters.
- 5: Note 2 - Written after Note 1 in the smaller characters but right-aligned. (This case can be used as another Dist./Time case).
- When adding special styling in the text columns, be careful 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.
BS row templates with a number shift the unnamed parameter order of text column to make way for extra icon grids sequentially:
| {{BS2| | Icon ID 1 | | | Icon ID 2 | | | Dist./Time | | | Text | | | Note 1 | | | Note 2 | }} |
|
|
|
|
|
|
|
| {{BS3| | Icon ID 1 | | | Icon ID 2 | | | Icon ID 3 | | | Dist./Time | | | Text | | | Note 1 | | | Note 2 | }} |
|
|
|
|
|
|
|
|
etc.
| BS(#) row templates | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||
All BS row templates have named (designated) parameters, providing advanced functions. Remember to distinguish between the uppercase and lowercase alphabets of the parameter name.
- PX: size of the icon (e.g. PX=50px), 20px high (x20px) by default.
- PX2, PX3, etc.: further definition of the width of the corresponding icon case. The parameter PX works as the global width or the individual width for the 1st icon.
- Beware that PX parameters have no effect on the icons of other rows.
- O1 (Oh one, not zero one), O12, O13, O14, O15: ID of an icon to overlay on the lower icon of the same grid, 5 layers in maximum. The greater number of the parameter indicates the upper layer which is over the smaller. See also overlay section for more about overlaying icons.
- O2, O22, O23, O24, O25: ID of an icon to overlay on the icon of the 2nd icon grid.
- O3, O32, O33, O34, O35: ID of an icon to overlay on the icon of the 3rd icon grid, etc.
- alt1, alt2, alt3, etc.: User-defined alt attribute for the icon image to override the alt text generated by {{BS-alt}}. See also Wikipedia:Alternative text for images.
- L1, L2, L3, etc.: User-defined internal link for the icon image to override the default link to file description page of the icon.
- bg: Use color name or HTML RGB hex code (with prefix #) as background to "highlight" or to emphasize certain sections, transparent by default
- tw: Width of the text column. This is especially required for joining the icons cohesively when the text length in the "normal" BS row template text column is not wide enough to override the BS row collapsible sections.
|
|||||||
[edit] Fractional text display template
There are three templates that can be used to display fractional text:
- {{BSkm}}
| Template:BSkm | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||
BSkm is a template primarily designed for Dist./Time and Note 2 cases in the BS(#) row template when two distances must be shown together vertically in fractional format, for example when a new range of distances starts. Usage: {{BSkm|1st text|2nd text}}. (Inserting the optional parameter "noline=yes" causes the dividing line to be supressed.) Despite its name, this template does not produce the unit km after the text entry.
Applying this template in Text and Note 1 columns will increase the row height, thus causing the icons to not join seamlessly row to row. If this is still desired, use parameter PX to enlarge the icon size (greater than default width, x20px) on all rows to overtop the height of {{BSkm}}. If the reader has set higher minimal font size of their browser, this template will also cause the map to break in the reader's browser.
- {{BSsplit}}
| Template:BSsplit | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||
BSsplit is identical to the BSkm template, except that there is no dividing line.
- {{BSto}}
| Template:BSto | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||
The BSto template is intended for labeling connecting routes, as the second line is smaller and italicized. It also lacks a separating line. The optional third parameter will right-justify text; if omitted it will default to left-justified. Any character can be used for the third argument.
[edit] Collapsible sections
|
{{BS2-startCollapsible}} / bs2-sc {{BS3-startCollapsible}} / bs3-sc {{BS4-startCollapsible}} / bs4-sc {{BS5-startCollapsible}} / bs5-sc {{BS6-startCollapsible}} / bs6-sc {{BS7-startCollapsible}} / bs7-sc {{BS8-startCollapsible}} / bs8-sc |
It is possible to make sections of BS(#) rows collapsible as if it were in a NavFrame. {{Railway line header}} and the table header template (eg: {{BS-header}}) are used as above. The collapsible section begins with a BS(#)-startCollapsible row template (lacking the parameters Note 1, Note 2 and tw), then include other "ordinary" BS(#) 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 followed:
| {{BS-startCollapsible| | Icon ID | | | Dist./Time | | | Text | }} |
|
|
|
|
| {{BS2-startCollapsible| | Icon ID 1 | | | Icon ID 2 | | | Dist./Time | | | Text | }} |
|
|
|
|
|
etc.
Apart from the unnamed parameters, named parameters follow almost the same definitions as in basic BS templates. Parameters available include:
- PX, PX2, etc.: define width of icons.
- O1, O12, O13, etc.: allow overlay of icons.
- alt1, alt2, etc.: define alt texts for the icon image.
- L1, L2, etc.: define internal link when the icon is clicked.
- bg, defines background colour of the whole collapsible section (instead of one row)
with the sole exception of tw.
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 BS(#) row templates which is confined to a single row. This clearly distinguishes between the non-collapsible and expanded collapsible sections.
[edit] Flawed collapsible section
If the map is broken between the collapsible and non-collapsible sections it is because the text of either the startCollapsible template or a BS row template within the collapsible section is too long, Either way the icons shift out of position and do not join vertically.
In the previous collapsible section example we increased the width of a BS(#) row template which is outside of collapsible section by applying the named parameter tw to define its text column width to override the width of the widest "shown" collapsible section. The tw only needs to be input once in any BS-table(#) template which is outside of collapsible section.
| Condition 1 | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||
| Condition 2 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
[edit] BS(#)-2 row templates
|
{{BS2-2}} / bs2-2 {{BS3-2}} / bs3-2 {{BS4-2}} / bs4-2 {{BS5-2}} / bs5-2 {{BS6-2}} / bs6-2 {{BS7-2}} / bs7-2 {{BS8-2}} / bs8-2 |
BS(#)-2 templates take text on both sides without the Distance/Time case available as oppose to the previously introduced BS(#) row templates that only allow text to be displayed to the right-hand side of the icon column. All named parameters of BS(#) row templates are applicable here. These templates should not be used with other "right-Text only" BS(#) row templates. Example is shown in the demonstration on the top of this project page. Unnamed parameters are as follow:
| {{BS-2| | Icon ID | | | Left text | | | Right text | | | Left note | | | Right note 1 | | | Right note 2 | }} |
|
|
|
|
|
|
|
| {{BS2-2| | Icon ID 1 | | | Icon ID 2 | | | Left text | | | Right text | | | Left note | | | Right note 1 | | | Right note 2 | }} |
|
|
|
|
|
|
|
|
etc.
|
||||||||||||||||||||||||||||||||||||||
- startCollapsible templates are not available for BS"#"-2 map.
[edit] Lining up BS row templates
Except for {{BS}} and {{BS-2}}, all BS# row templates will join the icons in the same row cohesively, unless separated by an empty or leer 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(#) 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.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Same rules applies for BS(#)-2 templates, where the icon columns also align to center. However, mixing BS(#) and BS(#)-2 rows are not allowed.
[edit] Example
[edit] Basic route diagram template using BS(#) only
| Eurostar route map | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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|KBHFa|0km / 0hour|[[St Pancras railway station|St. Pancras International]] [[File:Underground no-text.svg|10px]]}}
{{BS|eHST||[[Stratford International station|Stratford International]] [[File:DLR no-text roundel.svg|10px]] <small>(opening 2010)</small>}}
{{BS|HST|37 / 0:15|[[Ebbsfleet International railway station|Ebbsfleet International]]}}
{{BS3|exCONTr|eABZlg|||<small>[[Fawkham Junction]]</small>|{{RoutemapRoute|Licon=L|[[Chatham Main Line]]|enclosed=yes|}}|}}
{{BS|HST|90 / 0:30|[[Ashford International railway station|Ashford International]]}}
{{BS|TUNNELa}}
{{BS3||tGRENZE|||<small>[[United Kingdom|GB]]-[[France|FR]] border ([[Channel Tunnel]])</small>||[[Strait of Dover]]|bg=#558cd3}}
{{BS|TUNNELe}}
{{BS|HST|0:54|[[Gare de Calais-Fréthun|Calais-Fréthun]]}}
{{BS|BHF|1:20|[[Gare de Lille-Europe|Lille-Europe]]}}
{{BS3||ABZlf|STRlg|||}}
{{BS3||STR|GRENZE||<small>[[France]]-[[Belgium]] border</small>}}
{{BS3|STRrg|ABZrf|KBHFe|1:51|[[Brussels-South|Bruxelles Midi/Brussel-Zuid]] }}
{{BS3|KBHFe|ABZlf|STRlg|492 / 2:15|[[Gare du Nord|Paris Gare du Nord]]}}
{{BS3||STR|KHSTe|2:33|[[Marne la Vallée-Chessy railway station|Marne la Vallée-Chessy]] <small>([[Disneyland Resort Paris|Disneyland]])</small>}}
{{BS3|STRrg|ABZrf||}}
{{BS3|KHSTe|STR||5:40|[[Avignon]] Centre}}
{{BS|HST|6:27|[[Moûtiers]] <small>(ski)</small>}}
{{BS|eHST|6:59|[[La Plagne|Aime la Plagne]] <small>(ski, set down only)</small>}}
{{BS|KHSTe|7:17|[[Bourg Saint Maurice]] <small>(ski)</small>}}
|bottom=Times shown are fastest timetabled journey from London St Pancras.
}}
[edit] Adding collapsible sections
| Eurostar route map | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{BS-map
|title={{colorbox|#27404E}} Eurostar route map
|width=320px
|map=
{{BS3|||exKBHFa||[[St Pancras railway station|London St. Pancras]]|(''after 2007–11'')}}
{{BS3|||exHST||[[Stratford International station|Stratford International]]}}
{{BS3||KBHFa|exWBRÜCKE|0:00|'''[[Waterloo Station|London Waterloo]]'''}}
{{BS3-startCollapsible||LUECKE|exLUECKE|2:15|Waterloo to Brussels|bg=#c0c0f0}}
{{BS3||STR|exHST||[[Dartford International railway station|Ebbsfleet International]]}}
{{BS3||eABZrg|exSTRrf|}}
{{BS|HST|0:50|[[Ashford International railway station|Ashford International]]}}
{{BS|TUNNELa}}
{{BS|tGRENZE|||[[Channel Tunnel]] (''0:21 transit'')}}
{{BS|TUNNELe}}
{{BS|HST|1:15|[[Gare de Calais-Fréthun|Calais-Fréthun]]}}
{{BS|BHF|1:40|[[Gare de Lille-Europe|Lille-Europe]]}}
{{BS3||ABZlf|STRlg|||}}
{{BS3||STR|GRENZE|||}}
{{!}}}
{{BS3|STRrg|ABZrf|KBHFe|2:15|'''[[Bruxelles Gare du Midi / Brussel-Zuid railway station|Brussels Gare du Midi]]'''}}
{{BS3|KBHFe|ABZlf|STRlg|2:35|'''[[Gare du Nord|Paris Gare du Nord]]'''}}
{{BS3||STR|KHSTe|2:53|'''[[Marne-la-Vallée – Chessy]]'''|(Disneyland)}}
{{BS3|STRrg|ABZrf||}}
{{BS3|KHSTe|STR||6:00|'''[[Avignon]] Centre'''}}
{{BS|HST|6:47|[[Moûtiers]]|(ski)}}
{{BS|eHST|7:19|[[La Plagne|Aime la Plagne]]|(ski: ''set down only'')}}
{{BS|KHSTe|7:37|'''[[Bourg Saint Maurice]]'''|(ski)}}
}}
[edit] Transcluding map in other infobox
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 then transcluded in the said infobox, usually requires the help of other templates like {{BS-table3}} and {{Infobox rdt}}. Read the infobox documentation for examples to prepare the map template.
[edit] Hints
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
- If a station has a WP article, link to that, not to the town.
- Avoid overlinkage to a city or railway when its occurrences are close together on the route map.
- For a line which connects to the subject line link its article particularly if there is a connection for passengers.
- For vee stations show the lines as already joined in the station to show the connection or use the CPIC set. The mere showing of a vee station shows that it has not been overlooked.
- For lines branching off as the route runs from its start specify 'To X', in the opposite case (lines which join) 'From X'".
- Template {{RoutemapRoute}} (shortcut: {{rmr}}) is an option to help describing in the text column with arrow icons )
.
- Template {{RoutemapRoute}} (shortcut: {{rmr}}) is an option to help describing in the text column with arrow icons )
- When your map grows too big like this, it is recommended not to transclude such map inside an infobox or table which floats / aligns to left or right, otherwise it would press the main text outside to the narrow space. This problem exaggerates to user who uses small screen resolution. It is a good idea to align the standalone table to center (as explained in BS-map). If the left/right-aligned table is desired, adjust the map width for a minimum of 1024px display width in Monobook or Vector Wiki style. Set the table collapsed by default also helps by applying the parameter collapse=yes in BS-map.
- If an unusual situation requires using a current icon unconventionally, give an explanation either by the text level with the icon or by a note at the top or bottom of the map, separated by an empty row or border line, showing the "misused" icon and its meaning.
[edit] Pictograms
| Key to symbols | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Key to railway track and platform alignment |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A list of the pictograms which are currently available. A separate page lists waterways pictograms. A directory of icons can be found at Wikimedia Commons.
The conventional file name format for image of this project is as follow: BSicon_(pictogram ID).svg. In BS(#) 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.
(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 1 ROOT or combining 2 or more to form some complex icon. Affixes mostly variate the "base" 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. A complete index is available at User:AlisonW/Rail Icons for CSS-compatible browsers.
[edit] Overlay
If a required icon does not exist it might be produced from 2 to 6 existing icons using the overlay parameter to superimpose one icon over another. Add the overlay parameter in the BS(#) row template, O1 corresponds to icon grid 1, O2 icon grid 2, etc.; O1, O2, O3 represents the 1st layer and O12, O22, O32 directs to the 2nd layer, etc., 5 overlapping layers in total. The icon of greater-number-overlay parameter will appear over the icon of the smaller-number-overlay parameter and the base icon.
|
|||||||
In order to allow the other editors to access the code of the map easier, it is a good practice to line up the overlay parameters right beside the corresponding "base" icon entry. That way we humans do not need to look at the codes back and forth. The following examples A and B give the same result, but example B is recommended for the editors:
|
||||||||||||||||||||
For unknown reason, in Microsoft Internet Explorer 7 or other browsers based on IE7, overlaid icons might shift horizontally to an unintended position (or simply be invisible.) This will happen when changing the browser size or show/hide any collapsible section that will change the BS table position or its width. This can be cured temporarily after purging the page. Also hide the collapsible map and then show it again has the same effect, but there are several benefits to purge the page.
[edit] Transport hubs
| List of Hub icons | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HUB is a set of modules which almost always requires overlaying to describe multiple lines within a large transport hub, usually sharing one station name. The naming rule of these icons is different from ordinary railway icons.
|
|||||||||||||||||||||||||
[edit] Developer notes
[edit] 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 on Commons:category:BSicon and its subcategories whether a such icon already exists.
- Think if the icon you need can be done via overlaying 2 to 6 existing icons.
- Use 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). Be mindful how the image will look like when resized to 20px-high in the map by default.
- The SVG file should not contain any raster graphic and all of its shapes should be done by vector tools.
- Never use copyrighted materials such as company logo. Even if you do not upload the file to Wikimedia Commons, it still violates the terms of Wikipedia:Non-free content when applying them in the map.
- Follow the colour scheme and naming conventions listed in the catalog of pictograms and User:AlisonW/Rail_Icons.
-
- Names should be of the form: "BSicon_prefixROOTsuffix.svg"
- where ROOT defines a general function/shape,
- prefix specifies a coloration/style/usage, and
- suffix is a shape modifier
- redirects must be made for files containing diacritics from their dediacriticized name on Commons. For example file:BSicon BRUECKE.svg redirects to file:BSicon BRÜCKE.svg.
- Tompw's Icon Generator may be used to easily create some types of new SVG icons.
- Preview your SVG image by 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, add proper copyright statement (preferably {{PD-shape}}) and the category such as BSicon or Icons for railway descriptions. The more specific of the category the better. If you are uncertain, just apply the BSicon category and wait for the other editor to change it.
- If you are incapable or having trouble in creating icon, post your question in the icon talk page.
[edit] Test circuit
Not implemented on en: yet
There is a test circuit on German Wikipedia: w:de:Wikipedia Diskussion:Formatvorlage Bahnstrecke/BS Test, where new icons can be safely tested. Please use the template KBSv instead of BS there
[edit] Sandbox area
Experimental design can be produced in Wikipedia:Railway line template/sandbox. You can also create your own sandbox under your username so your testing will not be mixed with the other's.
[edit] See also
- Canal/Water icons:
- Category:Icons for canal descriptions (on Commons)
- {{Waterways legend}}
- FootPath icons:
- Motorway icons:
- Category:Icons for motorway descriptions/Detailed (on Commons)
- Category:Icons for motorway descriptions/Simple (on Commons)
- Rail icons:
- Optional instrumental template:
- {{infobox rdt}}: help transcluding route map into infobox that doesn't support RDT well
- {{Rdt intro}}: description for route template