模板:Election box/doc
外觀
![]() | 此頁面是Template:Election box的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
模板介紹
[編輯]本模板用於展示一場選舉中的候選人和選舉結果,其效果如下:
政黨 | 候選人 | 票數 | % | ± | |
---|---|---|---|---|---|
工黨 | Tony Blair | 9,999 | 50.0 | +10.0 | |
保守黨 | Michael Howard | 9,999 | 50.0 | +10.0 | |
多數票 | 9,999 | 50.0 | +10.0 | ||
投票率 | 9,999 | 50.0 | +10.0 |
使用方法
[編輯]基本
[編輯]整個模板由以下三部份構成:
- {{Election box begin}}
- {{Election box candidate}}
- {{Election box end}}
begin及end兩個部分分別用於開啟和結束本模板,而candidate部分則用於展示其中一位候選人的資料及在表格中構建一個新橫行。有多少個候選人,就需要多少個candidate部分。
使用此模板時,請務必使用election box end部分,若此部分被|}代替,將產生需要人手修正的錯誤,帶來麻煩。
舉個例子:
{{Election box begin |名稱=[[United Kingdom general election, 2005|General Election 2005]]: Strangford}} {{Election box candidate |政黨 = Labour Party (UK) |候選人 = Tony Blair |票數 = 9,999 |百分比 = 50.0 |增減 = +10.0 }} {{Election box candidate |政黨 = Conservative Party (UK) |候選人 = Michael Howard |票數 = 9,999 |百分比 = 50.0 |增減 = +10.0 }} {{Election box end}}
將產生以下效果:
政黨 | 候選人 | 票數 | % | ± | |
---|---|---|---|---|---|
Labour Party (UK) | Tony Blair | 9,999 | 50.0 | +10.0 | |
Conservative Party (UK) | Michael Howard | 9,999 | 50.0 | +10.0 |
政黨連結
[編輯]請參見Template:Election box candidate with party link。
多數票及投票率
[編輯]以下是兩個進階模板:
上述兩個模板分別用於展示一場選舉中的多數票及投票率。(多數票在此表示得票第一高與第二高的候選人之間的得票差距)。
舉個例子:
... {{Election box majority |votes = 9,999 |percentage = 50.0 |change = +10.0 }} {{Election box turnout |votes = 9,999 |percentage = 50.0 |change = +10.0 }} {{Election box end}}
將產生以下效果:
政黨 | 候選人 | 票數 | % | ± | |
---|---|---|---|---|---|
工黨 | Tony Blair | 9,999 | 50.0 | +10.0 | |
保守黨 | Michael Howard | 9,999 | 50.0 | +10.0 | |
多數票 | 9,999 | 50.0 | +10.0 | ||
投票率 | 9,999 | 50.0 | +10.0 |
選舉結果
[編輯]還有兩個模板:
上述模板用於總結選舉結果,指出現任議員是否連任成功。
舉個例子:
... {{Election box hold with party link |winner = Labour Party (UK) |swing = +10.0 }} or... {{Election box gain with party link |winner = Conservative Party (UK) |loser = Labour Party (UK) |swing = +10.0 }} {{Election box end}}
將產生以下效果:
政黨 | 候選人 | 票數 | % | ± | |
---|---|---|---|---|---|
工黨 | Tony Blair | 9,999 | 50.0 | +10.0 | |
保守黨 | Michael Howard | 9,999 | 50.0 | +10.0 | |
多數票 | 9,999 | 50.0 | +10.0 | ||
投票率 | 9,999 | 50.0 | +10.0 | ||
Labour維持 | 與上次選舉得票率之差 | +10.0 |
另一個例子:
政黨 | 候選人 | 票數 | % | ± | |
---|---|---|---|---|---|
工黨 | Tony Blair | 9,999 | 50.0 | +10.0 | |
保守黨 | Michael Howard | 9,999 | 50.0 | +10.0 | |
多數票 | 9,999 | 50.0 | +10.0 | ||
投票率 | 9,999 | 50.0 | +10.0 | ||
Conservative擊敗Labour | 與上次選舉得票率之差 | +10.0 |
Notes:
- The swing parameter represents Peter Snow's Swingometer measure, ie the percentage change (or swing) in the vote since the last election.
- When preparing the tables in advance of an election, it may be convenient to include these two templates but commented out (using
<!-- and -->
) until the outcome is known. - Potentially there is a need for versions of these templates that do not have the party link mechanism. However, it can be argued that any party that has a successful candidate deserves an article about them and the full /meta/color treatment. The one obvious exception to this is, of course, independent candidates, who won't actually have a party. If / when there's a need, just create a non party link version of these templates.
範例
[編輯]注意事項
[編輯]List of templates
[編輯]Template:List of Election Box Templates
Blanks by country
[編輯]Extensions
[編輯]- Template:Election FPTP begin As 1, but includes an additional column for expenditures. Example
- Template:Election box begin for list As 1, but better suited to list-based multi-member constituencies. Example
- Template:Election box candidate for alliance As 3, with an additional "side" party. Example
參見
[編輯]- {{Compact election box}}:一個比較緊緻的信息框模板,適用於 first-past-the-post 的選舉。