模板:Tree list/end
外觀
本模板使用以下模板樣式: |
此模板適用於呈現樹狀資料,且允許在資訊中引用條目連結。可用於顯示家譜、王位繼承、演化樹等資訊。其組成模板包含:
- {{Tree list}}
- {{Tree list/end}}
- {{Tree list/branching}}
語法
[編輯]宣告模板的開始與結束
[編輯]{{Tree list}} 與 {{Tree list/end}} 分別宣告樹狀圖繪製的起點與結束,生成樹狀圖的內容資料必須位於這兩個標籤之間。內容的資料格式是一組由星號 * 組成的槽狀清單。
{{Tree list}}
* 前綴一個或多個星號的樹狀圖內容。
{{Tree list/end}}
建立分支
[編輯]使用巢狀列表建立每個樹狀圖的分支:
{{Tree list}}
* 第一層級分支
** 第二層級分支
*** 第三層級分支
{{Tree list/end}}
結果:
- 第一層級分支
- 第二層級分支
- 第三層級分支
- 第二層級分支
跨階層分支 Unlabelled branches
[編輯]某些樹狀圖資料有跨階層的需求,可將 {{Tree list/branching}} 標籤置於不需顯示階層資料(unlabelled)的結點,達成排版目的。例如第一階層旗下有部份資料直屬於第三階層,此時可將 {{Tree list/branching}} 至於第二階層,在排版上形成跨階層分支。
{{Tree list}}
* 第一層級分支
** {{Tree list/branching}}
*** 第三層級分支
*** 另一個第三層級分支
*** 最後一個第三層級分支
** 第二層級分支
** {{Tree list/branching}} <!--- 此分支將終結上行的第二層級,並指引下一行的第三層級直接從第一層級分支至此 --->
*** 第三層級分支
*** 最後一個第三層級分支
{{Tree list/end}}
結果:
- 第一層級分支
-
- 第三層級分支
- 另一個第三層級分支
- 最後一個第三層級分支
- 第二層級分支
-
- 第三層級分支
- 最後一個第三層級分支
-
折疊模式
[編輯]折疊模式可協助版面過長的樹狀圖折疊收起,使畫面簡潔。使用方式為:在{{Tree list}}
之前新增模組 {{Hidden begin}}
,在 {{Tree list/end}}
之後新增 {{Hidden end}}
。預設狀態的折疊模式只有一個「展開」按鈕在右邊,但在下方諸多範例中,引用了多個參數完善使用者體驗,參數們詳列如下:
|border=1px #aaa solid — a solid border around the tree
|title=Demonstration tree — a suitable name for the tree
|ta1=center – center the title= name
{{hidden begin|border=1px #aaa solid|title=Demonstration tree|ta1=center}}
{{Tree list}}
* 第一層級分支
** {{Tree list/branching}}
*** 第三層級分支
*** 另一個第三層級分支
*** 最後一個第三層級分支
** 第二層級分支
** {{Tree list/branching}} <!--- 此分支將終結上行的第二層級,並指引下一行的第三層級直接從第一層級分支至此 --->
*** 第三層級分支
*** 最後一個第三層級分支
{{Tree list/end}}
{{hidden end}}
Demonstration tree
- 第一層級分支
-
- 第三層級分支
- 另一個第三層級分支
- 最後一個第三層級分支
- 第二層級分支
-
- 第三層級分支
- 最後一個第三層級分支
-
樹狀圖預設為折疊收起的狀態。若將參數 |expanded=on
加入 {{hidden begin}}
則可將樹狀圖預設為展開狀態。
範例
[編輯]家族樹
[編輯]原始碼:
{{hidden begin|border=1px #aaa solid|title=A family tree (descendants of Henry VII of England)|ta1=center|expanded=on}}
{{Tree list}}
*[[Image:Simple gold crown.svg|15px]] '''(1)''' [[Henry VII of England|Henry VII]] (1457–1509)
**[[Arthur, Prince of Wales]] (1486–1502)
**[[Margaret Tudor|Margaret, Queen of Scots]] (1489–1541)
***[[James, Duke of Rothesay]] (1507–1508)
***[[Arthur, Duke of Rothesay]] (1509–1510)
***[[Image:Simple silver crown.svg|15px]] [[James V of Scotland]] (1512–1542)
****[[Image:Simple silver crown.svg|15px]] [[Mary, Queen of Scots]] (1542–1587)
*****[[Image:Simple silver crown.svg|15px]] [[Image:Simple gold crown.svg|15px]] '''(7)''' [[James VI and I|James VI of Scotland and I of England]] (1566–1625)
******''From whom succeeding English, Scottish and British monarchs are descended.''
***[[Alexander Stewart, Duke of Ross]] (1514–1515)
***[[Margaret Douglas|Margaret Douglas, Countess of Lennox]] (1515–1578)
**[[Image:Simple gold crown.svg|15px]] '''(2)''' [[Henry VIII of England]] (1491–1547)
***[[Henry, Duke of Cornwall]] (1511–1511)
***[[Image:Simple gold crown.svg|15px]] '''(5)''' [[Mary I of England]] (1516–1558)
***[[Image:Simple gold crown.svg|15px]] '''(6)''' [[Elizabeth I of England]] (1533–1603)
***[[Image:Simple gold crown.svg|15px]] '''(3)''' [[Edward VI of England]]
**[[Elizabeth Tudor (daughter of Henry VII)|Elizabeth Tudor]] (1492–1495)
**[[Mary Tudor (queen consort of France)|Mary, Queen of France]] (1496–1533)
***Henry Brandon (1516–1522)
***[[Frances Grey, Duchess of Suffolk]] (1517–1547)
****[[Image:Simple gold crown.svg|15px]] '''(4)''' [[Lady Jane Grey]] (1536–1553)
****[[Lady Catherine Grey|Catherine Seymour, Countess of Hertford]] (1540–1568)
****[[Lady Mary Grey|Lady Mary Keyes]] (1545–1578)
****Elizabeth Stokes (1555–1556)
***[[Eleanor Clifford, Countess of Cumberland]] (1519–1547)
****''From whom are descended the [[Earl of Derby|Earls of Derby]]''
***[[Henry Brandon, 1st Earl of Lincoln]] (1523–1534)
**[[Edmund Tudor, Duke of Somerset]] (1499–1500)
**[[Katherine Tudor (1503)|Katherine Tudor]] (1503–1503)
{{Tree list/end}}
{{hidden end}}
結果:
A family tree (descendants of Henry VII of England)
- (1) Henry VII (1457–1509)
- Arthur, Prince of Wales (1486–1502)
- Margaret, Queen of Scots (1489–1541)
- James, Duke of Rothesay (1507–1508)
- Arthur, Duke of Rothesay (1509–1510)
- James V of Scotland (1512–1542)
- Mary, Queen of Scots (1542–1587)
- (7) James VI of Scotland and I of England (1566–1625)
- From whom succeeding English, Scottish and British monarchs are descended.
- (7) James VI of Scotland and I of England (1566–1625)
- Mary, Queen of Scots (1542–1587)
- Alexander Stewart, Duke of Ross (1514–1515)
- Margaret Douglas, Countess of Lennox (1515–1578)
- (2) Henry VIII of England (1491–1547)
- Henry, Duke of Cornwall (1511–1511)
- (5) Mary I of England (1516–1558)
- (6) Elizabeth I of England (1533–1603)
- (3) Edward VI of England
- Elizabeth Tudor (1492–1495)
- Mary, Queen of France (1496–1533)
- Henry Brandon (1516–1522)
- Frances Grey, Duchess of Suffolk (1517–1547)
- (4) Lady Jane Grey (1536–1553)
- Catherine Seymour, Countess of Hertford (1540–1568)
- Lady Mary Keyes (1545–1578)
- Elizabeth Stokes (1555–1556)
- Eleanor Clifford, Countess of Cumberland (1519–1547)
- From whom are descended the Earls of Derby
- Henry Brandon, 1st Earl of Lincoln (1523–1534)
- Edmund Tudor, Duke of Somerset (1499–1500)
- Katherine Tudor (1503–1503)
血統表 ancestry tree
[編輯]樹狀圖模板亦可用於顯示血統表,但小於六代以下的血統表,通常推薦使用專為此類用途客製的模板 {{Ahnentafel}} (詳見 Template:Ahnentafel/doc ),資訊表達將更加清晰。另一種模板 {{Ahnentafel-tree}} 便是以此為基礎,但更方便組織繪製樹狀圖。
{{hidden begin|border=1px #aaa solid|title=Ancestry tree of Prince William, Duke of Cambridge|ta1=center|expanded=on}}
{{Tree list}}
*1. '''[[William, Prince of Wales]]''' (born 21 June 1982)
**2. [[Charles III|Charles III of the United Kingdom]] (born 14 November 1948)
***4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]] (10 June 1921 – 9 April 2021)
****8. [[Prince Andrew of Greece and Denmark]] (20 January 1882 – 3 December 1944)
****9. [[Princess Alice of Battenberg]] (25 February 1885 – 5 December 1969)
***5. [[Elizabeth II|Elizabeth II of the United Kingdom]] (21 April 1926 – 8 September 2022)
****10. [[George VI|George VI of the United Kingdom]] (14 December 1895 – 6 February 1952)
****11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]] (4 August 1900 – 30 March 2002)
**3. [[Diana, Princess of Wales|Lady Diana Spencer]] (1 July 1961 – 31 August 1997)
***6. [[John Spencer, 8th Earl Spencer]] (21 April 1926 – 29 March 1992)
****12. [[Albert Spencer, 7th Earl Spencer]] (23 May 1892 – 9 June 1975)
****13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]] (16 August 1897 – 4 December 1972)
***7. [[Frances Shand Kydd|The Honourable Frances Roche]] (20 January 1936 – 3 June 2004)
****14. [[Maurice Roche, 4th Baron Fermoy]] (15 May 1885 – 8 July 1955)
****15. [[Ruth Roche, Baroness Fermoy|Ruth Gill]] (2 October 1908 – 6 July 1993)
{{Tree list/end}}
{{hidden end}}
演化樹
[編輯]{{hidden begin|border=1px #aaa solid|title=A cladogram|ta1=center|expanded=on}}
{{Tree list}}
*[[四足類|Tetrapoda]]
** {{Tree list/branching}}
*** Many extinct groups such as the ''[[Eucritta]]''
*** '''[[Lissamphibia]]''' Whose ancestors of the current amphibians
** {{Tree list/branching}}
*** Many extinct groups reminiscent of amphibians with more or less pronounced reptilian characteristics such as [[始爬螈屬|Eoherpetontidae]], the [[Embolomeri]], the [[Tokosauridae]], [[Chroniosuchidae]], [[Gephyrostegidae]], [[Solenodonsauridae]], [[Seymouriamorpha]], [[Westlothiana]], [[殼椎亞綱|Lepospondyli]]
*** [[大鼻龍目|Cotylosauria]]
**** [[羊膜動物|Amniota]], Originally all "Reptilian"
**** Other extinct sibling taxa like [[Diadectomorpha]] or [[Tseajaiidae]] are close enough to reptiles
{{Tree list/end}}
{{hidden end}}
結果:
A cladogram
- Tetrapoda
-
- Many extinct groups such as the Eucritta
- Lissamphibia Whose ancestors of the current amphibians
-
- Many extinct groups reminiscent of amphibians with more or less pronounced reptilian characteristics such as Eoherpetontidae, the Embolomeri, the Tokosauridae, Chroniosuchidae, Gephyrostegidae, Solenodonsauridae, Seymouriamorpha, Westlothiana, Lepospondyli
- Cotylosauria
- Amniota, Originally all "Reptilian"
- Other extinct sibling taxa like Diadectomorpha or Tseajaiidae are close enough to reptiles
-
另見
[編輯]- Wikipedia:Family trees
{{Tree chart}}
— 可繪製以橫排為同階層的樹狀圖,以資料方框加上線段表示樹狀資料。{{Ahnentafel}}
— 此模組將家譜資料以Ahnentafel數據的形式,轉換為血統樹結構圖{{ahnentafel-tree}}
— 採用{{Tree list}}
顯示方式,但資料輸入型態雷同{{Ahnentafel}}
,可幫助撰寫者處理最多九代分支(即511個地點)。此樹狀圖最少必須顯示第一階層。