Difference between revisions of "Template:Infobox rail line/doc"

From blackwiki
Jump to navigation Jump to search
imported>Peter Horn
(→‎Copy and paste: + | route number=)
imported>Eubulides
(→‎Parameter list and definitions: Coalesce 1st column (which was almost useless and almost all redundant) into the last column.)
Line 7: Line 7:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Name || Parameter || Required || Definition
+
! Parameter || Required || Definition
 
|-
 
|-
| Infobox width || <code>box_width</code> || No || Width of infobox, default: 25em; Note: use <code>auto</code> for automatic width
+
| <code>box_width</code> || No || Width of infobox, default: 25em; Note: use <code>auto</code> for automatic width
 
|-
 
|-
| Name || <code>name</code> || No || Name of rail line; default:Article Name
+
| <code>name</code> || No || Name of rail line; default:Article Name
 
|-
 
|-
| Color || <code>color</code> || No || Color of rail line
+
| <code>color</code> || No || Color of rail line
 
|-
 
|-
| Logo || <code>logo</code> || No || Filename of image for the logo
+
| <code>logo</code> || No || Filename of image for the logo
 
|-
 
|-
| Logo width || <code>logo_width</code> || No || Size of logo, default: 200px
+
| <code>logo_width</code> || No || Size of logo, default: 200px
 
|-
 
|-
| Image || <code>image</code> || No || Filename of image
+
| <code>image</code> || No || Filename of image
 
|-
 
|-
| Image width || <code>image_width</code> || No || Size of image, default: 250px
+
| <code>image_width</code> || No || Size of image, default: 250px
 
|-
 
|-
| Caption || <code>caption</code> || No || Caption of image
+
| <code>caption</code> || No || Caption of image
 
|-
 
|-
| Type || <code>type</code> || No || Type of transit system. Types ''may'' include (one or more):
+
| <code>type</code> || No || Type of transit system. Types ''may'' include (one or more):
 
* [[Heavy rail]]
 
* [[Heavy rail]]
 
* [[Commuter rail]] – use in lieu of "Regional rail," "Commuter train," etc.
 
* [[Commuter rail]] – use in lieu of "Regional rail," "Commuter train," etc.
Line 37: Line 37:
 
* [[Interurban]]
 
* [[Interurban]]
 
|-
 
|-
| System || <code>system</code> || No || Name of transit system the rail line is part of
+
| <code>system</code> || No || Name of transit system the rail line is part of
 
|-
 
|-
| Status || <code>status</code> || No || Status of rail line
+
| <code>status</code> || No || Status of rail line
 
|-
 
|-
| Locale || <code>locale</code> || No || City or region transit system is located
+
| <code>locale</code> || No || City or region transit system is located
 
|-
 
|-
| Start terminus || <code>start</code> || No || Name of starting terminal station
+
| <code>start</code> || No || Name of starting terminal station
 
|-
 
|-
| End terminus || <code>end</code> || No || Name of ending terminal station
+
| <code>end</code> || No || Name of ending terminal station
 
|-
 
|-
| No. of stations || <code>stations</code> || No || Number of stations/stops
+
| <code>stations</code> || No || Number of stations/stops
 
|-
 
|-
| Service routes || <code>routes</code> || No || Service routes of rail line
+
| <code>routes</code> || No || Service routes of rail line
 
|-
 
|-
| Daily ridership || <code>ridership</code> || No || Daily system ridership
+
| <code>ridership</code> || No || Daily system ridership
 
|-
 
|-
| Opened || <code>open</code> || No || Date rail line opened
+
| <code>open</code> || No || Date rail line opened
 
|-
 
|-
| Closed || <code>close</code> || No || Date rail line closed
+
| <code>close</code> || No || Date rail line closed
 
|-
 
|-
| Reopened || <code>reopen</code> || No || Date rail line reopened after closure
+
| <code>reopen</code> || No || Date rail line reopened after closure
 
|-
 
|-
| Owner || <code>owner</code> || No || Owner of rail line
+
| <code>owner</code> || No || Owner of rail line
 
