Debian Codegraph @

reports/famgroup.ll

raw
1 /*
2 * @progname famgroup.ll
3 * @version 1.1
4 * @author Kris Stanton <[email protected]>
5 * @category
6 * @output TeX
7 * @description
8 *
9 * Family Group Sheet for LifeLines
10 *
11 * Minor fixes by Patrick Texier 12/28/2005
12 *
13 * The output is in LaTeX format. Therefore, the name of the output file
14 * should end in ".tex". To print (assuming the name of the output file is
15 * "out.tex"):
16 * latex out
17 * dvips out -o out.ps
18 * lpr out.ps
19 * or if you have it, you can generate a pdf with
20 * pdflatex out
21 */
22
23 proc main ()
24 {
25 getfam(fam)
26 dayformat(0)
27 monthformat(6)
28 dateformat(0)
29 set(tday, gettoday())
30 set (nl,nl())
31 set(h,husband(fam))
32 set(w,wife(fam))
33 col(0) "\\documentclass[landscape]\{article\}"
34 col(0) "\\setlength\{\\topmargin\}\{-1.3in\}"
35 col(0) "\\setlength\{\\oddsidemargin\}\{-.8in\}"
36 col(0) "\\setlength\{\\evensidemargin\}\{-.8in\}"
37 col(0) "\\setlength\{\\textwidth\}\{11in\}"
38 col(0) "\\setlength\{\\textheight\}\{9in\}"
39 col(0) "\\pagestyle\{empty\}"
40 col(0) "\\begin\{document\}"
41 col(0) "\\begin{center}"
42 col(0) "\\bfseries \\Large Family Group Sheet"
43 col(0) "\\end{center}" nl nl
44 col(0) "\\begin\{tabular\}\{lp\{7.85in\}\}"
45 col(0) "\\bfseries \\Large Husband's Name & \\Large "
46 col(0) fullname(h,1,1,50) " (\\#"key(h)") \\\\ \\cline{2-2}"
47 col(0) "\\end{tabular}" nl nl
48
49 set(evt, birth(h))
50 col(0) "\\begin{tabular}{p{.25in}p{.87in}p{3.75in}p{.4in}p{3.75in}}"
51 col(0) "& When Born & " stddate(evt) " & Where & "
52 place(evt) " \\\\ \\cline{3-3} \\cline{5-5}"
53
54 set(evt, death(h))
55 col(0) "& When Died & " stddate(evt) " & Where & "
56 place(evt)" \\\\ \\cline{3-3} \\cline{5-5}"
57
58 set(evt, burial(h))
59 col(0) "& When Buried & " stddate(evt) " & Where & "
60 place(evt) " \\\\ \\cline{3-3} \\cline{5-5}"
61
62 set(evt, marriage(fam))
63 col(0) "& When Married & " stddate(evt) " & Where & "
64 place(evt)" \\\\ \\cline{3-3} \\cline{5-5}"
65 col(0) "\\end{tabular}" nl nl
66
67 col(0) "\\begin{tabular}{p{.25in}lp{7.84in}}"
68 col(0) "& Other Wives (if any) & "
69 spouses (h, sname, famname, number) {
70 if (ne(w,sname)) {
71 "$\\triangleright$ " name(sname)
72 " \\hspace{.1in} "
73 }
74 }
75 " \\\\ \\cline{3-3}"
76 col(0) "\\end{tabular}" nl nl
77
78 col(0) "\\begin{tabular}{p{.25in}p{.87in}p{3.75in}p{.68in}p{3.48in}}"
79 col(0) "& His Father & " name(father(h))
80 if (father(h)) { " (\\#" key(father(h))")" }
81 " & His Mother & " name(mother(h))
82 if (father(h)) { " (\\#" key(mother(h))")" }
83 " \\\\ \\cline{3-3} \\cline{5-5}"
84 col(0) "\\end{tabular}" nl nl
85
86 col(0) "\\vspace{.1in}"
87 col(0) "\\begin{tabular}{lp{7.44in}}"
88 col(0) "\\bfseries \\Large Wife's Maiden Name & \\Large "
89 fullname(w,1,1,50) " (\\#"key(w)")" " \\\\ \\cline{2-2}"
90 col(0) "\\end{tabular}" nl nl
91
92 set(evt, birth(w))
93 col(0) "\\begin{tabular}{p{.25in}p{.87in}p{3.75in}p{.4in}p{3.75in}}"
94 col(0) "& When Born & " stddate(evt) " & Where & "
95 place(evt)" \\\\ \\cline{3-3} \\cline{5-5}"
96
97 set(evt, death(w))
98 col(0) "& When Died & " stddate(evt) " & Where & "
99 place(evt)" \\\\ \\cline{3-3} \\cline{5-5}"
100
101 set(evt, burial(w))
102 col(0) "& When Buried & " stddate(evt) " & Where & "
103 place(evt) " \\\\ \\cline{3-3} \\cline{5-5}"
104 col(0) "\\end{tabular}" nl nl
105
106 col(0) "\\begin{tabular}{p{.25in}lp{7.6in}}"
107 col(0) "& Other Husbands (if any) & "
108 spouses (w, sname, famname, number) {
109 if (ne(h,sname)) {
110 "$\\triangleright$ " name(sname)
111 "\\hspace{.1in} "
112 }
113 }
114 " \\\\ \\cline{3-3}"
115 col(0) "\\end{tabular}" nl nl
116
117 col(0) "\\begin{tabular}{p{.25in}p{.87in}p{3.75in}p{.7in}p{3.44in}}"
118 col(0) "& Her Father & " name(father(w))
119 if (father(w)) { " (\\#" key(father(w))")" }
120 " & Her Mother &" name(mother(w))
121 if (mother(w)) { " (\\#" key(mother(w))")" }
122 " \\\\ \\cline{3-3} \\cline{5-5}"
123 col(0) "\\end{tabular}" nl nl
124
125 col(0) "\\vspace{.1in}"
126 col(0) "\\scriptsize"
127 col(0) "\\begin{tabular}{c|p{2.15in}|cp{.6in}p{.25in}|p{2in}|cp{.6in}p{.25in}|p{2.1in}} \\hline \\hline"
128 col(0) "M/F & Children & "
129 col(0) "\\multicolumn{3}{c|}{When Born} & Where Born & "
130 col(0) "\\multicolumn{3}{c|}{When Died} & Married \\\\ "
131 col(0) "& (in order of birth) & \\centering Day & \\centering Month & \\centering Year &"
132 col(0) "City/Town, County, State/Country & "
133 col(0) "\\centering Day & \\centering Month & \\centering Year & \\\\ \\hline \\hline"
134
135 children(fam, child, num) {
136 set(ns, nspouses(child))
137 families(child, fvar, svar, no) {
138 if(eq(1,ns)) {
139 col(0) "& (\\#"key(child)") & & & & & & & &\\small Date: "
140 stddate(marriage(fvar)) " \\\\"
141 }
142 if(and(gt(ns,1),eq(no,1))) {
143 col(0) "& (\\#"key(child)") & & & & & & & &\\small Date: "
144 stddate(marriage(fvar)) " $\\dagger$ \\\\"
145 }
146 }
147 if(eq(0,ns)) {
148 col(0) "& (\\#"key(child)") & & & & & & & & \\small Date: \\\\ "
149 }
150
151 extractdate(birth(child), ddy, mmo, yyr)
152 col(0) "\\small " sex(child) "& \\small " d(num)" \\hspace{.1in}"
153 givens(child) nl
154 " & \\centering \\small " if(ne(ddy,0)) {d(ddy)} " & \\centering \\small "
155 if(eq(mmo,1)){ "January" }
156 if(eq(mmo,2)){ "February" }
157 if(eq(mmo,3)){ "March" }
158 if(eq(mmo,4)){ "April" }
159 if(eq(mmo,5)){ "May" }
160 if(eq(mmo,6)){ "June" }
161 if(eq(mmo,7)){ "July" }
162 if(eq(mmo,8)){ "August" }
163 if(eq(mmo,9)){ "September" }
164 if(eq(mmo,10)){ "October" }
165 if(eq(mmo,11)){ "November" }
166 if(eq(mmo,12)){ "December" }
167 " & \\centering \\small " if(ne(yyr,0)) {d(yyr)}
168 " & \\small " place(birth(child))
169 if(death(child)) {
170 extractdate(death(child), ddy, mmo, yyr)
171 }
172 else {
173 set(ddy, 0)
174 set(mmo, 0)
175 set(yyr, 0)
176 }
177 col(0) " & \\centering \\small " if(ne(ddy,0)){d(ddy)}
178 " & \\small \\centering "
179 if(eq(mmo,1)){ "January" }
180 if(eq(mmo,2)){ "February" }
181 if(eq(mmo,3)){ "March" }
182 if(eq(mmo,4)){ "April" }
183 if(eq(mmo,5)){ "May" }
184 if(eq(mmo,6)){ "June" }
185 if(eq(mmo,7)){ "July" }
186 if(eq(mmo,8)){ "August" }
187 if(eq(mmo,9)){ "September" }
188 if(eq(mmo,10)){ "October" }
189 if(eq(mmo,11)){ "November" }
190 if(eq(mmo,12)){ "December" }
191 " & \\centering \\small " if(ne(yyr,0)){d(yyr)}
192 " & \\small To: "
193 families(child, fvar, svar, no) {
194 if(and(gt(ns,0),eq(no,1))) {
195 name(svar) " \\\\ \\hline "}
196 }
197 if(eq(0,ns)) {
198 " \\\\ \\hline "}
199 }
200 set(left, sub(14, nchildren(fam)))
201 while(gt(left, 0)) {
202 col(0) "& & & & & & & & &\\small Date: \\\\"
203 col(0) "&\\small " d(sub(15,left)) " & & & & & & & &\\small To: \\\\ \\hline"
204 set(left, sub(left,1))
205 }
206 col(0) "\\end{tabular}" nl nl
207 col(0) "\\hspace{8in} \\scriptsize $\\dagger =$ more than one marriage"
208 col(0) "\\end{document}" nl
209 }
210
211 /* End of Report */