维基百科:格式手冊/表格

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

表格是以行和列呈現數據或信息的方法。 雖然在維基百科裡我們可以用表格來有效地表示不同種類的內容,但只應在適當的時候使用。在一個表格裡的信息,有時可以比以散文段落方式或以嵌入列表方式更好。

在編輯時,應避免指示到“條目左側”或“條目右側”的表格。由於表格的位置會因手機版本而略有分別,而且對於以其他輔助軟件閱讀維基百科的使用者來說,這種表示是沒有意義的。相反地,每個表格應以標題來讓使用者去識別。

格式[编辑]

It is recommended that Help:使用維基標記式語言增修表格/1 be used in place of HTML元素s, as they are easier to customize and maintain. A standard "wikitable style" is also available, by adding class="wikitable" to the top row of the table. The powerful and useful Help:表格 feature can be enabled by adding class="sortable" to the top row. Extreme caution should be applied if rowspan or colspan is used. It is also possible to combine class, as in class="wikitable sortable".

上標與欄位標[编辑]

Table captions英语Help:Table caption and column/row headings should be succinct and self-explanatory. In most cases, individual words or sentence fragment英语sentence fragments should be used, and 冠词s (a, an, the) are unnecessary. Only the first word in the caption or heading should be capitalized (except for proper noun英语proper nouns), in keeping with Wikipedia's conventions for capital letters. In some rare cases, judicious use of soft hyphen英语soft hyphens may be helpful; see MOS:HYPHEN for details.

外觀[编辑]

In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. This is because the site-wide CSS is more carefully tested to ensure compatibility with a wide range of browsers; it also creates a greater degree of professionalism by ensuring a consistent appearance between articles. Deviations from standard conventions are acceptable where they create a semantic distinction (for instance, the infoboxes and navigational templates英语Template:The Simpsons relating to 辛普森一家 use a yellow color-scheme instead of the customary mauve, to tie in with the dominant color in the series) but should not be used gratuitously.

See WP:Deviations and Wikipedia talk:Consensus/RfC英语Wikipedia talk:Consensus/RfC for guidance on use of coloring or non-standard formatting, and for when MoS and WikiProjects guidance is at variance.

Consideration may be given to collapsing英语Help:Collapsing tables which Wikipedia:格式手册.

Wikipedia tables are set flush-left, and allowed to grow rightward, not centered on the page.

親和力[编辑]

Screen readers and other web browsing tools make use of specific table tags to help users navigate the data contained within tables. Use the correct wikitable pipe syntax to take advantage of all the features available.

See Wikipedia:格式手冊/親和力 for information about restrained use of color in tables, to avoid creating accessibility problems for visually-impaired as well as normal vision readers.

Do not separate items by leaving blank lines between them, even when using unordered or definition lists. The Wikipedia list templates explicitly identify lists for readers, rather than relying on visual formatting to indirectly imply the presence of a list.

大小[编辑]

Splitting lists and tables per summary style is Wikipedia:条目长度. Among other problems, arbitrarily splitting a wikitable effectively disables the powerful and useful sorting feature from working across the entire table.

On the other hand, overloading tables with too much detailed statistical data is against policy. Careful thought should be given to how a reader would use a table, and what level of detail is appropriate.

適用性[编辑]

適當使用[编辑]

Tables are a way of presenting links, data, or information in rows and columns. They are a complex form of list, formatted into a systematic grid pattern. Tables might be useful for presenting mathematical data such as multiplication tables, comparative figures, or sporting results. They may also be useful for presenting equivalent words in two or more languages; for awards by type and year; complex discographies; etc.

The sortability of multiple columns in a table is a powerful tool that helps the reader to understand relationships and find patterns in large lists. The sortability of tables makes them very useful for "List of..." articles in Wikipedia, which are intended to give an overview of the subject area, and to allow easy comparisons among many similar items. Avoid cramming too much detailed information into individual table entries; if appropriate, the reader should be able to click a Wikilink to read a full, detailed article corresponding to a concise table entry.

Often a list is best left as a list. Before reformatting a list into table form, consider whether the information will be more clearly conveyed by virtue of having rows and columns. If so, then a table is probably a good choice. If there is no obvious benefit to having rows and columns, then a table is probably not the best choice.

Tables should not be misused to resolve visual layout problems. If the information you are editing is not tabular in nature, it probably does not belong in a table: Do not misuse tables for putting a caption under a photograph, arranging a group of links, or other strictly visual features. These practices make the article harder for other Wikipedians to edit, and is likely to cause problems when viewed on different display sizes and aspect ratios. Also, when compared with tables, wikimarkup is more flexible, easier to use, and less arcane when used correctly for desktop publishing layout, page elements, and page orientation and positioning.

Examples:

標準多欄排序表格[编辑]