|-
 
|-
| Operator(s) || <code>operator</code> || No || Operator of rail line
+
| <code>operator</code> || No || Operator(s) of rail line
 
|-
 
|-
| Character || <code>character</code> || No ||
+
| <code>character</code> || No ||
 
|-
 
|-
| Depot(s) || <code>depot</code> || No || Name of traction maintenance depot(s) of rail line
+
| <code>depot</code> || No || Name of traction maintenance depot(s) of rail line
 
|-
 
|-
| Rolling stock || <code>stock</code> || No || Types of rolling stock used on the rail line
+
| <code>stock</code> || No || Types of rolling stock used on the rail line
 
|-
 
|-
| Line length || <code>linelength</code> || No || Line length (use {{tl|mi to km}} or {{tl|km to mi}} to display both [[United States customary units|U.S.]] and [[metric system|metric]] units, alternatively {{convert|1|km|mi|1|abbr=on|lk=on}} or {{convert|1|mi|km|1|abbr=on|lk=on}})
+
| <code>linelength</code> || No || Line length (use {{tl|mi to km}} or {{tl|km to mi}} to display both [[United States customary units|U.S.]] and [[metric system|metric]] units, alternatively {{convert|1|km|mi|1|abbr=on|lk=on}} or {{convert|1|mi|km|1|abbr=on|lk=on}})
 
|-
 
|-
| Track length || <code>tracklength</code> || No || Track length (use {{tl|mi to km}} or {{tl|km to mi}} to display both [[United States customary units|U.S.]] and [[metric system|metric]] units, alternatively {{convert|1|km|mi|1|abbr=on|lk=on}} or {{convert|1|mi|km|1|abbr=on|lk=on}})
+
| <code>tracklength</code> || No || Track length (use {{tl|mi to km}} or {{tl|km to mi}} to display both [[United States customary units|U.S.]] and [[metric system|metric]] units, alternatively {{convert|1|km|mi|1|abbr=on|lk=on}} or {{convert|1|mi|km|1|abbr=on|lk=on}})
 
|-
 
|-
| No. of tracks || <code>notrack</code> || No || Number of tracks
+
| <code>notrack</code> || No || Number of tracks
 
|-
 
|-
| [[Rail gauge|Gauge]] || <code>gauge</code> || No || Rail gauge (use template – see [[:Category:Rail transport gauge templates]])
+
| <code>gauge</code> || No || [[Rail gauge]] (use template – see [[:Category:Rail transport gauge templates]])
 
|-
 
|-
| Old gauge || <code>ogauge</code> || No || Old rail gauge (use template – see [[:Category:Rail transport gauge templates]])
+
| <code>ogauge</code> || No || Old rail gauge (use template – see [[:Category:Rail transport gauge templates]])
 
|-
 
|-
| Minimum radius of curvature || <code>minradius</code> || No || Minimum radius of curvature (use template:convert)
+
| <code>minradius</code> || No || Minimum radius of curvature (use template:convert)
 
|-
 
|-
|Rack system || <code>racksystem</code> || No  || Examples: [[Abt rack system|Abt]] or [[Strub rack system|Strub]], as the case may be.
+
| <code>racksystem</code> || No  || Rack system. Examples: [[Abt rack system|Abt]] or [[Strub rack system|Strub]], as the case may be.
 
|-
 
|-
| Electrification || <code>el</code> || No || Electrification system (e.g. [[Third rail]], [[Overhead catenary]]) and/or voltage
+
| <code>el</code> || No || Electrification system (e.g. [[Third rail]], [[Overhead catenary]]) and/or voltage
 
|-
 
|-
| Train Number(s) || <code>trainnumber</code> || No || Train numbers running as shown in official timetables and printed on tickets.
+
| <code>trainnumber</code> || No || Train number(s) running as shown in official timetables and printed on tickets.
 
|-
 
