模板:Election box/doc

维基百科,自由的百科全书

模板介绍[编辑]

本模板用于展示一场选举中的候选人和选举结果,其效果如下:

General Election 2005: Strangford选举结果
政党 候选人 票数 % ±
工党 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

使用方法[编辑]

基本[编辑]

整个模板由以下三部分构成:

beginend两个部分分别用于开启和结束本模板,而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}}
 

将产生以下效果:

General Election 2005: Strangford选举结果
政党 候选人 票数 % ±
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}}
 

将产生以下效果:

General Election 2005: Strangford选举结果
政党 候选人 票数 % ±
工党 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}}
 

将产生以下效果:

General Election 2005: Strangford选举结果
政党 候选人 票数 % ±
工党 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

另一个例子:

General Election 2005: Strangford选举结果
政党 候选人 票数 % ±
工党 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[编辑]

参见[编辑]

  • {{Compact election box}}:一个比较紧致的信息框模板,适用于 first-past-the-post 的选举。

给模板编辑者的说明[编辑]

模板结构[编辑]

实现方法[编辑]

编辑注意[编辑]