Debian Codegraph @

texmf-dist/doc/latex/familytree/README.md

raw symbols SCIP
1
2 # familytree package
3 `jiro1010senju AT gmail DOT com`
4
5 ---
6 ```
7 This package is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 any later version.
11
12 This package is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this package. If not, see <http://www.gnu.org/licenses/>.
19 ```
20 ---
21
22 Some LaTeX macros (or commands) to draw a family tree.
23
24
25 # Install
26
27 `$ make Dir=/tmp`
28
29 You will get these files under `/tmp`.
30 ```
31 familytree.sty
32 familytree.pdf
33 familytree-ja.pdf
34 Crawley.pdf
35 Asai.pdf
36 Tokugawa.pdf
37 ```
38
39 `$ make InstallDir=/tmp/texmf-dist install`
40
41 You will get these under `/tmp/texmf-dist`.
42
43 ```
44 tex/latex/familytree.sty
45 source/latex/familytree/familytree.pdf
46 source/latex/familytree/familytree-ja.pdf
47 source/latex/familytree/Crawley.pdf
48 source/latex/familytree/Asai.pdf
49 source/latex/familytree/Tokugawa.pdf
50 ```
51
52
53 # Usage
54
55 1.
56 ```
57 \indvdldef{Harry}{Harry}
58 \indvdldef{Lily}{Lily}[\matrilineal]
59 \pcdef{Potters}{Lily}{Harry}
60 \fbox{\usebox{\Potters}}
61 ```
62
63 2.
64 ```
65 \indvdldef{Petunia}{Petunia}
66 \indvdldef{Lily}{Lily}
67 \sblngdef{sis}{Petunia,Lily}
68 \fbox{\usebox{\sis}}
69 ```
70
71 3.
72 ```
73 \indvdldef{Lily}{Lily}
74 \indvdldef[\blank]{James}{James Potter}[\haschild]
75 \mrrgdef{Potters}{James}{Lily}{}
76 \fbox{\usebox{\Potters}}
77 ```
78
79 4.
80 ```
81 \indvdldef{Petunia}{Petunia}
82 \indvdldef[\blank]{Vernon}{Vernon Dursley}[\haschild]
83 \mrrgdef{Dursleys}{Vernon}{Petunia}{}
84 %\fbox{\usebox{\Dursleys}}
85
86 \newsavebox{\boxA}
87 \savebox{\boxA}{\hbox{Petunia}}
88 \indvdldef{Lily}{\hbox to \wd\boxA{Lily}}
89 \indvdldef[\blank]{James}{James Potter}[\haschild]
90 \mrrgdef{Potters}{}{Lily}{James}[\dimexpr\wd\Vernon - \wd\James\relax]
91 %\fbox{\usebox{\Potters}}
92
93 \sblngdef{sis}{Dursleys,ivali,Potters}
94 \fbox{\usebox{\sis}}
95 ```
96
97
98 # Syntax
99
100 To define an individual,
101 ```
102 \indvdldef
103 [child mark]
104 {new box name}
105 [title]
106 {individual name}
107 [list of additional info or attributes]
108 [maleline xlength]
109 ```
110
111 - child mark
112 + `\ftbiological`
113 + `\ftadopted`
114 + `\fttop`
115 + `\ftblank`
116
117 - attribute
118 + `\fthaschild`
119 + `\ftprivate`
120 + `\ftmaleline, \ftfemaleline, \ftpatrilineal, \ftmatrilineal`
121
122 ---
123
124 To define the siblings,
125 ```
126 \sblngdef
127 {new box name}
128 {name list of individual boxes}
129 ```
130
131 You can insert the "interval box" in the name list, to make the
132 spaces between the siblings.
133
134 To define the interval box,
135 ```
136 \ivaldef
137 {box-name}
138 {length}
139 ```
140
141 There are three pre-defined interval boxes, `\ival`, `\ivali`, and `\ivalii`.
142
143 ---
144
145 To define a parent-child relationship,
146 ```
147 \pcdef
148 {new box name}
149 {parent box name}
150 {child box name}
151 ```
152
153 To define the generations,
154 ```
155 \gensdef
156 {new box name}
157 {parent box name}
158 {list of connection-pair}
159 ```
160
161 ```
162 connection-pair :=
163 {individual box name in the parent box}
164 {child box name}
165 ```
166
167 ---
168
169 To define a married couple or the spouses,
170 ```
171 \mrrgdef
172 {new box name}
173 {spouse list A}
174 {oneself}
175 {spouse list B}
176 [childline xlength]
177 ```
178
179
180 Configuration
181 -------------
182
183 ```
184 \nameboxcfg
185 {space from the child mark}
186 {font}
187 {space to the maleline}
188 {maleline length}
189
190 \cmarkboxcfg
191 {space between two lines, for adopted}
192 {line length}
193
194 \titleboxcfg
195 {indent}
196 {font}
197 {linestretch}
198 {vspace to the individual name}
199
200 \optboxcfg
201 {vspace from the individual name}
202 {indent}
203 {font}
204 {linestretch}
205
206 \sblngboxcfg
207 {space-length}
208 ```
209
210
211 For more details, refer to `*.dtx`, `familytree.pdf` or `familytree-ja.pdf`,
212 and `samples/` sub-dir.