Template:Family tree/doc: Difference between revisions

From escforumwiki
Jump to navigation Jump to search
No edit summary
 
Santos (talk | contribs)
m 1 revision
 
(No difference)

Latest revision as of 22:20, 14 September 2014


| type = move | text = When editing extremely large diagram with Family tree it is possible that you would be unable to submit the content due to Wikipedia:template limits. In that case please consider migrating your diagram to {{Chart}} which generates lower preprocessor node count. }}

This is a template for rendering simple family trees consisting of boxes and connecting lines based on an ASCII art-like syntax. The trees are displayed as HTML tables using CSS attributes, and may contain arbitrary wiki markup within the boxes.

Example usage

This code:

{{family tree/start |summary=I have a brother Joe and a little sister: my mom married my dad, and my dad's parents were Grandma and Grandpa; they had another child, Aunt Daisy.}}
{{family tree | | | | GMa |~|y|~| GPa | | GMa=Gladys|GPa=Sydney}}
{{family tree | | | | | | | |)|-|-|-|.| }}
{{family tree | | | MOM |y| DAD | |DAISY| MOM=Mom|DAD=Dad|DAISY=[[Aunt Daisy]]}}
{{family tree | |,|-|-|-|+|-|-|-|.| | | }}
{{family tree | JOE | | ME  | | SIS | | | JOE=My brother Joe|ME='''Me!'''|SIS=My little sister}}
{{family tree/end}}

Produces this:


 
 
 
Gladys
 
 
 
Sydney
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Mom
 
Dad
 
Aunt Daisy
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
My brother Joe
 
Me!
 
My little sister
 
 

Parameters

The |summary=text parameter of the {{family tree/start}} template should be used to describe the overall layout of the tree. This summary is for accessibility: it is read aloud to visually impaired readers who use screen readers, and is invisible to sighted readers.

The {{family tree}} template produces one row in a family tree table. The template accepts up to 80 unnamed parameters describing the contents of the table. Each parameter specifies a tile or a box.

  • Tiles are line drawing symbols consisting of horizontal and vertical lines and various corners and crossings thereof. Tiles are specified using single-character symbols that more or less approximate the shape of the tile in appearance. A special case of a tile is the empty tile, specified by a single space character. A table of supported tiles is given below.
Solid lines:
,
 
 
 
 
v
 
 
 
.
 
 
 
)
 
 
 
+
 
 
 
 
(
 
 
 
`
 
 
 
^
 
 
 
'
 
 
 
-
 
 
!
 
 
 
Dashed lines:
F
 
 
 
 
V
 
 
 
7
 
 
 
D
 
 
 
%
 
 
 
 
C
 
 
 
L
 
 
 
A
 
 
 
J
 
 
 
~
 
 
:
 
 
 
Mixed (1):
r
 
 
 
 
y
 
 
 
n
 
 
 
]
 
 
 
#
 
 
 
 
[
 
 
 
c
 
 
 
h
 
 
 
j
 
 
 
~
 
 
!
 
 
 
Mixed (2):
p
 
 
 
 
u
 
 
 
q
 
 
 
}
 
 
 
*
 
 
 
 
{
 
 
 
b
 
 
 
t
 
 
 
d
 
 
 
-
 
 
:
 
 
 
Misc.:
T
 
 
 
 
G
 
 
 
 
X
 
 
 
 
K
 
 
 
k
 
 
 
U
 
 
 


  • Boxes can contain arbitrary wiki markup. The contents of boxes are specified using additional named parameters appended to the template call. Each box is three tiles wide and normally has a 2 pixels wide black border. Boxes can have any name that is a valid template parameter name, although single character names should be avoided to prevent conflicts with tile symbols.

Style attributes

The appearance of the boxes may be controlled by the optional template parameters border and boxstyle. The former sets the width of the box border in pixels, while the latter can be used to append arbitrary CSS declarations directly to the box style attributes. For example, the following code:

{{familytree/start |summary=Box 1 married to Box 2, with children Box 3 and Box 4}}
{{familytree|border=0|boxstyle=background:#dfd;| | FOO |y| BAR | |FOO=Box 1|BAR=Box 2}}
{{familytree|border=0|boxstyle=background:#dfd;| | |,|-|^|-|.| | }}
{{familytree|border=0|boxstyle=background:#dfd;| | FOO | | BAR | |FOO=Box 3|BAR=Box 4}}
{{familytree/end}}

produces a result like this:


 
Box 1
 
Box 2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Box 3
 
Box 4
 

Style attributes can even be set for individual boxes, as in the example below:

{{familytree/start |White box with three children Red box, Green box, Blue box, all married to each other}}
{{familytree| | | | |WHITE| | | | |WHITE=White box
|boxstyle_WHITE = background-color: #fff;
}}
{{familytree| |,|-|-|'|!|`|-|-|.| }}
{{familytree|RED  |~|GREEN|~|BLUE |RED=Red box|GREEN=Green box|BLUE=Blue box
|boxstyle_RED   = background-color: #faa;
|boxstyle_GREEN = background-color: #afa;
|boxstyle_BLUE  = background-color: #aaf;
}}
{{familytree/end}}

