%define;link(aa, xx) %if;(cancel_links)xx%else;xx%end; %end; %define;sorted_list_birth(xx) %incr_count; %apply;add_in_sorted_list%with; %ancestor.xx_place;%and; %ancestor.xx_date.year;%and; %ancestor; s%ancestor.anc_sosa;%and; %birth_symbol; %ancestor.xx_date.prec;%and; %ancestor.on_xx_date;%and; %apply;a_of_b%with; %if;(ancestor.is_male)[*son/daughter/child]0 %elseif;(ancestor.is_female)[*son/daughter/child]1 %else;[*son/daughter/child]2 %end; %and; %if;(ancestor.has_parents) %ancestor.father; & %ancestor.mother; %end; %end; %and; %ancestor.access; %end; %end; %define;sorted_list_death(xx) %incr_count; %apply;add_in_sorted_list%with; %ancestor.xx_place;%and; %ancestor.xx_date.year;%and; %ancestor; s%ancestor.anc_sosa;%and; %if;(bvar.death_symbol != "")%bvar.death_symbol;%else;†%end;%ancestor.xx_date.prec;%and; %ancestor.on_xx_date;%and; & %ancestor.spouse;%and; %ancestor.access; %end; %end; %define;sorted_list_marriage() %incr_count; %apply;add_in_sorted_list%with; %marriage_place;%and; %marriage_date.year;%and; %ancestor; s%ancestor.anc_sosa;%and; &%marriage_date.prec;%and; %on_marriage_date;%and; & %spouse;%and; %ancestor.access; %end; %end; %define;M2b_b() %if;(not ancestor.has_linked_page.BIRTHA) %if;(ancestor.has_birth_date) %apply;sorted_list_birth("birth") %elseif;(ancestor.has_baptism_date) %apply;sorted_list_birth("baptism") %end; %end; %end; %define;M2m_m() %if;(ancestor.is_male and not ancestor.has_linked_page.MARRIAGEA) %foreach;ancestor.family %if;(marriage_date.year != "") %apply;sorted_list_marriage() %end; %end; %end; %end; %define;M2d_d() %if;(not ancestor.has_linked_page.DEATHA) %if;(ancestor.has_death_date) %apply;sorted_list_death("death") %elseif;(ancestor.has_burial_date) %apply;sorted_list_death("burial") %elseif;(ancestor.has_cremation_date) %apply;sorted_list_death("cremated") %end; %end; %end; %define;M3b_b() %if;(ancestor.birth_date.prec != "") %apply;sorted_list_birth("birth") %elseif;(ancestor.baptism_date.prec != "") %apply;sorted_list_birth("baptism") %elseif;(ancestor.on_birth_date = "" and ancestor.on_baptism_date = "") %if;(ancestor.has_birth_date) %apply;sorted_list_birth("birth") %elseif;(ancestor.has_baptism_date) %apply;sorted_list_birth("baptism") %else; %apply;sorted_list_birth("birth") %end; %end; %end; %define;M3m_m() %if;(ancestor.is_male) %foreach;ancestor.family %if;(marriage_date.prec != "" or on_marriage_date = "") %apply;sorted_list_marriage() %end; %end; %end; %end; %define;M3d_d() %if;(ancestor.is_dead) %if;(ancestor.death_date.prec != "") %apply;sorted_list_death("death") %elseif;(ancestor.burial_date.prec != "") %apply;sorted_list_death("burial") %elseif;(ancestor.on_death_date = "" and ancestor.burial_date.day = "") %if;(ancestor.has_death_date) %apply;sorted_list_death("death") %elseif;(ancestor.has_burial_date) %apply;sorted_list_death("burial") %else; %apply;sorted_list_death("death") %end; %end; %end; %end; %define;miss_b(xx,bb,mm,dd) %apply;xxb_bb() %end; %define;miss_m(xx,bb,mm,dd) %apply;xxm_mm() %end; %define;miss_d(xx,bb,mm,dd) %apply;xxd_dd() %end; %define;miss_bm(xx,bb,mm,dd) %apply;xxb_bb() %apply;xxm_mm() %end; %define;miss_bd(xx,bb,mm,dd) %apply;xxb_bb() %apply;xxd_dd() %end; %define;miss_md(xx,bb,mm,dd) %apply;xxm_mm() %apply;xxd_dd() %end; %define;miss_bmd(xx,bb,mm,dd) %apply;xxb_bb() %apply;xxm_mm() %apply;xxd_dd() %end; %define;miss1(xx,bb,mm,dd) %if;("bb" = "b" or "mm" = "m" or "dd" = "d") %apply;togen() %empty_sorted_list; %reset_count; %foreach;ancestor_level(l_v) %if;(level > 1 and (evar.only != "on" or level = l_v)) %foreach;ancestor; %if;(ancestor.same = "") %apply;miss_bbmmdd("xx","bb","mm","dd") %end; %end; %end; %end; %end; %end; %define;miss2() %if;(count > 100)
%foreach;sorted_list_item; %if;(initial(prev_item.1) != initial(item.1)) %apply;initial(item.1) %end; %end;
%end;[*total] = %count;
%end; %( main %) %if;(evar.miss = "M1" and evar.al = "on") %( missing ancestors alphabetically %) %apply;togen() %empty_sorted_list; %reset_count; %foreach;ancestor_level(l_v) %if;(level > 1 and (evar.only != "on" or level = l_v))%nn; %foreach;ancestor; %if;(ancestor.same = "") %if;(not ancestor.has_parents and ancestor.first_name != "?" and ancestor.surname != "?") %incr_count; %apply;add_in_sorted_list( ancestor.surname_end, ancestor.first_name, ancestor.surname_begin, "0", ancestor.nobility_title, ancestor.access, ancestor.dates, [parents], ancestor.family.marriage_date.year, ancestor.spouse, ancestor.spouse.dates, ancestor.spouse.nobility_title) %elseif;(evar.ms = "on" and ancestor.has_parents) %if;(ancestor.father.first_name = "?" and ancestor.father.surname = "?") %incr_count; %apply;add_in_sorted_list( ancestor.mother.surname_end, ancestor.mother.first_name, ancestor.mother.surname_begin, "1", ancestor.mother.nobility_title, ancestor.mother.access, ancestor.mother.dates, [husband/wife]0) %end; %if;(ancestor.mother.first_name = "?" and ancestor.mother.surname = "?") %incr_count; %apply;add_in_sorted_list( ancestor.father.surname_end, ancestor.father.first_name, ancestor.father.surname_begin, "1", ancestor.father.nobility_title, ancestor.father.access, ancestor.father.dates, [husband/wife]1) %end; %end; %end; %end; %end; %end; %if;(count > 100) %foreach;sorted_list_item; %if;(initial(prev_item.1) != initial(item.1)) %apply;initial(item.1) %end; %end; %end; %if;(evar.ms != "on")%apply;a_of_b([*parents], "…")
%end;[*total] = %count;
%elseif;(evar.miss = "M1") %( missing ancestors in ancestors order %) %if;(evar.only != "on") %apply;togen() %end; %if;(evar.ms != "on")%apply;a_of_b([*parents], "…")
%end;[*total] = %count;
%elseif;(evar.miss="M3") %( date != exact %) %apply;miss1(evar.miss,evar.M3b,evar.M3m,evar.M3d) %apply;miss2() %end;