模板:S-line

被永久保護的模板
維基百科,自由的百科全書
文件圖示 模板文件[檢視] [編輯] [歷史] [清除快取]

本模板目前已兼容英文版的s-line用法。使用舊版用法的可繼續使用;如若舊版用法出現錯誤,可能需要在本模板前增加換行;其他錯誤請提交至互助客棧

(舊版)此模板與Start rail box一起使用,欲知詳情請參見該模板的頁面及討論頁。

(新版)以下為英文版s-line的文檔(英文)


用法

數據模塊

本模板需要在模塊:RailSystems內存在相應子模塊頁面 (例如模塊:RailSystems/BJS) 的前提下才能正確顯示。子模塊須遵照指定格式,並包含系統名稱,路線名稱,起迄站,標識色等路線數據。

有關子模塊的建立與修改,或確認所編輯的鐵路系統是否存在對應的子模塊,請參閱模塊:RailSystems的模塊文檔。注意並不是所有參數都用於本模板。

調用模板

S-line必須用於{{s-rail-start}}及{{s-end}}之間。強烈建議使用{{s-rail}},但並非必要使用。

注意:在{{Infobox station}}模板的servicesadjacent參數中使用本模板時,不需要聲明{{s-rail-start}}及{{s-end}}。因為{{Infobox station}}中已內嵌{{s-rail-start}}及{{s-end}}語句。