|-
| Route Number(s) || <code>routenumber</code> || No || Number indicated in timetables to identify the stretch of track, in Germany usually referred as ''Kursbuchstrecke''
+
| <code>routenumber</code> || No || Route number(s) indicated in timetables to identify the stretch of track, in Germany usually referred as ''Kursbuchstrecke''
 
|-
 
|-
| Line Number(s) || <code>linenumber</code> || No || Identifier of set of trains with same service, usually seen in suburban trains. eg. S7, IENA, 7, Line A. Not to be confused with the technical track.
+
| <code>linenumber</code> || No || Line number(s). Identifier(s) of set of trains with same service, usually seen in suburban trains. eg. S7, IENA, 7, Line A. Not to be confused with the technical track.
 
|-
 
|-
| Operating speed || <code>speed</code> || No || Maximum or operating speed of the rail line (use <nowiki>{{convert|0|mph|km/h|abbr=on}} or {{convert|0|km/h|mph|abbr=on}}</nowiki> to display both [[United States customary units|U.S.]] and [[metric system|metric]] units))
+
| <code>speed</code> || No || Maximum or operating speed of the rail line (use <nowiki>{{convert|0|mph|km/h|abbr=on}} or {{convert|0|km/h|mph|abbr=on}}</nowiki> to display both [[United States customary units|U.S.]] and [[metric system|metric]] units))
 
|-
 
|-
| Highest elevation || <code>elevation</code> || No || Highest elevation of the rail line
+
| <code>elevation</code> || No || Highest elevation of the rail line
 
|-
 
|-
|Website || <code>website</code> || No || Website
+
| <code>website</code> || No || Website
 
|-
 
|-
| Map || <code>map</code> || No || Map of line
+
| <code>map</code> || No || Map of line
 
|-
 
|-
| Map title || <code>map_name</code> || No || Title of map; default: Route map
+
| <code>map_name</code> || No || Title of map; default: Route map
 
|-
 
|-
| Show/hide line map || <code>map_state</code> || No || Shows or hides map. Use <code>show</code> or <code>collapsed</code>
+
| <code>map_state</code> || No || Shows or hides map. Use <code>show</code> or <code>collapsed</code>
 
|}
 
|}
  

Revision as of 17:53, 27 August 2009

Template:Template doc page viewed directly

Please use Template:Infobox rail line freight for freight lines (includes historic data).

Parameter list and definitions

Parameter Required Definition
box_width No Width of infobox, default: 25em; Note: use auto for automatic width
name No Name of rail line; default:Article Name
color No Color of rail line
logo No Filename of image for the logo
logo_width No Size of logo, default: 200px
image No Filename of image
image_width No Size of image, default: 250px
caption No Caption of image
type No Type of transit system. Types may include (one or more):
system No Name of transit system the rail line is part of
status No Status of rail line
locale No City or region transit system is located
start No Name of starting terminal station
end No Name of ending terminal station
stations No Number of stations/stops
routes No Service routes of rail line
ridership No Daily system ridership
open No Date rail line opened
close No Date rail line closed
reopen No Date rail line reopened after closure
owner No Owner of rail line
operator No Operator(s) of rail line
character No
depot No Name of traction maintenance depot(s) of rail line
stock No Types of rolling stock used on the rail line
linelength No Line length (use {{mi to km}} or {{km to mi}} to display both U.S. and metric units, alternatively 1 km (0.6 mi) or 1 mi (1.6 km))
tracklength No Track length (use {{mi to km}} or {{km to mi}} to display both U.S. and metric units, alternatively 1 km (0.6 mi) or 1 mi (1.6 km))
notrack No Number of tracks
gauge No Rail gauge (use template – see Category:Rail transport gauge templates)
ogauge No Old rail gauge (use template – see Category:Rail transport gauge templates)
minradius No Minimum radius of curvature (use template:convert)
racksystem No Rack system. Examples: Abt or Strub, as the case may be.
el No Electrification system (e.g. Third rail, Overhead catenary) and/or voltage
trainnumber No Train number(s) running as shown in official timetables and printed on tickets.
routenumber No Route number(s) indicated in timetables to identify the stretch of track, in Germany usually referred as Kursbuchstrecke
linenumber No Line number(s). Identifier(s) of set of trains with same service, usually seen in suburban trains. eg. S7, IENA, 7, Line A. Not to be confused with the technical track.
speed No Maximum or operating speed of the rail line (use {{convert|0|mph|km/h|abbr=on}} or {{convert|0|km/h|mph|abbr=on}} to display both U.S. and metric units))
elevation No Highest elevation of the rail line
website No Website
map No Map of line
map_name No Title of map; default: Route map
map_state No Shows or hides map. Use show or collapsed

