模板:Election box/doc
外观
| 此页面是Template:Election box的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
模板介绍
[编辑]本模板用于展示一场选举中的候选人和选举结果,其效果如下:
| 政党 | 候选人 | 票数 | % | ± | |
|---|---|---|---|---|---|
| 工党 | 妙丽·格兰杰 | 72,639 | 54.1 | +5.2 | |
| 保守党 | 威利·旺卡 | 61,734 | 45.9 | -1.5 | |
| 多数票 | 10,905 | 8.1 | +6.7 | ||
| 投票率 | 134,373 | 61.0 | +13.4 | ||
使用方法
[编辑]基本
[编辑]整个模板由以下三部分构成:
- {{Election box begin}}
- {{Election box candidate}}
- {{Election box end}}
begin及end两个部分分别用于开启和结束本模板,而candidate部分则用于展示其中一位候选人的资料及在表格中构建一个新横行。有多少个候选人,就需要多少个candidate部分。
使用此模板时,请务必使用election box end部分,若此部分被|}代替,将产生需要人手修正的错误,带来麻烦。
举个例子:
{{Election box begin
|名稱=[[2024年英國大選]]: 蘇威英選區}}
{{Election box candidate
|政黨 = 工黨
|候選人 = [[妙麗·格蘭傑]]
|票數 = 72,639
|百分比 = 54.1
|增減 = +5.2
}}
{{Election box candidate
|政黨 = 保守黨
|候選人 = [[威利·旺卡]]
|票數 = 61,734
|百分比 = 45.9
|增減 = -1.5
}}
{{Election box end}}
将产生以下效果:
| 政党 | 候选人 | 票数 | % | ± | |
|---|---|---|---|---|---|
| 工党 | 妙丽·格兰杰 | 72,639 | 54.1 | +5.2 | |
| 保守党 | 威利·旺卡 | 61,734 | 45.9 | -1.5 | |
政党连结
[编辑]请参见Template:Election box candidate with party link。
多数票及投票率
[编辑]以下是两个进阶模板:
上述两个模板分别用于展示一场选举中的多数票及投票率。(多数票在此表示得票第一高与第二高的候选人之间的得票差距)。
举个例子:
...
{{Election box majority
|票數 = 10,905
|百分比 = 8.1
|增減 = +6.7
}}
{{Election box turnout
|票數 = 134,373
|百分比 = 61.0
|增減 = +13.4
}}
{{Election box end}}
将产生以下效果:
| 政党 | 候选人 | 票数 | % | ± | |
|---|---|---|---|---|---|
| 工党 | 妙丽·格兰杰 | 72,639 | 54.1 | +5.2 | |
| 保守党 | 威利·旺卡 | 61,734 | 45.9 | -1.5 | |
| 多数票 | 10,905 | 8.1 | +6.7 | ||
| 投票率 | 134,373 | 61.0 | +13.4 | ||
选举结果
[编辑]还有两个模板:
上述模板用于总结选举结果,指出现任议员是否连任成功。
举个例子:
...
{{Election box hold with party link
|winner = 英國工黨
|swing = +6.7
}}
or...
{{Election box gain with party link
|winner = 英國工黨
|loser = 英國保守黨
|swing = +6.7
}}
{{Election box end}}
将产生以下效果:
| 政党 | 候选人 | 票数 | % | ± | |
|---|---|---|---|---|---|
| 工党 | 妙丽·格兰杰 | 72,639 | 54.1 | +5.2 | |
| 保守党 | 威利·旺卡 | 61,734 | 45.9 | -1.5 | |
| 多数票 | 10,905 | 8.1 | +6.7 | ||
| 投票率 | 134,373 | 61.0 | +13.4 | ||
| 工党维持 | 与上次选举得票率之差 | +6.7 | |||
另一个例子:
| 政党 | 候选人 | 票数 | % | ± | |
|---|---|---|---|---|---|
| 工党 | 妙丽·格兰杰 | 72,639 | 54.1 | +5.2 | |
| 保守党 | 威利·旺卡 | 61,734 | 45.9 | -1.5 | |
| 多数票 | 10,905 | 8.1 | +6.7 | ||
| 投票率 | 134,373 | 61.0 | +13.4 | ||
| 工党击败保守党 | 与上次选举得票率之差 | +6.7 | |||
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 的选举。