Help:Family trees: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit
→‎Tree chart template: too many brackets
 
(23 intermediate revisions by 15 users not shown)
Line 1:
{{Wikipedia how to|shortcut1=H:FT}}
 
This page aims to assist Wikipedians working with biographical articles containing [[family tree]]s.
Line 5:
The most common way is to display a family tree on Wikipedia is as an [[ahnentafel]] by [[Template: Ahnentafel]]. However, there are other options.
 
This page originated in examples taken from a discussion on the [[Wikipedia:Village pump|Village pump]] in March/April 2005 (see [[Wikipedia talk:Family trees|Talk page]]). It has since been updated to use later created templates.
 
== Ahnentafel ==
Line 11:
The simplest way to include a list of ancestors is the [[Ahnentafel]]. This is a standard for genealogists, but it is hard to understand for people who have not seen it before.
 
# [[Prince William, DukePrince of CambridgeWales]] (born 21 June 1982)
# [[Charles, Prince of WalesIII]] (born 14 November 1948)
# [[Diana, Princess of Wales]] née Lady Diana Spencer (1 July 1961 – 31 August 1997)
# [[Prince Philip, Duke of Edinburgh]] (born 10 June 1921 – 9 April 2021)
# [[Elizabeth II]] (born 21 April 1926 – 8 September 2022)
# [[John Spencer, 8th Earl Spencer]] (24 January 1924 – 29 March 1992)
# [[Frances Shand Kydd|The Hon Mrs Shand Kydd]] née The Hon Frances Roche (20 January 1936 – 3 June 2004)
Line 22:
Ahnentafels can be displayed as horizontal trees using [[Template:Ahnentafel]]:
 
<syntaxhighlight lang="wikitext">
<pre>
{{ahnentafel
|collapsed=yes |align=center
|title=Ancestry of Prince William, DukePrince of CambridgeWales
|boxstyle_1=background-color: #fcc;
|boxstyle_2=background-color: #fb9;
|boxstyle_3=background-color: #ffc;
|boxstyle_4=background-color: #bfc;
|1. '''[[Prince William, DukePrince of CambridgeWales]]'''
|2. [[Charles, PrinceIII|Charles III of Walesthe United Kingdom]]
|3. [[Diana, Princess of Wales|Lady Diana Spencer]]
|4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]]
Line 45:
|14. [[Maurice Roche, 4th Baron Fermoy]]
|15. [[Ruth Roche, Baroness Fermoy|Ruth Gill]]
}}</presyntaxhighlight>
 
{{ahnentafel
|collapsed=no |align=center
|title=Ancestry of Prince William, DukePrince of CambridgeWales
|boxstyle_1=background-color: #fcc;
|boxstyle_2=background-color: #fb9;
|boxstyle_3=background-color: #ffc;
|boxstyle_4=background-color: #bfc;
|1. '''[[Prince William, DukePrince of CambridgeWales]]'''
|2. [[Charles, PrinceIII|Charles III of Walesthe United Kingdom]]
|3. [[Diana, Princess of Wales|Lady Diana Spencer]]
|4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]]
Line 73:
Ancestry trees are usually displayed collapsed; to display them expanded add the parameter: <code>|collapsed=no</code> to {{tlx|ahnentafel}}
 
== ChartTree chart template ==
{{Main|Template:ChartTree chart}}
[[Template:ChartTree chart]] can be used to construct simple (or incredibly complex: see [[Japanese imperial family tree]]) using an ASCII art-like syntax:
 
<syntaxhighlight lang="wikitext">
<pre>{{chartChart top|My family tree}}
{{chart/start|align=center}}
{{Tree chart/start|align=center}}
{{Tree chart| | | | GRM |~|y|~| GRP | | GRM=Grandma|GRP=Grandpa}}
{{Tree chart| | | | | | | |)|-|-|-|.| }}
{{Tree chart| | | MUM |y| DAD | |DAISY| MUM=Mum|DAD=Dad|DAISY=Aunt Daisy}}
{{Tree chart| |,|-|-|-|+|-|-|-|.| | | }}
{{Tree chart| JOE | | ME | | SIS | | | JOE=My brother Joe|ME='''Me!'''|SIS=My little sister}}
|boxstyle_ ME=background-color: #bfc;}}
{{Tree chart/end}}
{{chart bottom}}</pre>
</syntaxhighlight>
 
