@@ -143,19 +143,22 @@ def report_person_print_profile(ged, indi, own_fams)
143
143
$params[ :ofile ] . print "\\ vspace{0mm} \\ centering \\ incImage{width=10em}{#{ conv_img4latex ( mugshot ) } }\n "
144
144
$params[ :ofile ] . print "\\ end{minipage} \\ hfill\n "
145
145
146
- def t1 ( a , b , c , d = nil , e = nil , f = nil , g = nil )
146
+ def t1 ( a , b , c , d = nil , e = nil , f = nil , g = nil , src_ids = [ ] )
147
147
s = [ ]
148
148
s += [ "\\ mbox{" , b , h ( c ) , "}" ] if c . to_s != ""
149
149
s += [ "\\ mbox{" , d , h ( e ) , "}" ] if e . to_s != ""
150
150
s += [ "\\ mbox{" , f , h ( g ) , "}" ] if g . to_s != ""
151
- return ( s . size > 0 ? "\\ mbox{#{ a } }: & #{ s . join ( ' ' ) } \\ \\ \n " : "" )
151
+
152
+ sources = report_person_sources_to_footnote ( src_ids )
153
+ return ( s . size > 0 ? "\\ mbox{#{ a } }: & #{ s . join ( ' ' ) } #{ sources } \\ \\ \n " : "" )
152
154
end
153
155
154
156
$params[ :ofile ] . print "\\ begin{minipage}[t]{\\ textwidth-10em} \\ vspace{0mm}\n "
155
157
$params[ :ofile ] . print "\\ begin{tabular}{p{4em} p{\\ textwidth-15em}}\n "
156
- $params[ :ofile ] . print t1 ( "Geboren" , "am" , indi . birth , "in" , indi . birth_place )
157
- $params[ :ofile ] . print t1 ( "Getauft" , "am" , indi . leaf , "in" , indi . leaf_place )
158
- $params[ :ofile ] . print t1 ( "Gestorben" , "am" , indi . died , "in" , indi . died_place )
158
+ $params[ :ofile ] . print t1 ( "Kekule" , "" , "1" )
159
+ $params[ :ofile ] . print t1 ( "Geboren" , "am" , indi . birth , "in" , indi . birth_place , nil , nil , indi . birth_sources ( ged ) )
160
+ $params[ :ofile ] . print t1 ( "Getauft" , "am" , indi . leaf , "in" , indi . leaf_place , nil , nil , indi . leaf_sources ( ged ) )
161
+ $params[ :ofile ] . print t1 ( "Gestorben" , "am" , indi . died , "in" , indi . died_place , nil , nil , indi . died_sources ( ged ) )
159
162
# TODO EVENT, GRAD, RELI, EVEN, GRAD, EDUC, RESI, CHAN(?), BLES ## USE FOR NOTES, too
160
163
161
164
own_fams . each { |own_fam |
@@ -305,8 +308,10 @@ def t2(f)
305
308
306
309
def report_person_print_notes ( ged , indi )
307
310
items = [ ]
308
- [ [ "Geburtsnotiz" , "BIRT_NOTE" ] , [ "Taufnotiz" , "CHR_NOTE" ] , [ "Sterbenotiz" , "DEAT_NOTE" ] ,
309
- [ "Andere" , "NOTE" ] ] . each { |x | key , val = x
311
+ [ [ "Geburtsnotiz" , "BIRT_NOTE" , "BIRT_SOUR" ] ,
312
+ [ "Taufnotiz" , "CHR_NOTE" , "CHR_SOUR" ] ,
313
+ [ "Sterbenotiz" , "DEAT_NOTE" , "DEAT_SOUR" ] ,
314
+ [ "Andere" , "NOTE" , "?????????" ] ] . each { |x | key , val , src = x
310
315
indi . get_details ( val ) . each { |note_id | text = note_id = note_id [ :value ]
311
316
if note_id [ 0 ] . chr == '@'
312
317
note = ged . find_by_node_gid ( note_id )
@@ -319,7 +324,9 @@ def report_person_print_notes(ged, indi)
319
324
text = text . gsub ( "**********" , "********** " ) # hack to avaid LaTeX warning
320
325
end
321
326
322
- items << "\\ item[#{ key } ] #{ replace_newline ( h ( text ) ) } "
327
+ sources = report_person_sources_to_footnote ( indi . get_sources ( ged , src ) )
328
+
329
+ items << "\\ item[#{ key } ] #{ replace_newline ( h ( text ) ) } " + sources
323
330
}
324
331
}
325
332
@@ -335,6 +342,15 @@ def report_person_print_notes(ged, indi)
335
342
return ( true )
336
343
end
337
344
345
+ def report_person_sources_to_footnote ( srcs )
346
+ sources = ""
347
+ srcs . each { |src | next if src . nil?
348
+ footnote = src . footnote
349
+ sources += " \\ footnote{#{ h ( footnote ) } }" if footnote != ""
350
+ }
351
+ return sources
352
+ end
353
+
338
354
def report_print_galerie ( ged , section )
339
355
items = { } ;
340
356
section . objs . each { |o |
0 commit comments