模板: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 的选举。