Usage

Copy and paste

{{Infobox rail line
 | box_width   =
 | name        =
 | color       =
 | logo        =
 | logo_width  =
 | image       =
 | image_width =
 | caption     =
 | type        =
 | system      =
 | status      =
 | locale      =
 | start       =
 | end         =
 | stations    =
 | routes      =
 | ridership   =
 | open        =
 | close       =
 | owner       =
 | operator    =
 | character   =
 | depot       =
 | stock       =
 | linelength  = {{mi to km|0|abbr=yes|precision=2|wiki=yes}}
 | tracklength = {{mi to km|0|abbr=yes|precision=2|wiki=yes}}
 | notrack     =
 | gauge       =
 | old gauge   =
 | minradius   =
 | racksystem  =
 | route number=
 | el          =
 | speed       = {{convert|0|mph|km/h|abbr=on}}
 | elevation   =
 | website     =
 | map         =
 | map_state   = collapsed
}}

Example

{{Infobox rail line
 | name        = Alpha Line
 | color       = 003399
 | logo        = wiki.png
 | logo_width  = 100px
 | image       = placeholder.png
 | image_width =
 | caption     = Placeholder caption
 | type        = [[Light rail]]
 | system      = ABC Transit
 | status      = Ceased operation
 | locale      = [[Newark, New Jersey|Newark]]
 | start       = Station A
 | end         = Station M
 | stations    = 15
 | routes      = 1
 | ridership   = 239,200
 | open        = [[June 22]], [[1904]]
 | close       = [[March 8]], [[1942]]
 | owner       =
 | operator    = BCT Transport
 | character   =
 | depot       =
 | stock       =
 | linelength  = {{mi to km|13.8|abbr=yes|precision=2|wiki=yes}}
 | tracklength =
 | notrack     =
 | gauge       = {{RailGauge|sg|al=on|lk=on}}
 | radius      = {{convert|20|m|ft|1|lk=on|abbr=on}}
 | el          =
 | speed       =
 | elevation   =
 | map         = [[Image:placeholder.png|200px]]
 | map_name    =
 | map_state   = collapsed
}}
Alpha Line
100px
Placeholder.png
Placeholder caption
Overview
StatusCeased operation
LocaleNewark
TerminiStation A
Station M
Stations15
Service
TypeLight rail
SystemABC Transit
Services1
Operator(s)BCT Transport
History
OpenedJune 22, 1904
ClosedMarch 8, 1942
Technical
Line lengthTemplate:Mi to km
Track gaugeTemplate:RailGauge
Route map
Placeholder.png

Including WP:Route diagram template in map parameter

There are reports that route map using WP:Route diagram template included in the infobox "breaks apart" in browser such as Microsoft Internet Explorer 7 like the left one. This issue doesn't exist under browser like IE8, Firefox or Opera by their default font and margin preferences.

breaking rows fixed
Template:PAGENAMEBASE
Route map
Template:Needhammap
Template:PAGENAMEBASE
Route map

Use template {{infobox rdt}} if break occurs on every row:

map = {{Infobox rdt|ROUTE DIAGRAM TEMPLATE NAME}}

If some of the row of route map made with WP:ROUTE set (not entirely) breaks apart, possibly the infobox width is too short and forcing some of the text description within the route diagram template to return. Increase the box_width parameter, or putting auto will solve this problem.