Debian Codegraph @

reports/ps-pedigree.ps

raw
1 %!PS-Adobe-1.0
2 %%Creater: ps-pedigree
3 %%Title: Ancestry Charts
4 %%Pages: (atend)
5 %%DocumentFonts: Helvetica Courier Courier-Bold
6 %%EndComments
7
8 /#findfont /findfont load def
9 /findfont {
10 dup #findfont dup /Encoding get 8#340 get /.notdef eq {
11 12 dict begin
12 /newcodesandnames [
13 8#200 /aacute 8#335 /acircumflex 8#336 /adieresis
14 8#337 /agrave 8#202 /atilde 8#201 /aring
15 8#340 /ccedilla 8#342 /eacute 8#344 /ecircumflex
16 8#345 /edieresis 8#346 /egrave 8#203 /iacute
17 8#347 /icircumflex 8#354 /idieresis 8#204 /igrave
18 8#205 /ntilde 8#206 /oacute 8#355 /ocircumflex
19 8#356 /odieresis 8#207 /ograve 8#210 /otilde
20 8#211 /scaron 8#212 /uacute 8#357 /ucircumflex
21 8#360 /udieresis 8#362 /ugrave 8#213 /ydieresis
22 8#214 /zcaron
23 8#215 /Aacute 8#300 /Acircumflex 8#311 /Adieresis
24 8#314 /Agrave 8#217 /Atilde 8#216 /Aring
25 8#321 /Ccedilla 8#322 /Eacute 8#323 /Ecircumflex
26 8#324 /Edieresis 8#325 /Egrave 8#220 /Iacute
27 8#326 /Icircumflex 8#327 /Idieresis 8#221 /Igrave
28 8#222 /Ntilde 8#223 /Oacute 8#330 /Ocircumflex
29 8#331 /Odieresis 8#224 /Ograve 8#225 /Otilde
30 8#226 /Scaron 8#227 /Uacute 8#332 /Ucircumflex
31 8#333 /Udieresis 8#334 /Ugrave 8#230 /Ydieresis
32 8#231 /Zcaron
33 ] def
34 /basefontdict exch def
35 /newfontname exch def
36 /newfont basefontdict maxlength dict def
37 basefontdict {
38 exch dup /FID ne {
39 dup /Encoding eq { exch 256 array copy } { exch } ifelse
40 newfont 3 1 roll put
41 } { pop pop } ifelse
42 } forall
43 newfont /FontName newfontname put
44 newcodesandnames aload pop
45 newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put }
46 repeat newfontname newfont definefont
47 end
48 } { exch pop } ifelse
49 } def
50
51 /headerpointsize 10 def
52 /font /Courier def
53 /pointsize 10 def
54 /Linespace {/Linespace pointsize 1.1 mul neg dup 3 1 roll def } def
55 /margin 10 def
56 /xoffset .35 def
57 /yoffset -0.30 def
58 /def_yoffset yoffset def
59 /def_xoffset xoffset def
60 /def_pointsize pointsize def
61 /roundpage true def
62 /useclippath true def
63 /pagebbox [0 0 612 792] def
64
65 /inch {72 mul} bind def
66 /mm {2.8453 mul} bind def
67 /point {72 div} bind def
68 /min {2 copy gt {exch} if pop} bind def
69 /max {2 copy lt {exch} if pop} bind def
70 /rectpath {4 2 roll moveto dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto
71 closepath } def
72
73 /a-size {8.5 inch 11 inch} bind def
74 /a4-size {210 mm 297 mm} bind def
75 /b4-size {10.125 inch 14.2 inch} bind def
76 /paper {/paper-x exch def /paper-y exch def} bind def
77
78 a-size paper
79
80 /mfont % w h mfont
81 {/fh exch def
82 /fw exch def
83 /Helvetica findfont
84 [fw 0 0 fh 0 0] makefont setfont
85 c-bs-1 c-bs-2 } def
86
87 /c-bs-1 % calculate box size from current fh fw
88 {[fh 1 add fw nc-1 mul] cvx
89 /box-size-1 exch def} def
90
91 /c-bs-2 % calculate box size from current fh fw
92 {[fh 2 mul 1 add fw nc-2 mul] cvx
93 /box-size-2 exch def} def
94
95 /box-it % x y h w box-it
96 {2 copy 6 2 roll
97 box-org box} def
98
99 /center-up % x y string center-up
100 { dup stringwidth pop % x y string w
101 3 -1 roll 1 add % x string w y
102 exch 2 div % x string y (w/2)
103 4 -1 roll exch sub % string y (x-w/2)
104 exch moveto show } def
105
106 /center-dn % x y string center-dn
107 { dup stringwidth pop % x y string w
108 3 -1 roll fh sub % x string w (y-fsize)
109 1 add
110 exch 2 div % x string (y-fsize) (w/2)
111 4 -1 roll exch sub % string (y-fsize) (x-w/2)
112 exch moveto show } def
113
114 /bbox % h w x y box % where x y is lower left corner
115 {newpath moveto % h w
116 dup 0 rlineto % h w
117 exch 0 exch rlineto % w
118 neg 0 rlineto
119 closepath 0.3 setlinewidth stroke} def
120
121 /box % h w x y box % where x y is lower left corner
122 {newpath moveto % h w
123 dup 0 rlineto % h w
124 exch 0 exch rlineto % w
125 neg 0 rlineto
126 closepath 0.1 setlinewidth stroke} def
127
128 /rbox % [x1 y1 x2 y2 x3 y3 x4 y4] r w rbox
129 {/w exch def /r exch def /a exch def
130 a 0 2 da1 r add newpath moveto
131 a 2 4 da a 4 4 da a 6 2 da1 a 0 2 da a 0 4 da
132 closepath w setlinewidth stroke} def
133
134 /mbox % h w x y mbox => [x1 y1 x2 y2 x3 y3 x4 y4]
135 {2 copy % h w x y x y
136 5 index add 2 copy % h w x1 y1 x2 y2 x2 y2
137 exch 6 index add exch % h w x1 y1 x2 y2 x3 y3
138 2 copy 9 index sub % h w x1 y1 x2 y2 x3 y3 x4 y4
139 8 array astore
140 3 1 roll pop pop} def
141
142 /box-org % x y h w box-org
143 {2 div % x y h (w/2)
144 exch 2 div exch % x y (h/2) (w/2)
145 4 -1 roll exch sub % y (h/2) (x-w/2)
146 3 1 roll sub % (x-w/2) (y-h/2)
147 } def
148
149 /t2 % text1 text2 x y
150 { 2 copy % text1 text2 x y x y
151 box-size-2 box-it % text1 text2 x y
152 2 copy 6 -1 roll % text2 x y x y text1
153 center-up % text2 x y
154 3 -1 roll % x y text2
155 center-dn } def
156
157 /t1 % text x y
158 { 2 copy % text x y x y
159 box-size-1 box-it % text x y
160 box-size-1 box-org
161 exch fw add exch 1 add % text (xorg+fw) yorg
162 moveto show } def
163
164 /ct1 % text x y
165 { 2 copy
166 box-size-1 box-it % text x y
167 3 -1 roll % x y text
168 dup stringwidth pop % x y text w
169 2 div % x y text (w/2)
170 4 -1 roll exch sub % y text (x-w/2)
171 3 -1 roll fh 1 sub 2 div sub % text (x-w/2) (y-(fh+1)/2)
172 moveto show } def
173
174 /da2 { r arcto 4 {pop} repeat} def
175 /da1 {getinterval aload pop} def
176 /da {da1 da2} def
177 /gr {/r exch def} def
178 /pto {2 copy 6 2 roll da2} def
179
180 /np {newpath} def
181 /mto {moveto} def
182 /rmto {rmoveto} def
183 /lto {lineto} def
184 /rlto {rlineto} def
185 /drw {0.1 setlinewidth stroke} def
186
187 /plotpagesetup
188 { newpagesetup restore /newpagesetup save def
189 90 rotate 12 12 translate
190 margin-l paper-y neg margin-b add translate
191 paper-x margin-l margin-r 36 add add sub width-needed div
192 paper-y margin-t margin-b 18 add add sub height-needed div
193 scale
194 text-wdt text-hgt mfont
195 } def
196
197 /setup
198 {
199 /linespace pointsize pointsize .10 mul add neg def
200 /headerspace headerpointsize headerpointsize .10 mul add 2
201 linespace mul sub neg def
202
203 font findfont pointsize scalefont setfont
204
205 pagedimensions
206
207 /standard_height 80 def_pointsize def_pointsize .10 mul add mul
208 yoffset inch sub margin 2 div add def
209
210 /rel_height height def
211 /rel_width 7.5 inch def
212
213 rel_height standard_height lt
214 { /yoffset yoffset def_yoffset sub margin point 2 div add def }if
215 width rel_width lt
216 { /xoffset xoffset def_xoffset sub margin point 2 div sub def }if
217 } def
218
219 /indexpagesetup
220 {
221 newpagesetup restore /newpagesetup save def
222 xcenter ycenter translate
223 width 2 div neg height 2 div translate
224 xoffset inch yoffset inch translate
225 margin 2 div dup neg translate
226
227 0 headerspace translate
228 } def
229
230 /pagedimensions {
231 useclippath userdict /gotpagebbox known not and {
232 /pagebbox [clippath pathbbox newpath] def
233 roundpage currentdict /roundpagebbox known and {roundpagebbox} if
234 } if
235 pagebbox aload pop .5 sub
236
237 4 -1 roll exch 4 1 roll 4 copy
238 sub /width exch def
239 sub /height exch def
240 add 2 div /xcenter exch def
241 add 2 div /ycenter exch def
242 userdict /gotpagebbox true put
243 } def
244
245
246 /page_num_len { % count number of digits of the current page number
247 /digits 1 def
248 /tens 10 def
249 { page tens lt
250 { exit }
251 { /digits digits 1 add def
252 /tens tens 10 mul def } ifelse
253 } loop
254 } def
255
256 /page_num { % convert page to a string
257 page_num_len page digits string cvs
258 } def
259
260 /printpage { % stk:int (right justified from this "int" value)
261 page_num stringwidth pop % get length of string
262 sub % calculate white space
263 0 rmoveto page_num % move over to the right that much
264 0 setgray show
265 } def
266
267
268 /show_simpleheader {
269 currentdict /headerfont known
270 {headerfont findfont headerpointsize scalefont setfont}
271 {/Courier-Bold findfont headerpointsize scalefont setfont} ifelse
272 currentdict /date known
273 { 0 0 moveto date 0 setgray show } if
274 currentdict /filename known
275 { 0 0 moveto
276 filename stringwidth pop 2 div width xoffset inch
277 .5 inch add sub 2 div exch sub
278 0 rmoveto filename 0 setgray show } if
279 0 0 moveto width xoffset inch .75 inch add sub printpage
280 } def
281
282 /pagesetup {
283 /page exch def
284 gsave
285 0 headerpointsize .10 mul 2 linespace mul sub translate
286 show_simpleheader
287 grestore
288 0 0 moveto 0
289 } bind def
290
291 /l {show Linespace add dup 0 exch moveto} bind def
292
293 %%EndProlog