賽事結果
Outcome No. Year Championship Opponent in the final Score Reference
Winner 1. 1981英语1981 World Snooker Championship 斯诺克世界锦标赛 威爾士 Doug Mountjoy 18–12 [1]
Winner 2. 1983 斯诺克世界锦标赛 (2) 加拿大 克里夫·桑本 18–6 [1]
Winner 3 1983 International Open 加拿大 克里夫·桑本 9–3 [2]
Winner 4. 1984 Classic英语Classic (snooker) 英格兰 Tony Meo英语Tony Meo 9–8 [3]
Winner 5. 1984 斯诺克世界锦标赛 (3) 英格兰 吉米·怀特 18–16 [1]
Winner 6. 1984 International Open (2) 英格兰 Tony Knowles英语Tony Knowles (snooker player) 9–2 [2]
Winner 7. 1984英语1984 UK Championship (snooker) UK Championship英语UK Championship (snooker) 北爱尔兰 Alex Higgins 16–8 [4]
Runner-up 1. 1985 斯诺克世界锦标赛 北爱尔兰 丹尼斯·泰勒 1985年斯诺克世界锦标赛决赛 [1]
Winner 8. 1985英语1985 Grand Prix (snooker) 斯诺克世界公开赛 北爱尔兰 丹尼斯·泰勒 10–9 [1]
Winner 9. 1985英语1985 UK Championship (snooker) UK Championship英语UK Championship (snooker) (2) 英格兰 Willie Thorne英语Willie Thorne 16–14 [4]

標準多欄表格含副欄位[编辑]

音樂作品
年份 標題 Peak chart positions 音乐唱片销售认证
加拿大
澳大利亚
奥地利
德国
荷兰
挪威
瑞典
瑞士
英國專輯排行榜
公告牌二百强专辑榜
北美洲
欧洲
1993 So Far So Good英语So Far So Good (Bryan Adams album)
  • Released: November 2, 1993
  • Label: A&M
2
[5]
1 1 1 1 1 1 1 1 6 CA: 6× Platinum
US: 5× Platinum
SW: 4× Platinum
UK: 3× Platinum
1999 The Best of Me英语The Best of Me (Bryan Adams album)
  • Released: November 15, 1999
  • Label: A&M
14 18 4 7 13 2 20 3 12 CA: 3× Platinum EU: 2× Platinum[6]
SW: Platinum
UK: Platinum
2005 Anthology英语Anthology (Bryan Adams album)
  • Released: October 18, 2005
  • Label: A&M
4 28 30 39 29 65 CA: 2× Platinum UK: Gold
2010 Icon英语Icon (Bryan Adams album)
"—" denotes releases that did not chart.

混用排序多欄表格[编辑]

電影作品
List of acting performances in film and television
Year Title Role Notes
1961 Barabbas英语Barabbas (1961 film) Patrician in Arena uncredited
1962 Hemingway's Adventures of a Young Man英语Hemingway's Adventures of a Young Man undetermined role uncredited
1963 Beverly Hillbillies, TheThe·Beverly Hillbillies Janet Trego TV series, 15 episodes
1963 Mister Ed英语Mister Ed
  • Telephone Operator
  • Sailor's Girl
  • TV series, episodes:
  • "Love Thy New Neighbor"
  • "Ed Discovers America"
1964 Americanization of Emily, TheThe·Americanization of Emily Beautiful Girl uncredited
1965 Man from U.N.C.L.E., TheThe·Man from U.N.C.L.E. Therapist TV series, episode: "The Girls of Nazarone Affair"
1966 Eye of the Devil英语Eye of the Devil Odile de Caray
1967 Fearless Vampire Killers, TheThe·Fearless Vampire Killers Sarah Shagal
1967 Don't Make Waves英语Don't Make Waves Malibu
1967 風月泣殘紅 Jennifer North
1968 魔鬼怪嬰 Girl at Party uncredited
1968 Wrecking Crew, TheThe·Wrecking Crew Freya Carlson
1969 Thirteen Chairs, TheThe·Thirteen Chairs
(also known as 12+1)
Pat released posthumously

多欄定序表格[编辑]

