Skip to content

Commit f826595

Browse files
author
Matthias Rabe
committed
book: add report for cv
Signed-off-by: Matthias Rabe <[email protected]>
1 parent 8d8ad8a commit f826595

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

reports/book.inc.rb

+40
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ def report_person(ged, indi)
9797
return(false)
9898
end
9999

100+
if not report_person_print_cv(ged, indi)
101+
$stder.print "error while printing cv for #{indi.name}(#{indi.gid})\n"
102+
return(false)
103+
end
104+
100105
if not report_person_print_notes(ged, indi)
101106
$stderr.print "error while printing notes for #{indi.name}(#{indi.gid})\n"
102107
return(false)
@@ -306,6 +311,41 @@ def t2(f)
306311
return(true)
307312
end
308313

314+
def report_person_print_cv(ged, indi)
315+
es= indi.get_details("EVEN")
316+
if es.length > 0
317+
$params[:ofile].insertSubSubSection("Lebenslauf")
318+
$params[:ofile].print "\\ThinHRule \\vspace{2mm}\n"
319+
320+
def t1(a, b, c, d= nil, e= nil, f= nil, g= nil, src_ids= [])
321+
s= []
322+
s += ["\\mbox{", b, h(c), "}"] if c.to_s != ""
323+
s += ["\\mbox{", d, h(e), "}"] if e.to_s != ""
324+
s += ["\\mbox{", f, h(g), "}"] if g.to_s != ""
325+
326+
end
327+
328+
$params[:ofile].print "\\begin{tabular}{p{6em} p{11em} p{\\textwidth-21em}}\n"
329+
330+
es.each {|e|
331+
date, type, text = "", "", e[:value].to_s
332+
e[:children].each {|c|
333+
case c[:field]
334+
when "EVEN_DATE" then date = c[:value]
335+
when "EVEN_TYPE" then type = c[:value]
336+
when "EVEN_PLAC" then text += " in #{c[:value]}"
337+
end
338+
}
339+
340+
$params[:ofile].print "#{h(date)} & #{h(type)} & #{h(text)} \\\\\n"
341+
}
342+
343+
$params[:ofile].print "\\end{tabular}\n"
344+
end
345+
346+
return(true)
347+
end
348+
309349
def report_person_print_notes(ged, indi)
310350
items= []
311351
[ ["Geburtsnotiz", "BIRT_NOTE", "BIRT_SOUR"],

0 commit comments

Comments
 (0)