which produces the output:


 
 
 
 
White box
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Red box
 
Green box
 
Blue box
 
 

NOTE: When specifying style attributes for individual named boxes, make sure the box names are aligned to the left side of area reserved for them in the template call (as in "|RED  |" instead of "| RED |" in the example above). Otherwise the template will end up looking for a style parameter with spaces in its name.

The {{familytree/start}} template also accepts an optional style parameter that can be used to set CSS styles for the entire table.

See also


I am A comedian Funny moments ...

Template parameters

ParameterDescriptionTypeStatus
22

no description

Unknownoptional
33

no description

Unknownoptional
44

no description

Unknownoptional
55

no description

Unknownoptional
66

no description

Unknownoptional
77

no description

Unknownoptional
88

no description

Unknownoptional
99

no description

Unknownoptional
1313

no description

Unknownoptional
1414

no description

Unknownoptional
1515

no description

Unknownoptional
1616

no description

Unknownoptional
1717

no description

Unknownoptional
1818

no description

Unknownoptional
1919

no description

Unknownoptional
2020

no description

Unknownoptional
2121

no description

Unknownoptional
2222

no description

Unknownoptional
2323

no description

Unknownoptional
2424

no description

Unknownoptional
2525

no description

Unknownoptional
2626

no description

Unknownoptional
2727

no description

Unknownoptional
2828

no description

Unknownoptional
2929

no description

Unknownoptional
3030

no description

Unknownoptional
3131

no description

Unknownoptional
3232

no description

Unknownoptional
3333

no description

Unknownoptional
3434

no description

Unknownoptional
3535

no description

Unknownoptional
3636

no description

Unknownoptional
3737

no description

Unknownoptional
3838

no description

Unknownoptional
3939

no description

Unknownoptional
4040

no description

Unknownoptional
4141

no description

Unknownoptional
4242

no description

Unknownoptional
4343

no description

Unknownoptional
4444

no description

Unknownoptional
4545

no description

Unknownoptional
4646

no description

Unknownoptional
4747

no description

Unknownoptional
4848

no description

Unknownoptional
4949

no description

Unknownoptional
5050

no description

Unknownoptional
5151

no description

Unknownoptional
5252

no description

Unknownoptional
5353

no description

Unknownoptional
5454

no description

Unknownoptional
5555

no description

Unknownoptional
5656

no description

Unknownoptional
5757

no description

Unknownoptional
5858

no description

Unknownoptional
5959

no description

Unknownoptional
6060

no description

Unknownoptional
6161

no description

Unknownoptional
6262

no description

Unknownoptional
6363

no description

Unknownoptional
6464

no description

Unknownoptional
6565

no description

Unknownoptional
6666

no description

Unknownoptional
6767

no description

Unknownoptional
6868

no description

Unknownoptional
6969

no description

Unknownoptional
7070

no description

Unknownoptional
7171

no description

Unknownoptional
7272

no description

Unknownoptional
7373

no description

Unknownoptional
7474

no description

Unknownoptional
7575

no description

Unknownoptional
7676

no description

Unknownoptional
7777

no description

Unknownoptional
7878

no description

Unknownoptional
7979

no description

Unknownoptional
8080

no description

Unknownoptional
boxstyleboxstyle

no description

Unknownoptional
borderborder

no description

