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

From blackwiki
Jump to navigation Jump to search
imported>Calliopejen1
imported>WT79
(Undid revision 996123311 by WT79 (talk) — oops, thought this was sandbox!)
 
(48 intermediate revisions by 24 users not shown)
Line 1: Line 1:
{{documentation subpage}}
+
{{Documentation subpage}}
 +
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}}
  
 
== Usage ==
 
== Usage ==
{{tl|Infobox rail}} is used to create an [[Wikipedia:Infobox|infobox]] on articles about railway companies.  The <tt>railroad_name</tt>, <tt>locale</tt> and <tt>gauge</tt> parameters are mandatory for this template.
+
{{generic template demo| abbr | alt | caption | defunct | el | electrification | elevation | embedded | end_year | fleet | founded | franchise | gauge | headquarters | hq_city | image | image_alt | image_caption | image_filename | image_size | length | linelength | locale | logo | logo_alt | logo_filename | logo_size | map | map_alt | map_caption | map_name | map_size | map_state | marks | name | nameforarea | notrack | old_gauge | other_name | parent_company | predecessor | predecessor_line | predecessors | railroad_name | regions | routekm | routemap | secregions | speed | start_year | stations | stationsop | successor | successor_line | successors | system_map | tracklength | website  }}
  
For railways that operate on [[standard gauge]] tracks or for former railways that operated on standard gauge tracks, {{tl|Infobox SG rail}} uses this template but fills in the <tt>gauge<tt> parameter automatically.
+
{{tl|Infobox rail}} is used to create an [[Wikipedia:Infobox|infobox]] on articles about railway '''companies'''; {{para|railroad_name}} is the only mandatory parameter. {{tl|Infobox rail line}} is used for railway '''lines'''; this template is sometimes used on articles about both a company and a line (e.g. [[Romney, Hythe and Dymchurch Railway]]). It may also be used on affiliate companies operating rail public transit systems under contract (e.g. [[Arriva Rail London]]).
  
 
== Syntax ==
 
== Syntax ==
<pre>
+
<pre style="overflow:auto;">
 