{{chartChart top|My family tree|collapsed=no}}
{{Tree chart/start|align=center}}
{{Tree chart| | | | GRM |~|y|~| GRP | | GRM=Grandma|GRP=Grandpa}}
{{Tree chart| | | | | | | |)|-|-|-|.| }}
{{Tree chart| | | MUM |y| DAD | |DAISY| MUM=Mum|DAD=Dad|DAISY=Aunt Daisy}}
{{Tree chart| |,|-|-|-|+|-|-|-|.| | | }}
{{Tree chart| JOE | | ME | | SIS | | | JOE=My brother Joe|ME='''Me!'''|SIS=My little sister
|boxstyle_ ME=background-color: #bfc;}}
{{Tree chart/end}}
{{chartChart bottom}}
 
{{tlx|ChartTree chart}} can also be used to create a Continental European style bottom to top layout for an [[Ahnentafel]] tree, or just as easily a top down (not shown)
<sourcesyntaxhighlight lang="moinwikitext">
{{chartChart top|width=100%|European style family tree bottom to top (Prince William, DukePrince of CambridgeWales)}}
{{Tree chart/start|align=center}}
{{Tree chart| |boxstyle=background-color: #bfc|Ah8|v|Ah9| |Ah10|v|Ah11| | | |Ah12|v|Ah13| | |Ah14|v|Ah15|
|Ah8=8. [[Prince Andrew of Greece and Denmark]] |Ah9=9. [[Princess Alice of Battenberg]]
|Ah10=10. [[George VI|George VI of the United Kingdom]] |Ah11=11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]]
|Ah12=12. [[Albert Spencer, 7th Earl Spencer]] |Ah13=13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]]
|Ah14=14. [[Maurice Roche, 4th Baron Fermoy]] |Ah15=15. [[Ruth Roche, Baroness Fermoy|Ruth Gill]]}}
{{chart| | | | |!| | | | | | | |!| | | | | | | | | |!| | | | | | | | |!}}
{{Tree chart|boxstyle=background-color: #ffc;| | | |Ah4|-|-|v|-|-|Ah5| | | | | | | |Ah6|-|-|-|v|-|-|Ah7
|Ah4=4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]] |Ah5=5. [[Elizabeth II|Elizabeth II of the United Kingdom]]
|Ah6=6. [[John Spencer, 8th Earl Spencer]] |Ah7=7. [[Frances Shand Kydd|The Honourable Frances Roche]]
}}
{{Tree chart| | | | | | | | |!| | | | | | | | | | | | | | | | | | |!}}
{{Tree chart|boxstyle=background-color: #fb9;| | | | | | | |Ah2|-|-|-|-|-|-|-|v|-|-|-|-|-|-|-|-|Ah3
|Ah2=2. [[Charles, PrinceIII|Charles III of Walesthe United Kingdom]]|Ah3=3. [[Diana, Princess of Wales|Lady Diana Spencer]]}}
{{Tree chart| | | | | | | | | | | | | | | | | |!}}
{{Tree chart|boxstyle=background-color: #fcc;| | | | | | | | | | | | | | | | |Ah1 |Ah1=1.'''[[Prince William, DukePrince of CambridgeWales]]'''}}
{{Tree chart/end}}
{{chartChart bottom}}
</syntaxhighlight>
</source>
 
Note: any letter number combination that is not reserved as a tile descriptor in {{tlx|Tree chart}} can be used. In this example Ah1...Ah15 is short for Ahnentafel1...Ahnentafel15
 
 
{{chartChart top|width=100%|European style family tree bottom to top (Prince William, DukePrince of CambridgeWales)|collapsed=no}}
{{Tree chart/start|align=center}}
{{Tree chart||boxstyle=background-color: #bfc|Ah8|v|Ah9| |Ah10|v|Ah11| || |Ah12|v|Ah13| ||Ah14|v|Ah15|
|Ah8=8. [[Prince Andrew of Greece and Denmark]] |Ah9=9. [[Princess Alice of Battenberg]]
|Ah10=10. [[George VI|George VI of the United Kingdom]] |Ah11=11. [[Queen Elizabeth The Queen Mother|Lady Elizabeth Bowes-Lyon]]
|Ah12=12. [[Albert Spencer, 7th Earl Spencer]] |Ah13=13. [[Cynthia Spencer, Countess Spencer|Lady Cynthia Hamilton]]
|Ah14=14. [[Maurice Roche, 4th Baron Fermoy]] |Ah15=15. [[Ruth Roche, Baroness Fermoy|Ruth Gill]]}}
{{Tree chart| | | | |!| | | | | | | |!| | | | | | | | | |!| | | | | | | | |!}}
{{Tree chart|boxstyle=background-color: #ffc;| | | |Ah4|-|-|v|-|-|Ah5| | | | | | | |Ah6|-|-|-|v|-|-|Ah7
|Ah4=4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]] |Ah5=5. [[Elizabeth II|Elizabeth II of the United Kingdom]]
|Ah6=6. [[John Spencer, 8th Earl Spencer]] |Ah7=7. [[Frances Shand Kydd|The Honourable Frances Roche]]
}}
{{Tree chart| | | | | | | | |!| | | | | | | | | | | | | | | | | | |!}}
{{Tree chart|boxstyle=background-color: #fb9;| | | | | | | |Ah2|-|-|-|-|-|-|-|v|-|-|-|-|-|-|-|-|Ah3
|Ah2=2. [[Charles, PrinceIII|Charles III of Walesthe United Kingdom]]|Ah3=3. [[Diana, Princess of Wales|Lady Diana Spencer]]}}
{{Tree chart| | | | | | | | | | | | | | | | | |!}}
{{Tree chart|boxstyle=background-color: #fcc;| | | | | | | | | | | | | | | | |Ah1 |Ah1=1.'''[[Prince William, DukePrince of CambridgeWales]]'''}}
{{Tree chart/end}}
{{chartChart bottom}}
 
Trees using {{tlx|Tree chart}} are usually displayed collapsed to alter that so they display expanded add the parameter: <code>|collapsed=no</code> to {{tlx|chartChart top}}
 
'''Note:''' [[Template:Familytree]] has been deprecated in favor of [[Template:Chart]], which has more features.
 
=== Ahnentafel-chart ===
A similar use of {{tlx|Tree chart}} can be used to construct a top down tree, but there is a template ({{tlx|Ahnentafel-chart}}) that can be used to display bottom-up or top-down family trees using {{tlx|Tree chart}} that is simpler to construct:
<sourcesyntaxhighlight lang="moinwikitext">
{{chartChart top|width=100%|European style family tree bottom to top (Prince William, DukePrince of CambridgeWales)}}
{{Ahnentafel-chart|top_down=1}}
|1=1. [[Prince William, DukePrince of CambridgeWales]]
|2=2. [[Charles, PrinceIII|Charles III of Walesthe United Kingdom]]
|3=3. [[Diana, Princess of Wales|Lady Diana Spencer]]
|4=4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]]
Line 170:
|15=15. [[Ruth Roche, Baroness Fermoy|Ruth Gill]]
}}
{{chartChart bottom}}
</syntaxhighlight>
</source>
 