獎項
Year Award Title Result
第5屆奧斯卡金像獎 奥斯卡最佳影片奖 Arrowsmith英语Arrowsmith (film) 提名
第8届奥斯卡金像奖 奥斯卡最佳影片奖 The Informer英语The Informer (1935 film) 提名
第8届奥斯卡金像奖 奥斯卡最佳导演奖 The Informer英语The Informer (1935 film) 獲獎
第12届奥斯卡金像奖 奥斯卡最佳导演奖 驛馬車 (電影) 提名
第13届奥斯卡金像奖 奥斯卡最佳影片奖 The Long Voyage Home英语The Long Voyage Home 提名
第13届奥斯卡金像奖 奥斯卡最佳导演奖 The Grapes of Wrath 獲獎
第14届奥斯卡金像奖 奥斯卡最佳影片奖 翡翠谷 (電影) 獲獎
第14届奥斯卡金像奖 奥斯卡最佳导演奖 翡翠谷 (電影) 獲獎
第15届奥斯卡金像奖 奥斯卡最佳纪录片奖 中途岛海战 獲獎
第16届奥斯卡金像奖 奥斯卡最佳纪录短片奖 December 7th英语December 7th (film) 獲獎
1952 奥斯卡最佳影片奖 蓬門今始為君開 提名
1952 奥斯卡最佳导演奖 蓬門今始為君開 獲獎

多欄定序表格數字靠右[编辑]

數學表格
乘法運算表
× 1 2 3 4 5 6 7 8 9 10
1 1 2 3 4 5 6 7 8 9 10
2 2 4 6 8 10 12 14 16 18 20
3 3 6 9 12 15 18 21 24 27 30
4 4 8 12 16 20 24 28 32 36 40
5 5 10 15 20 25 30 35 40 45 50
6 6 12 18 24 30 36 42 48 54 60
7 7 14 21 28 35 42 49 56 63 70
8 8 16 24 32 40 48 56 64 72 80
9 9 18 27 36 45 54 63 72 81 90
10 10 20 30 40 50 60 70 80 90 100

樹狀圖(分支圖)左側起始[编辑]

進化分枝圖
 Crocodylinae 

"Crocodylus" megarhinus

 馬氏鱷亞科 

堪芭拉鳄属

Australosuchus英语Australosuchus

Trilophosuchus英语Trilophosuchus

 Osteolaeminae英语Osteolaeminae 

Rimasuchus英语Rimasuchus

"Crocodylus" pigotti

Euthecodon

Voay

侏儒鱷

侏儒鱷

Mecistops

Crocodylus anthropophagus英语Crocodylus anthropophagus

鱷屬

沼澤鱷

暹羅鱷

澳洲淡水鱷

新畿內亞鱷

菲律賓鱷

尼羅鱷

美洲鱷

奧利諾科鱷

古巴鱷

危地馬拉鱷

彩色甘特圖(水平條狀圖)[编辑]

Flow data

不當使用[编辑]

簡單條列[编辑]

如果表格內容很簡單,最好使用維基標準條列格式以取代表格。條列格式比表格更容易維護,通常也比較容易閱讀。

以下是一個條列範例,其格式為:

* 1980: Ultra Wave
* 1988: What's Bootsy Doin'?
* 1994: Blasters of the Universe
* 1994: Fresh Outta 'P' Uni

這樣會顯示為:

  • 1980: Ultra Wave
  • 1988: What's Bootsy Doin'?
  • 1994: Blasters of the Universe
  • 1994: Fresh Outta 'P' Uni

若使用表格格式:

{| class="wikitable"
|1980
|Ultra Wave
|-
|1988
|What's Bootsy Doin'?
|-
|1994
|Blasters of the Universe
|-
|1994
|Fresh Outta 'P' Uni
|}

其顯示為:

1980 Ultra Wave
1988 What's Bootsy Doin'?
1994 Blasters of the Universe
1994 Fresh Outta 'P' Uni

散文體[编辑]

Prose is preferred in articles as prose allows the presentation of detail and clarification of context, in a way that a table may not. Prose flows, like one person speaking to another, and is best suited to articles, because their purpose is to explain. Tables which are mainly Wikipedia:格式手册/链接, which are most useful for browsing subject areas, should usually have their own entries: see Wikipedia:独立列表 for detail. In an article, significant items should normally be mentioned naturally within the text rather than merely tabulated.

頁面佈局[编辑]

Page layouts (using multiple columns, positioning elements, adding borders, etc.) should be done via 层叠样式表, not tables, whenever possible.

參見[编辑]

參考資料[编辑]

  1. ^ 1.0 1.1 1.2 1.3 1.4 Turner, Chris. World Professional Championship. cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. [18 March 2011]. 
  2. ^ 2.0 2.1 Turner, Chris. International Open Goya, Matchroom Trophy. cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. [18 March 2011]. 
  3. ^ Turner, Chris. Classic. cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. [18 March 2011]. 
  4. ^ 4.0 4.1 Turner, Chris. UK Championship. cajt.pwp.blueyonder.co.uk. Chris Turner's Snooker Archive. [18 March 2011]. 
  5. ^ Top Albums/CDs – Volume 58, No. 25. RPM (加拿大国家图书馆暨档案馆). January 10, 1994 [August 15, 2010]. 
  6. ^ IFPI Platinum Europe Awards: 2002 Awards. 國際唱片業協會. [August 15, 2010].