{{Infobox rail
 
{{Infobox rail
|railroad_name    =  
+
| name              =
|logo_filename    =  
+
| logo              =
|logo_size        =  
+
| logo_size        =
|system_map        =  
+
| logo_alt          =
|map_caption      =  
+
| system_map        =
|map_size         =  
+
| map_size          =
|marks            =  
+
| map_alt          =
|image            =  
+
| map_caption      =
|image_size        =  
+
| image            =
|image_caption    =  
+
| image_size        =
|locale            =  
+
| alt              =
|start_year        =  
+
| caption          =
|end_year          =  
+
| franchise        =
 +
| nameforarea      =
 +
| regions          =
 +
| nameforarea      =
 +
| secregions        =
 +
| fleet            =
 +
| stations         =
 +
| stationsop        =
 +
| parent_company    =
 +
| headquarters      =
 +
| marks            =
 +
| locale            =
 +
| start_year        = <!-- {{Start date|YYYY}} -->
 +
| end_year          = <!-- {{End date|YYYY}} -->
 +
| predecessor_line  = <!-- "predecessors" can also be used; will make label plural -->
 +
| successor_line    = <!-- "successors" can also be used; will make label plural -->
 +
| gauge            = <!-- This needs to be able to handle two current gauges. -->
 +
| old_gauge        = <!-- This needs a separate line -->
 +
| electrification  =
 +
| length            =
 +
| tracklength      =
 +
| notrack          =
 +
| speed            =
 +
| elevation        =
 +
| website          = <!-- {{URL|example.com}} -->
 +
| embedded          =
 +
| map              =
 +
| map_state        =
 +
| map_name          =
 +
}}
 +
</pre>
 +
 
 +
==Parameters==
 +
{| class="wikitable"
 +
|-
 +
! Parameter || Required || Definition
 +
|-
 +
| <code>railroad_name</code> || '''Yes''' || Name of railway company, displayed at top of infobox
 +
|-
 +
| <code>logo</code> || No || Filename of logo image, without <code>File:</code> prefix. Shown just below the railroad name
 +
|-
 +
| <code>logo_size</code> || No || Size of image in pixels with '''px''', default is <code>upright=0.91</code> (see [[Wikipedia:Picture tutorial#Upright images]])
 +
|-
 +
| <code>logo_alt</code> || No || Alt text for logo, used by screen readers. See [[Wikipedia:Alternative text for images]] for more information.
 +
|-
 +
| <code>system_map</code> || No ||  Filename of system map image, without <code>File:</code> prefix, displayed below the logo.
 +
|-
 +
| <code>map_caption</code> || No || Caption for system map image
 +
|-
 +
| <code>map_size</code> || No || Size of image in pixels with '''px''', default is <code>upright=1.41</code>
 +
|-
 +
| <code>map_alt</code> || No || Alt text for map
 +
|-
 +
| <code>image</code> || No || Filename of image, without <code>File:</code> prefix, displayed below the map
 +
|-
 +
| <code>image_size</code> || No || Size of image in pixels with '''px''', default is <code>upright=1.41</code>
 +
|-
 +
| <code>image_caption</code> || No || Image caption
 +
|-
 +
| <code>image_alt</code> || No || Alt text for image
 +
|-
 +
| <code>franchise</code> || No || For Passenger operators: The name of the operating contract the company operates under. Open access operators may be represented as "Not subject to franchising or subsidy". Railfreight companies may leave this parameter blank.
 +
|-
 +
| <code>regions</code> || No || The primary region the railway operates in. For a more specific route or station, use nameforarea parameter
 +
|-
 +
| <code>secregions</code> || No || The secondary regions the railway serves.
 +
|-
 +
| <code>nameforarea</code> || No || May be used in lieu of regions or secregions
 +
|-
 +
| <code>fleet</code> || No || Details about the rolling stock, and where possible, any stock on order.
 +
|-
 +
| <code>stations</code> || No || For Passenger companies: The total number of stations served
 +
|-
 +
| <code>stationsop</code> || No || Number of stations the railway acts as property manager for, whether in a ''de jure'' or ''de facto'' status.
 +
|-
 +
| <code>parent_company</code> || No || The shareholders in the company, in some cases, the owner. Leave blank if owner is an individual person.
 +
|-
 +
| <code>headquarters</code> || No || The city where the railway's main office is located.
 +
|-
 +
| <code>marks</code> || No || Shown as '''[[Reporting mark]]'''.  The definition may be:
 +
* '''UIC''': a two to five letter identifier displayed on the vehicles where applicable, often an acronym of the railway's legal name.
 +
* '''[[Association of American Railroads|AAR]]''': a two to four letter code for the railway, often an acronym of the railway's [[trade name]].
 +
* '''[[National Rail|NR]]''': The two letter code used by passenger operators in daily operation
 +
* Other: Abbreviation of individual rolling stock lessors.
 +
|-
 +
| <code>locale</code> || No || Region railway is located, typically a bioregion. Used primarily for freight railways.
 +
|-
 +
| <code>start_year</code> || No || Year railway commenced operations, if exact date is known use {{tl|Start date}} template, Using <code>df=y</code> parameter to display in day month year format if appropriate. Shown as '''Dates of operation'''
 +
|-
 +
| <code>end_year</code> || No || Year railway ceased operations, if exact date is known, use {{tl|End date}} template. If currently operating, type "present". Shown as '''Dates of operation'''
 +
|-
 +
| <code>predecessor_line</code> || No ||
 +
* '''A''': list of companies that were merged to make up this company.
 +
* '''B''': The preceding operator of a contracted service
 +
|-
 +
| <code>successor_line</code> || No || Subsequent railway company that operated the company's railway lines
 +
|-
 +
| <code>gauge</code> || No || Current [[Track gauge]] (use template {{tl|Track gauge}})
 +
|-
 +
| <code>old_gauge</code> || No || Previous rail gauge (use template {{tl|Track gauge}}), shown as '''Previous gauge'''
 +
|-
 +
| <code>electrification</code> || No || Type and voltage of electrification system. Leave blank if no electrification exists.
 +
|-
 +
| <code>length</code> || No || Total length of the railway system
 +
|-
 +
| <code>speed</code> || No || Maximum operating speed of the railway's services, and where possible, the service type in parentheses.
 +
|-
 +
| <code>website</code> || No || Official Website, use {{tl|URL}} template
 +
|-
 +
|}
 +
 
 +
===Embedding other infoboxes===
 +
The <code>embedded=</code> parameter can be used to embed another infobox with such capability like {{tl|designation list}} and {{tl|infobox NRHP}}.
 +
 
 +
==Examples==
 +
{| class="wikitable"
 +
|-
 +
! Usage !! Code !! Example
 +
|-
 +
| Minimum use || <pre>{{Infobox rail
 +
|railroad_name=Isle of Sodor Railway
 +
}}</pre> || {{Infobox rail
 +
|railroad_name=Isle of Sodor Railway
 +
}}
 +
|-
 +
| Logo || <pre>{{Infobox rail
 +
| railroad_name=Isle of Sodor Railway
 +
| logo = No-photo.svg
 +
| logo_size = 300px}}</pre> || {{Infobox rail
 +
| railroad_name=Isle of Sodor Railway
 +
| logo = No-logo.svg
 +
| logo_size = 300px}}
 +
|-
 +
| Image || <pre>{{Infobox rail
 +
| railroad_name = [[Great North of Scotland Railway]]
 +
| image        = Gordon Highlander steam locomotive.jpg
 +
| image_size    = 300px
 +
| image_caption = No. 49 ''Gordon Highlander'', built
 +
  for the [[Great North of Scotland Railway]] in 1920
 +
}}
 +
</pre> || {{Infobox rail
 +
| railroad_name    = [[Great North of Scotland Railway]]
 +
| image            = Gordon Highlander steam locomotive.jpg
 +
| image_size        = 300px
 +
| image_caption    = No. 49 ''Gordon Highlander'', built for the [[Great North of Scotland Railway]] in 1920
 +
}}
 +
|-
 +
 
 +
| Text ||<pre>{{Infobox rail
 +
|railroad_name    = [[Great North of Scotland Railway]]
 +
|marks            = FGW
 +
|locale            = North Scotland
 +
|start_year        = {{Start date|1906|5|12}}
 +
|end_year          = {{End date|1923|1|20}}
 +
|predecessor_line  =
 +
|successor_line    = [[London and North Eastern Railway]]
 +
|gauge            = {{Track gauge|56.5in|allk=on}}
 +
|old_gauge        = {{Track gauge|42in|lk=on}}
 +
|electrification  = 650 [[Volt|V]] [[Direct current|DC]]
 +
|length            = {{convert|50|mi}}
 +
|hq_city          = N/A
 +
|website          = N/A
 +
}}</pre> || {{Infobox rail
 +
|railroad_name    = [[Great North of Scotland Railway]]
 +
|marks            = FGW
 +
|locale            = North Scotland
 +
|start_year        = {{Start date|1906|5|12}}
 +
|end_year          = {{End date|1923|1|20}}
 
|predecessor_line  =  
 
|predecessor_line  =  
|successor_line    =  
+
|successor_line    = [[London and North Eastern Railway]]
|gauge            =
+
|gauge            = {{Track gauge|56.5in|allk=on}}
|old_gauge        =  
+
|old_gauge        = {{Track gauge|42in|lk=on}}
|electrification  =  
+
|electrification  = 650 [[Volt|V]] [[Direct current|DC]]
|length            =  
+
|length            = {{convert|50|mi}}
|hq_city          =  
+
|hq_city          = N/A
|website          =  
+
|website          = N/A
 +
}}
 +
|-
 +
| (Nearly) Everything ||<pre>{{Infobox rail
 +
| railroad_name = [[Great North of Scotland Railway]]
 +
| logo = No-photo.svg
 +
| system_map    = Temporary placeholder photo.jpg
 +
| image        = Gordon Highlander steam locomotive.jpg
 +
| image_size    = 300px
 +
| image_caption = No. 49 ''Gordon Highlander'', built
 +
for the [[Great North of Scotland Railway]] in 1920
 +
|marks          = FGW
 +
|locale        = North Scotland
 +
|start_year    = {{Start date|1906|5|12}}
 +
|end_year      = {{End date|1923|1|20}}
 +
|predecessor_line=
 +
|successor_line = [[London and North Eastern Railway]]
 +
|gauge          = {{Track gauge|56.5in|allk=on}}
 +
|old_gauge      = {{Track gauge|42in|lk=on}}
 +
|electrification= 650 [[Volt|V]] [[Direct current|DC]]
 +
|length        = {{convert|50|mi}}
 +
|hq_city        = N/A
 +
|website        = N/A
 +
}}</pre> ||{{Infobox rail
 +
|railroad_name = [[Great North of Scotland Railway]]
 +
|logo =
 +
|system_map    = Temporary placeholder photo.jpg
 +
|image        = Gordon Highlander steam locomotive.jpg
 +
|image_size    = 300px
 +
|image_caption = No. 49 ''Gordon Highlander'', built for
 +
the [[Great North of Scotland Railway]] in 1920
 +
|marks          = FGW
 +
|locale        = North Scotland
 +
|start_year    = {{Start date|1906|5|12}}
 +
|end_year      = {{End date|1923|1|20}}
 +
|predecessor_line=
 +
|successor_line = [[London and North Eastern Railway]]
 +
|gauge          = {{Track gauge|56.5in|allk=on}}
 +
|old_gauge      = {{Track gauge|42in|lk=on}}
 +
|electrification= 650 [[Volt|V]] [[Direct current|DC]]
 +
|length        = {{convert|50|mi}}
 +
|hq_city        = N/A
 +
|website        = N/A
 
}}
 
}}
</pre>
+
|}
 +
 
 +
==Tracking category==
 +
* {{clc|Pages using infobox rail with unknown parameters}}
  
 
==See also==
 
==See also==
 
{{Organization infoboxes}}
 
{{Organization infoboxes}}
  
<includeonly>
+
<includeonly>{{Sandbox other||
 +
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Rail transport infobox templates|Rail]]
 
[[Category:Rail transport infobox templates|Rail]]
[[ja:Template:Infobox rail]]
+
[[Category:Templates that add a tracking category]]
[[ml:ഫലകം:Infobox rail]]
+
}}</includeonly>
[[pt:Predefinição:Info/Ferrovia]]
 
</includeonly>
 

Latest revision as of 17:46, 24 December 2020

Usage

  1. redirect Template:Parameter names example

{{Infobox rail}} is used to create an infobox on articles about railway companies; |railroad_name= is the only mandatory parameter. {{Infobox rail line}} is used for railway lines; this template is sometimes used on articles about both a company and a line (e.g. Romney, Hythe and Dymchurch Railway). It may also be used on affiliate companies operating rail public transit systems under contract (e.g. Arriva Rail London).

Syntax

{{Infobox rail
| name              =
| logo              =
| logo_size         =
| logo_alt          =
| system_map        =
| map_size          =
| map_alt           =
| map_caption       =
| image             =
| image_size        =
| alt               =
| caption           =
| franchise         =
| nameforarea       =
| regions           =
| nameforarea       =
| secregions        =
| fleet             =
| stations          =
| stationsop        =
| parent_company    =
| headquarters      =
| marks             =
| locale            =
| start_year        = <!-- {{Start date|YYYY}} -->
| end_year          = <!-- {{End date|YYYY}} -->
| predecessor_line  = <!-- "predecessors" can also be used; will make label plural -->
| successor_line    = <!-- "successors" can also be used; will make label plural -->
| gauge             = <!-- This needs to be able to handle two current gauges. -->
| old_gauge         = <!-- This needs a separate line -->
| electrification   =
| length            = 
| tracklength       =
| notrack           =
| speed             =
| elevation         =
| website           = <!-- {{URL|example.com}} -->
| embedded          =
| map               =
| map_state         =
| map_name          =
}}

Parameters

Parameter Required Definition
railroad_name Yes Name of railway company, displayed at top of infobox
logo No Filename of logo image, without File: prefix. Shown just below the railroad name
logo_size No Size of image in pixels with px, default is upright=0.91 (see Wikipedia:Picture tutorial#Upright images)
logo_alt No Alt text for logo, used by screen readers. See Wikipedia:Alternative text for images for more information.
system_map No Filename of system map image, without File: prefix, displayed below the logo.
map_caption No Caption for system map image
map_size No Size of image in pixels with px, default is upright=1.41
map_alt No Alt text for map
image No Filename of image, without File: prefix, displayed below the map
image_size No Size of image in pixels with px, default is upright=1.41
image_caption No Image caption
image_alt No Alt text for image
franchise No For Passenger operators: The name of the operating contract the company operates under. Open access operators may be represented as "Not subject to franchising or subsidy". Railfreight companies may leave this parameter blank.
regions No The primary region the railway operates in. For a more specific route or station, use nameforarea parameter
secregions No The secondary regions the railway serves.
nameforarea No May be used in lieu of regions or secregions
fleet No Details about the rolling stock, and where possible, any stock on order.
stations No For Passenger companies: The total number of stations served
stationsop No Number of stations the railway acts as property manager for, whether in a de jure or de facto status.
parent_company No The shareholders in the company, in some cases, the owner. Leave blank if owner is an individual person.
headquarters No The city where the railway's main office is located.
marks No Shown as Reporting mark. The definition may be:
  • UIC: a two to five letter identifier displayed on the vehicles where applicable, often an acronym of the railway's legal name.
  • AAR: a two to four letter code for the railway, often an acronym of the railway's trade name.
  • NR: The two letter code used by passenger operators in daily operation
  • Other: Abbreviation of individual rolling stock lessors.
locale No Region railway is located, typically a bioregion. Used primarily for freight railways.
start_year No Year railway commenced operations, if exact date is known use {{Start date}} template, Using df=y parameter to display in day month year format if appropriate. Shown as Dates of operation
end_year No Year railway ceased operations, if exact date is known, use {{End date}} template. If currently operating, type "present". Shown as Dates of operation
predecessor_line No
  • A: list of companies that were merged to make up this company.
  • B: The preceding operator of a contracted service
successor_line No Subsequent railway company that operated the company's railway lines
gauge No Current Track gauge (use template {{Track gauge}})
old_gauge No Previous rail gauge (use template {{Track gauge}}), shown as Previous gauge
electrification No Type and voltage of electrification system. Leave blank if no electrification exists.
length No Total length of the railway system
speed No Maximum operating speed of the railway's services, and where possible, the service type in parentheses.
website No Official Website, use {{URL}} template

Embedding other infoboxes

The embedded= parameter can be used to embed another infobox with such capability like {{designation list}} and {{infobox NRHP}}.

Examples

Usage Code Example
Minimum use
{{Infobox rail
|railroad_name=Isle of Sodor Railway
}}
Isle of Sodor Railway
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
LengthScript error: No such module "If empty".
Logo
{{Infobox rail
| railroad_name=Isle of Sodor Railway
| logo = No-photo.svg
| logo_size = 300px}}
Isle of Sodor Railway
No-logo.svg
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
LengthScript error: No such module "If empty".
Image
{{Infobox rail
| railroad_name = [[Great North of Scotland Railway]]
| image         = Gordon Highlander steam locomotive.jpg
| image_size    = 300px
| image_caption = No. 49 ''Gordon Highlander'', built
  for the [[Great North of Scotland Railway]] in 1920
}}
Great North of Scotland Railway
Gordon Highlander steam locomotive.jpg
No. 49 Gordon Highlander, built for the Great North of Scotland Railway in 1920
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
LengthScript error: No such module "If empty".
Text
{{Infobox rail
|railroad_name     = [[Great North of Scotland Railway]]
|marks             = FGW
|locale            = North Scotland
|start_year        = {{Start date|1906|5|12}}
|end_year          = {{End date|1923|1|20}}
|predecessor_line  = 
|successor_line    = [[London and North Eastern Railway]]
|gauge             = {{Track gauge|56.5in|allk=on}}
|old_gauge         = {{Track gauge|42in|lk=on}}
|electrification   = 650 [[Volt|V]] [[Direct current|DC]]
|length            = {{convert|50|mi}}
|hq_city           = N/A
|website           = N/A
}}
Great North of Scotland Railway
Overview
HeadquartersN/A
Reporting markFGW
LocaleNorth Scotland
Dates of operationMay 12, 1906 (1906-05-12)–January 20, 1923 (1923-01-20)
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
Technical
Track gaugeTemplate:Track gauge
Previous gaugeTemplate:Track gauge
Electrification650 V DC
LengthScript error: No such module "If empty".
Other
WebsiteN/A
(Nearly) Everything
{{Infobox rail
| railroad_name = [[Great North of Scotland Railway]]
| logo = No-photo.svg
| system_map    = Temporary placeholder photo.jpg
| image         = Gordon Highlander steam locomotive.jpg
| image_size    = 300px
| image_caption = No. 49 ''Gordon Highlander'', built
 for the [[Great North of Scotland Railway]] in 1920
|marks          = FGW
|locale         = North Scotland
|start_year     = {{Start date|1906|5|12}}
|end_year       = {{End date|1923|1|20}}
|predecessor_line= 
|successor_line = [[London and North Eastern Railway]]
|gauge          = {{Track gauge|56.5in|allk=on}}
|old_gauge      = {{Track gauge|42in|lk=on}}
|electrification= 650 [[Volt|V]] [[Direct current|DC]]
|length         = {{convert|50|mi}}
|hq_city        = N/A
|website        = N/A
}}
Great North of Scotland Railway
Temporary placeholder photo.jpg
Gordon Highlander steam locomotive.jpg
No. 49 Gordon Highlander, built for the Great North of Scotland Railway in 1920
Overview
HeadquartersN/A
Reporting markFGW
LocaleNorth Scotland
Dates of operationMay 12, 1906 (1906-05-12)–January 20, 1923 (1923-01-20)
PredecessorScript error: No such module "If empty".
SuccessorScript error: No such module "If empty".
Technical
Track gaugeTemplate:Track gauge
Previous gaugeTemplate:Track gauge
Electrification650 V DC
LengthScript error: No such module "If empty".
Other
WebsiteN/A

Tracking category

See also

Template:Organization infoboxes