Unknownoptional
boxstyle_{{{1boxstyle_{{{1

no description

Unknownoptional
boxstyle_{{{2boxstyle_{{{2

no description

Unknownoptional
boxstyle_{{{3boxstyle_{{{3

no description

Unknownoptional
boxstyle_{{{4boxstyle_{{{4

no description

Unknownoptional
boxstyle_{{{5boxstyle_{{{5

no description

Unknownoptional
boxstyle_{{{6boxstyle_{{{6

no description

Unknownoptional
boxstyle_{{{7boxstyle_{{{7

no description

Unknownoptional
boxstyle_{{{8boxstyle_{{{8

no description

Unknownoptional
boxstyle_{{{9boxstyle_{{{9

no description

Unknownoptional
boxstyle_{{{10boxstyle_{{{10

no description

Unknownoptional
boxstyle_{{{11boxstyle_{{{11

no description

Unknownoptional
boxstyle_{{{12boxstyle_{{{12

no description

Unknownoptional
boxstyle_{{{13boxstyle_{{{13

no description

Unknownoptional
boxstyle_{{{14boxstyle_{{{14

no description

Unknownoptional
boxstyle_{{{15boxstyle_{{{15

no description

Unknownoptional
boxstyle_{{{16boxstyle_{{{16

no description

Unknownoptional
boxstyle_{{{17boxstyle_{{{17

no description

Unknownoptional
boxstyle_{{{18boxstyle_{{{18

no description

Unknownoptional
boxstyle_{{{19boxstyle_{{{19

no description

Unknownoptional
boxstyle_{{{20boxstyle_{{{20

no description

Unknownoptional
boxstyle_{{{21boxstyle_{{{21

no description

Unknownoptional
boxstyle_{{{22boxstyle_{{{22

no description

Unknownoptional
boxstyle_{{{23boxstyle_{{{23

no description

Unknownoptional
boxstyle_{{{24boxstyle_{{{24

no description

Unknownoptional
boxstyle_{{{25boxstyle_{{{25

no description

Unknownoptional
boxstyle_{{{26boxstyle_{{{26

no description

Unknownoptional
boxstyle_{{{27boxstyle_{{{27

no description

Unknownoptional
boxstyle_{{{28boxstyle_{{{28

no description

Unknownoptional
boxstyle_{{{29boxstyle_{{{29

no description

Unknownoptional
boxstyle_{{{30boxstyle_{{{30

no description

Unknownoptional
boxstyle_{{{31boxstyle_{{{31

no description

Unknownoptional
boxstyle_{{{32boxstyle_{{{32

no description

Unknownoptional
boxstyle_{{{33boxstyle_{{{33

no description

Unknownoptional
boxstyle_{{{34boxstyle_{{{34

no description

Unknownoptional
boxstyle_{{{35boxstyle_{{{35

no description

Unknownoptional
boxstyle_{{{36boxstyle_{{{36

no description

Unknownoptional
boxstyle_{{{37boxstyle_{{{37

no description

Unknownoptional
boxstyle_{{{38boxstyle_{{{38

no description

Unknownoptional
boxstyle_{{{39boxstyle_{{{39

no description

Unknownoptional
boxstyle_{{{40boxstyle_{{{40

no description

Unknownoptional
boxstyle_{{{41boxstyle_{{{41

no description

Unknownoptional
boxstyle_{{{42boxstyle_{{{42

no description

Unknownoptional
boxstyle_{{{43boxstyle_{{{43

no description

Unknownoptional
boxstyle_{{{44boxstyle_{{{44

no description

Unknownoptional
boxstyle_{{{45boxstyle_{{{45

no description

Unknownoptional
boxstyle_{{{46boxstyle_{{{46

no description

Unknownoptional
boxstyle_{{{47boxstyle_{{{47

no description

Unknownoptional
boxstyle_{{{48boxstyle_{{{48

no description

Unknownoptional
boxstyle_{{{49boxstyle_{{{49

no description

Unknownoptional
boxstyle_{{{50boxstyle_{{{50

no description

Unknownoptional
boxstyle_{{{51boxstyle_{{{51

no description

Unknownoptional
boxstyle_{{{52boxstyle_{{{52

no description

Unknownoptional
boxstyle_{{{53boxstyle_{{{53

no description

Unknownoptional
boxstyle_{{{54boxstyle_{{{54

no description

Unknownoptional
boxstyle_{{{55boxstyle_{{{55

no description

Unknownoptional
boxstyle_{{{56boxstyle_{{{56

no description

Unknownoptional
boxstyle_{{{57boxstyle_{{{57

no description

Unknownoptional
boxstyle_{{{58boxstyle_{{{58

no description

Unknownoptional
boxstyle_{{{59boxstyle_{{{59

no description

Unknownoptional
boxstyle_{{{60boxstyle_{{{60

no description

Unknownoptional
boxstyle_{{{61boxstyle_{{{61

no description

Unknownoptional
boxstyle_{{{62boxstyle_{{{62

no description

Unknownoptional
boxstyle_{{{63boxstyle_{{{63

no description

Unknownoptional
boxstyle_{{{64boxstyle_{{{64

no description

Unknownoptional
boxstyle_{{{65boxstyle_{{{65

no description

Unknownoptional
boxstyle_{{{66boxstyle_{{{66

no description

Unknownoptional
boxstyle_{{{67boxstyle_{{{67

no description

Unknownoptional
boxstyle_{{{68boxstyle_{{{68

no description

Unknownoptional
boxstyle_{{{69boxstyle_{{{69

no description

Unknownoptional
boxstyle_{{{70boxstyle_{{{70

no description

Unknownoptional
boxstyle_{{{71boxstyle_{{{71

no description

Unknownoptional
boxstyle_{{{72boxstyle_{{{72

no description

Unknownoptional
boxstyle_{{{73boxstyle_{{{73

no description

Unknownoptional
boxstyle_{{{74boxstyle_{{{74

no description

Unknownoptional
boxstyle_{{{75boxstyle_{{{75

no description

Unknownoptional
boxstyle_{{{76boxstyle_{{{76

no description

Unknownoptional
boxstyle_{{{77boxstyle_{{{77

no description

Unknownoptional
boxstyle_{{{78boxstyle_{{{78

no description

Unknownoptional
boxstyle_{{{79boxstyle_{{{79

no description

Unknownoptional
boxstyle_{{{80boxstyle_{{{80

no description

Unknownoptional
Arley SwabyArley Swaby

no description

Datesuggested
Denia Swaby Ortiz Denia Swaby Ortiz

no description

Unknownoptional
Derlis Swaby R.Derlis Swaby R.

no description

Unknownoptional
Ashley Swaby Ashley Swaby

no description

Unknownoptional