對於多條路線或系統,每一條路線均需聲明一次{{S-line|方可正確顯示。

參數

S-line有以下參數:

參數 描述 備註
system 路線所屬的路網 此參數應對應Template:S-rail/lines其中一項
line 路線名稱
previous 上一站名稱
next 下一站名稱
type 路線左側支線 選填
type2 路線右側支線 選填
note 路線左側支線資訊 選填
note2 路線右側支線資訊 選填
notemid 有關車站本身資訊 選填
oneway1 顥示列車不前往上一站 選填
oneway2 顥示列車不前往下一站 選填
rows1, hide1 用於上一站的同一個方格內顯示多條路線。參見下面 選填
rows2, hide2 用於下一站的同一個方格內顯示多條路線。參見下面 選填
rowsmid, hidemid 用於中央(路線)方格內顯示多條路線。參見下面 選填
transfer 顯示鄰站可進行轉乘。參見下面 選填
branch 用於顯示特定支線資料。可代替或補充type參數 選填
state1, state2 容許將直通運行作為額外車站參數。常用於消歧義 選填
through1, through2 容許顯示直通運行車站而非下一站 選填

示例

普通車站

在使用本模版的情況下,要生成一個最簡單的顯示相鄰車站的表格,所需要填寫的參數僅有系統名稱system,路線名line,上一站previous及下一站next。起迄站名稱不需要手動輸入。本模板會自動從對應的數據模塊中獲取起迄站數據,並分別顯示於上一站及下一站站名的下方。如果所輸入的上一站或下一站的名稱與數據模塊內的起迄站相同,本模板也能自動判斷,並在站名下方標示終點站字樣。如果上一站或下一站即為終點站,只需將對應參數留空。

下面是該情況下的例子。

原始碼 效果
{{s-rail-start}}
{{s-rail|title=HZM}}
{{s-line|system=HZM|line=1|previous=定安路|next=凤起路}}
{{s-end}}

換乘站

如果想表示兩條及以上的路線,只需要在前一條路線的下方再次調用本模板,加入所需路線的信息即可。

下面是該情況下的例子。

原始碼 效果
{{s-rail-start}}
{{s-rail|title=BJS}}
{{s-line|system=BJS|line=1|previous=南礼士路|next=西单}}
{{s-line|system=BJS|line=2|previous=阜成门|next=长椿街}}
{{s-end}}

對於擁有兩個及以上不同的鐵路系統的換乘站,需要先輸入另一個鐵路系統的{{s-rail}},再使用不同的system參數的本模板。

下面是該情況下的例子。

原始碼 效果
{{s-rail-start}}
{{s-rail|title=SHMetro}}
{{s-line|system=SHMetro|line=11|previous=光明路}}
{{s-rail|title=SuzhouRT}}
{{s-line|system=SuzhouRT|line=S1|previous=花溪公园}}
{{s-end}}

主線與支線

主線與支線的名稱與起迄站數據保存在數據模塊內。如果想顯示各支線不同的起迄站,在branch參數內輸入對應支線的名稱即可。

下面是該情況下的例子。

原始碼 效果
{{s-rail-start}}
{{s-rail|title=GZM}}
{{s-line|system=GZM|line=14|rows1=2|previous=马沥|next=太平|branch=主线}}
{{s-line|system=GZM|line=14|hide1=yes|next=红卫|branch=知识城支线}}
{{s-end}}

備註信息

使用notenote2notemid參數可在前後站及路線名單元格內加入通車情況,前後車站間距等備註信息。

下面是該情況下的例子。

原始碼 效果
{{s-rail-start}}
{{s-rail|title=NJM}}
{{s-line|system=NJM|line=1|previous=南京站|note=1.69km|next=玄武门|note2=1.06km}}
{{s-end}}

直通運行

使用through1through2參數可顯示直通運行信息。

下面是該情況下的例子。

原始碼 效果
{{s-rail-start}}
{{s-rail|title=KunmingRT}}
{{s-line new|system=KunmingRT|line=1|previous=2|next=昆明火车站|through1=yes}}
{{s-line new|system=KunmingRT|line=2|previous=塘子巷|next=1|through2=yes}}
{{s-end}}

One Way Operation

For rail lines that operate in only one direction (such as going around a loop), the oneway1 or oneway2 parameters are used, to indicate that the Previous or Next station, respectively, does not have service going towards it. When these parameters are present with any non-null value, the toward [Terminal] line is replaced with One-way Operation. For example, for a CTA station in the Chicago Loop:

{{s-rail-start}}
{{s-rail|title=CTA}}
{{s-line new|system=CTA|line=Brown|previous=Clark/Lake|next=Randolph/Wabash|type=Kimball|oneway2=true}}
{{s-line new|system=CTA|line=Green|previous=Clark/Lake|next=Randolph/Wabash|type2=Both}}
{{s-line new|system=CTA|line=Orange|previous=Clark/Lake|next=Randolph/Wabash|oneway1=true|type2=Midway|rows1=3}}
{{s-line new|system=CTA|line=Purple|previous=Clark/Lake|next=Randolph/Wabash|oneway1=true|type2=Linden|hide1=true}}
{{s-line new|system=CTA|line=Pink|previous=Clark/Lake|next=Randolph/Wabash|oneway1=true|type2=54|hide1=true}}
{{s-end}}

Produces the box:

上一站 芝加哥地鐵 下一站
棕線
單向運營
綠線
單向運營
橙綫
紫綫
粉紅綫

Parallel Lines

For lines that operate on the same tracks and serve the same next station and final terminal, the rows1, rows2, hide1, and hide2 optional parameters can be used to have the Previous (the 1s) or Next (the 2s) Station boxes cover more than one line. The rows parameters specify how many lines the station should cover, while the hide parameters ensure that the table formatting remains intact. The two parameters must be used together, with hide specified for every line that is being covered by the first line. An example of this use can be seen in the above CTA box. Note that, in the above CTA example, the previous and oneway1 parameters could have been omitted from the Purple and Pink line entries, but were left in for consistency's sake.

Another example of this:

{{S-start}}
{{S-rail|title=LUL}}
{{S-line new|system=LUL|line=Circle|previous=Westbourne Park|next=Paddington|type2=Aldgate|rows1=2}}
{{S-line new|system=LUL|line=Hammersmith & City|previous=Westbourne Park|next=Paddington|hide1=yes}}
{{S-end}}

Produces:

上一站 倫敦地鐵 下一站
Template:LUL lines
Template:LUL lines

Transfers

The transfer parameter makes it possible to show within the box lines available at a different station with which there's a direct transfer from the current station. This snippet is taken from the article about the Finchley Road tube station. The North London Line does not actually serve the station itself, but there's an official out of system transfer designated between London Underground services at Finchley Road and London Overground services at the nearby Finchley Road & Frognal station:

{{s-start}}
{{s-rail|title=LUL}}
{{s-line new|system=LUL|line=Jubilee|previous=West Hampstead|next=Swiss Cottage|type2=one}}
{{s-line new|system=LUL|line=Metropolitan|previous=Wembley Park|next=Baker Street|type=Four|rowsmid=2|rows2=2}}
{{s-line new|system=LUL|line=Metropolitan|previous=Harrow-on-the-Hill|next=Finchley Road|type=Four|hidemid=yes|hide2=yes|note=Peak periods only}}
{{s-note|text=Out-of-system interchange}}
{{s-rail|title=LOG}}
{{s-line new|system=LOG|line=North London|previous=West Hampstead|next=Hampstead Heath|transfer=Finchley Road & Frognal}}
{{s-end}}

Produces:

上一站 倫敦地鐵 下一站
Template:LUL lines
Template:LUL lines
Peak periods only
    Out-of-system interchange    
上一站 倫敦地上鐵 下一站
Template:LOG lines

參見