{{chartChart top|collapsed=no|width=100%|European style family tree bottom to top (Prince William, DukePrince of CambridgeWales)}}
{{Ahnentafel-chart|top_down=1
|boxstyle_1=background-color: #bfc;
Line 180:
|boxstyle_4=background-color: #fcc;
|boxstyle_5=background-color: #fb9;
|1=1. [[Prince William, DukePrince of CambridgeWales]]
|2=2. [[Charles, PrinceIII|Charles III of Walesthe United Kingdom]]
|3=3. [[Diana, Princess of Wales|Lady Diana Spencer]]
|4=4. [[Prince Philip, Duke of Edinburgh|Prince Philip of Greece and Denmark]]
Line 196:
|15=15. [[Ruth Roche, Baroness Fermoy|Ruth Gill]]
}}
{{chartChart bottom}}
 
For documentation and more examples see the documentation for {{tl|Ahnentafel-chart}}.
Line 203:
{{Main|Template:Tree list}}
 
Each branch of the tree is built using nested lists. In order to display the final branches properly, it is necessary to use the template {{tl|Tree list/final branch}} like so:
 
<syntaxhighlight lang="wikitext">
<pre>
{{hidden begin|border=1px #aaa solid|title=Demonstration tree|ta1=center}}
{{Tree list}}
Line 212:
*** A third level branch
*** Another third level branch
*** {{Tree list/final branch}} The final third level branch
** Another second level branch
** {{Tree list/final branch}} The final second level branch
{{Tree list/end}}
{{Hidden end}}</presyntaxhighlight>
 
which produces
Line 225 ⟶ 223:
*** A third level branch
*** Another third level branch
*** {{Tree list/final branch}} The final third level branch
** Another second level branch
** {{Tree list/final branch}} The final second level branch
{{Tree list/end}}
{{Hidden end}}
Line 236 ⟶ 232:
 
===Ahnentafel-tree===
The template {{tlx|ahnentafel-tree}} uses {{tlx|Tree list}} and will handle up to an ahnentafel of 511 places (9 &nbsp;generations), but will also display as little as one generation.
<syntaxhighlight lang="wikitext">
{{Ahnentafel-tree
|title=Parents of subject
|1=''subject''
|2=''father''
|3=''mother''
}}
</syntaxhighlight>
{{Ahnentafel-tree
|title=Parents of subject
|expanded=on
|color_1=#bfc;
|color_2=#9fe;
|1=''subject''
|2=''father''
|3=''mother''
}}
 
== Tables ==
Line 247 ⟶ 260:
To fully understand how it works, this is the same table with ''all'' table borders:
{{Wikipedia:Family trees/House Tully 2}}
 
== S-anc and S-fam ==
{{main|Template:S-fam|Template:S-anc}}
 
{{tlx|S-anc}} is useful for [[noble house]]s and [[family name]]s with a need to be brief in ancestral trees. Unlike many current forms, it does not include unnecessary descriptors such as grandfather and great grandmother, but it does allow for royal house names and mother and father [[title]]s. It is derived from [[CSS]] templates instead of many lines of unnecessary code. The template is available at {{tl|s-anc}} although it requires {{tl|s-fam}} and {{tl|end}} or {{tl|s-ref}} to function properly. In the end, it appears as this when completed:
 
<pre>
{{s-fam}}
{{s-anc
|name=Page Name or Custom name
|F=Father
|Ftitle=King of Something
|FF=Grandfather
|FFH=Grandfather's House
|FM=Grandmother
|FMH=Grandmother's House
|M=Mother
|Mtitle=Queen of Something
|MF=Grandfather
|MFH=Grandfather's House
|MM=Grandmother
|MMH=Grandmother's House}}
{{s-ref|Cite your sources here}}
</pre>
 
{{s-fam}}
{{s-anc
|name=Page Name or Custom name
|F=Father
|Ftitle=King of Something
|FF=Grandfather
|FFH=Grandfather's House
|FM=Grandmother
|FMH=Grandmother's House
|M=Mother
|Mtitle=Queen of Something
|MF=Grandfather
|MFH=Grandfather's House
|MM=Grandmother
|MMH=Grandmother's House}}
{{s-ref|Cite your sources here}}
 
== ASCII art ==
Line 319 ⟶ 291:
''Myrcella'' Stone Storm
 
Although this method was common on Wikipedia in the past, [[ASCII]] trees are [[deprecated]] for two reasons. Large fix-width ASCII templates can cause formating problems on small screens. Secondly because the tables rely on fixed width fonts, theytheir alignment is easily broken by inexperienced editors removing some of the leading spaces, or by characters having different widths. For example in the second tree above although it uses characters in the same place as those in the first one in this section, and there are slight misalignments because the charter widths of "=" and "─" are slightly different.
 
When this section was originally written an example in article space provided: [[Family tree of the Greek gods]]. The last ASCII version of that table had problems with alignment (see [https://en.wikipedia.org/w/index.php?title=Family_tree_of_the_Greek_gods&oldid=95374094 Revision of 19 December 2006]). It was replaced with one based on the familytree templates (the forerunner of {{tl|chart}} templates) on [https://en.wikipedia.org/w/index.php?title=Family_tree_of_the_Greek_gods&oldid=97492352 31 December 2006].