Template:Election box

维基百科,自由的百科全书
跳转至: 导航搜索
Documentation icon 模板文档[查看] [编辑] [页面历史] [清除]

模板介紹[编辑]

These election box templates are for displaying a list of candidates and results for any election. They produce tables like this:

General Election 2005: Strangford
政黨 候選人 票數 % ±%
style="background-color: Template:Party meta/color/Labour Party (UK); width: 5px;" | [[Labour Party (UK)|Template:Party meta/shortname/Labour Party (UK)]] Tony Blair 9,999 50.0 +10.0
style="background-color: Template:Party meta/color/Conservative Party (UK); width: 5px;" | [[Conservative Party (UK)|Template:Party meta/shortname/Conservative Party (UK)]] Michael Howard 9,999 50.0 +10.0
多數票 9,999 50.0 +10.0
投票率 9,999 50.0 +10.0

使用方法[编辑]

基本[编辑]

整個模板由以下三部份構成:

The begin and end templates start and end a table with appropriate columns and formatting. The candidate template is used once for each candidate and contributes a row to the table.

When using this template please use the election box end template rather than simply inserting |} at the end of the election box. If you do place the |} it will be detected as an error by syntax-checking bots and will then be placed in the syntax cleanup project queue and will need to be fixed by someone. Having fixed a few hundred already, it is becoming somewhat repetitive.

For example:

 {{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}}
 

Will create this:

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

政黨連結[编辑]

See Template:Election box candidate with party link for usage and set-up.

Majority and turnout[编辑]

Two further templates:

can be added to record the majority and turnout figures for an election. (In this context, "majority" refers to the winning margin between the first and second placed candidates.)

For example:

 ...
 {{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}}
 

Will create this:

選舉結果
政黨 候選人 票數 % ±%
[[{{{政黨}}}|{{Template:Party meta/shortname/{{{政黨}}}}}]] {{{候選人}}} {{{票數}}} {{{百分比}}} {{{增減}}}
[[{{{政黨}}}|{{Template:Party meta/shortname/{{{政黨}}}}}]] {{{候選人}}} {{{票數}}} {{{百分比}}} {{{增減}}}
多數票 {{{票數}}} {{{百分比}}} {{{增減}}}
投票率 {{{票數}}} {{{百分比}}} {{{增減}}}

選舉結果[编辑]

Finally there are two templates:

that can be used to summarize the outcome of an election, in terms of whether the incumbent holds the seat or whether it is lost to another party.

For example:

 ...
 {{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}}
 

Will create this:

選舉結果
政黨 候選人 票數 % ±%
[[{{{政黨}}}|{{Template:Party meta/shortname/{{{政黨}}}}}]] {{{候選人}}} {{{票數}}} {{{百分比}}} {{{增減}}}
[[{{{政黨}}}|{{Template:Party meta/shortname/{{{政黨}}}}}]] {{{候選人}}} {{{票數}}} {{{百分比}}} {{{增減}}}
多數票 {{{票數}}} {{{百分比}}} {{{增減}}}
投票率 {{{票數}}} {{{百分比}}} {{{增減}}}
Labour Party (UK)勝出

or this...

Template:Election box gain with party link
選舉結果
政黨 候選人 票數 % ±%
[[{{{政黨}}}|{{Template:Party meta/shortname/{{{政黨}}}}}]] {{{候選人}}} {{{票數}}} {{{百分比}}} {{{增減}}}
[[{{{政黨}}}|{{Template:Party meta/shortname/{{{政黨}}}}}]] {{{候選人}}} {{{票數}}} {{{百分比}}} {{{增減}}}
多數票 {{{票數}}} {{{百分比}}} {{{增減}}}
投票率 {{{票數}}} {{{百分比}}} {{{增減}}}

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 的選舉。

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

模板结构[编辑]

实现方法[编辑]

编辑注意[编辑]