%include;css %include;hed %include;perso_utils %message_to_wizard;
%define;tothegen(xxx) %if;(evar.v>0)[to the %s generation:::xxx]%nn;%end; %end; %if;not cancel_links; %include;menubar %end;

%nn; %if;(evar.v!=0)%apply;a_of_b%with; %if;(evar.only!="on" and evar.v!=0)[*descendants]%else; %apply;capitalize%with%apply;gend("v")%end; %end;%and; %self;%end;%else;%self; ([no descendants])%end; %if;(cancel_links and evar.v!=0) %apply;togend(evar.v)%end;

%if;not cancel_links; %include;buttons %end; %let;central_index;%index;%in; %define;image_MF(xxx) %if;(wizard and not cancel_links) %elseif;xxx.is_female; class="fa fa-venus female mr-1"> %else; class="fa fa-neuter neuter mr-1"> %end;%nn; %else; %if;xxx.is_male; ♂ %elseif;xxx.is_female; ♀ %else; ⚲ %end;%nn; %end; %end; %define;link(aaa,xxx,nnn) %if;(evar.cgl="on")xxx%else;xxx%end; %end; %define;table_header() %reset_count; %if;(evar.num="on") № %incr_count; %end; [*person/persons]0 %incr_count; %if;(evar.birth="on" and evar.birth_place="on") [*birth] %incr_count;%incr_count; %elseif;(evar.birth="on" and evar.birth_place!="on") [*date of birth] %incr_count; %elseif;(evar.birth!="on" and evar.birth_place="on") [*birth place]0 %incr_count; %end; %if;(evar.baptism="on" and evar.baptism_place="on") [*baptism] %incr_count;%incr_count; %elseif;(evar.baptism="on" and evar.baptism_place!="on") [*date of baptism] %incr_count; %elseif;(evar.baptism!="on" and evar.baptism_place="on") [*baptism place] %incr_count; %end; %if;(evar.marr="on" and evar.t="H") [*spouse/spouses]1 %incr_count; %end; %if;((evar.marr_date="on" and evar.marr_place="on") or (evar.marr_date="on" and evar.child="on") or (evar.marr_place="on" and evar.child="on")) %nn; [*marriage/marriages]0%nn; %if;(evar.marr_date="on" and evar.marr_place="on" and evar.child="on") %incr_count;%incr_count;%incr_count;%else;%incr_count;%incr_count;%end; %elseif;(evar.marr_date="on" and evar.marr_place!="on" and evar.child!="on") [*date of marriage] %incr_count; %elseif;(evar.marr_date!="on" and evar.marr_place="on" and evar.child!="on") [*marriage place] %incr_count; %elseif;(evar.marr_date!="on" and evar.marr_place!="on" and evar.child="on") %incr_count; %end; %if;(evar.death="on" and evar.death_place="on") [*death] %incr_count;%incr_count; %elseif;(evar.death="on" and evar.death_place!="on") [*date of death] %incr_count; %elseif;(evar.death!="on" and evar.death_place="on") [*death place] %incr_count; %end; %if;(evar.burial="on" and evar.burial_place="on") [*burial] %incr_count;%incr_count; %elseif;(evar.burial="on" and evar.burial_place!="on") [*date of burial] %incr_count; %elseif;(evar.burial!="on" and evar.burial_place="on") [*burial place] %incr_count; %end; %if;(evar.age="on") [*age] %incr_count; %end; %if;(evar.occu="on") [*occupation/occupations]1 %incr_count; %end; %if;(evar.birth="on" and evar.birth_place="on") [*date/dates]0 [*place] %end; %if;(evar.baptism="on" and evar.baptism_place="on") [*date/dates]0 [*place] %end; %if;((evar.marr_date="on" and evar.marr_place="on") or (evar.marr_date="on" and evar.child="on") or (evar.marr_place="on" and evar.child="on")) %if;(evar.marr_date="on") [*date/dates]0%nn; %end; %if;(evar.marr_place="on") [*place]%nn; %end; %if;(evar.child="on") %nn; %nn; %end; %end; %if;(evar.death="on" and evar.death_place="on") [*date/dates]0 [*place] %end; %if;(evar.burial="on" and evar.burial_place="on") [*date/dates]0 [*place] %end; %end; %define;date_popup(xxx,yyy) %let;symb;%if;("yyy"="birth")°%elseif;("yyy"="death" and xxx.is_dead)†%end;%in; %if;(evar.yyy="on" and famx=1) %if;(wizard and not cancel_links) %nn; %if;(xxx.has_yyy_date)%xxx.slash_yyy_date;%else;%symb;%end;%nn; %else; %if;xxx.has_yyy_date;%xxx.slash_yyy_date;%else;%symb;%end; %end; %end; %end; %define;place_popup(xxx,yyy) %if;(evar.yyy_place="on" and famx=1) %nn; %if;xxx.has_yyy_place;%xxx.yyy_place;%end; %end; %end; %( si t=H on active rowspan pour les données de l’individu et du couple si t=I on affiche pas les données xxx est la personne concernée (self) zzz est lui même si yyy="desc", ou son conjoint si yyy="spous" %) %define;table_row(xxx, prefx, fff, fam_cnt, ch_cnt, ch_count, yyy, zzz, ddd, nb_ch_desc, implx) %let;famx;%if;(not has_families or evar.t="I")1%else;fam_cnt%end;%in; %let;zro;%if;("prefx"="-1")0%else;1%end;%in; %let;labl;%if;(zro=1)%if;("prefx"!="")prefxfff.%end;ch_count%else;1%end;%in; %let;labl0;%if;(zro=1)%if;("prefx"!="")prefxfff.%end;ch_cnt%else;1%end;%in; %let;rowspan;%if;(nb_families>1 and evar.t="H" and (evar.marr="on" or evar.marr_date="on" or evar.marr_place="on" or evar.child="on")) rowspan="%xxx.nb_families;"%end;%in; %( numéro d'Aboville %) %if;(evar.num="on" and famx=1) %if;("yyy"="desc") %if;(labl!=1 and not cancel_links) %nn; %end; %if;("ch_cnt"="1" and not cancel_links)%end; %labl;
%if;("ch_cnt"="1" and not cancel_links)%end; %elseif;(evar.t="I") %if;(not cancel_links) %nn; %end; %if;(has_families and nb_families>1)%apply;letter(family_cnt)%else; %end;%nn; %if;(not cancel_links) %end; %end; %end; %( Descendant et son conjoint en mode I %) %if;(famx=1) %if;("yyy"="desc") %apply;add_in_sorted_list(xxx.index) %apply;add_in_sorted_listc(xxx.index)
%apply;image_MF("xxx") %apply;link%with;%xxx.access;%and;%xxx;%and;%xxx.index;%end; %if;(evar.title="on" and xxx.title!=""), %xxx.title;%end;
%if;(evar.image!="off" and xxx.has_image) xxx %end;
%elseif;(evar.t="I") %apply;add_in_sorted_list(xxx.index) %apply;add_in_sorted_listc(xxx.index)
%if;(evar.image!="off" and xxx.has_image) xxx %else;
%end;
%apply;image_MF("xxx") %apply;link%with;%xxx.access;%and;%xxx;%and;%xxx.index;%end; %if;(evar.title="on" and xxx.title!=""), %xxx.title;%end;
%end; %end; %( Date de naissance %) %apply;date_popup%with;xxx%and;birth%end; %( Lieu de naissance %) %apply;place_popup%with;xxx%and;birth%end; %( Date de baptême %) %apply;date_popup%with;xxx%and;baptism%end; %( Lieu de baptême %) %apply;place_popup%with;xxx%and;baptism%end; %( En mode H, conjoints %) %if;(evar.marr="on" and evar.t="H") %if;(xxx.nb_families=0) %else; %foreach;xxx.family; %if;(family_cnt=fam_cnt) %nn; %apply;add_in_sorted_list(spouse.index) %if;(zzz.nb_families>1)%apply;letter(family_cnt)%end; %apply;image_MF("spouse") %apply;link%with;%spouse.access;%and;%spouse;%and;%spouse.index;%end; %end; %end; %end; %end; %( Date de mariage %) %if;(evar.marr_date="on") %if;(xxx.nb_families=0) %else; %let;rowspan; rowspan="%if;(evar.t="I" and zzz.nb_families=1)2%else;1%end;"%in; %foreach;xxx.family; %if;((nb_families=1 and "yyy"="desc") or (nb_families>1 and ((xxx.spouse=zzz and (ddd=family.index)) or (xxx=zzz and family_cnt=fam_cnt and evar.t="H")))) %if;(wizard and not cancel_links) %nn; %if;(slash_marriage_date != "")%slash_marriage_date;%else; %end; %nn; %else; %slash_marriage_date; %end; %end; %end; %if;(evar.t="I" and nb_families>1 and "yyy"="desc") %end; %end; %end; %( Lieu de mariage %) %if;(evar.marr_place="on") %if;(xxx.nb_families=0) %else; %let;rowspan; rowspan="%if;(evar.t="I" and zzz.nb_families=1)2%else;1%end;"%in; %foreach;xxx.family; %if;((nb_families=1 and "yyy"="desc") or (nb_families>1 and ((xxx.spouse=zzz and ddd=family.index) or (xxx=zzz and family_cnt=fam_cnt and evar.t="H")))) %nn; %if;(marriage_place != "") %marriage_place;%nn; %end; %end; %end; %if;(evar.t="I" and nb_families>1 and "yyy"="desc") %end; %end; %end; %reset_count2; %( Calcul nombre total d'enfants %) %if;(zzz.has_families) %foreach;zzz.family; %if;zzz.has_children; %foreach;zzz.child; %incr_count2; %end; %end; %end; %end; %let;nb_ch_tot_desc;%count2;%in; %reset_count2; %( Calcul nombre d'enfants de l'époux %) %if;(evar.t="I") %if;(xxx.has_families) %foreach;xxx.family; %if;xxx.has_children; %foreach;xxx.child; %incr_count2; %end; %end; %end; %end; %else; %if;(xxx.spouse.has_families) %foreach;xxx.spouse.family; %if;xxx.spouse.has_children; %foreach;xxx.spouse.child; %incr_count2; %end; %end; %end; %end; %end; %let;nb_ch_tot_spous;%count2;%in; %( Nombre d'enfants %) %if;(evar.child="on") %if;(xxx.nb_families=0) %else; %let;rowspan; rowspan="%if;(evar.t="I" and zzz.nb_families=1)2%else;1%end;"%in; %foreach;xxx.family; %if;((nb_families=1 and "yyy"="desc") or (nb_families>1 and ((xxx.spouse=zzz and (ddd=family.index)) or (xxx=zzz and family_cnt=fam_cnt and evar.t="H")))) %nn; %if;(nb_children>0 and not cancel_links)%end; %if;("yyy"="desc" and evar.t="I") %nb_ch_tot_desc;%if;(nb_ch_tot_desc!=nb_ch_tot_spous)/%nb_ch_tot_spous;%(!! nb_ch_tot_spous is wrong: gives father total of children?! %)%end; %else; nb_ch_desc%if;(nb_ch_desc!=nb_ch_tot_spous)/%nb_ch_tot_spous;%end; %end; %if;(nb_children>0 and not cancel_links)%end; %end; %end; %if;(evar.t="I" and nb_families>1 and "yyy"="desc") %nb_ch_tot_desc; %end; %end; %end; %( Date du décès %) %apply;date_popup%with;xxx%and;death%end; %( Lieu de naissance %) %apply;place_popup%with;xxx%and;death%end; %( Date de la sépulture %) %apply;date_popup%with;xxx%and;burial%end; %( Lieu de la sépulture %) %apply;place_popup%with;xxx%and;burial%end; %( Âge %) %if;(evar.age="on" and famx=1) %nn; %if;xxx.computable_death_age;%xxx.death_age;%end;%nn; %if;xxx.computable_age;%xxx.age;%end;%nn; %end; %( Profession %) %if;(evar.occu="on" and famx=1) %nn; %if;(xxx.has_occupation) %xxx.occupation%nn; %end; %end; %end; %define;one_child(xxx, prefx, fff, ch_cnt) %incr_count; %( Les enfants d'une personne sont numérotés de 1 à n indépendamment du nombre de mariages %) %let;prfx;%if;("prefx"="-1")%else;prefx%end;%in; %if;(evar.t="A")
%prfx; %apply;image_MF("xxx") %apply;link%with;%xxx.access;%and;%xxx.first_name; %xxx.surname;%nn;%and;%xxx.index;%end;%nn; %xxx.title;%nn; %if;(has_families) %foreach;family; %if;(wizard and not cancel_links) %if;(slash_marriage_date != "")%slash_marriage_date;%else;%end;%nn; %else; %slash_marriage_date;%nn; %end; %apply;image_MF("xxx.spouse") %apply;link%with;%xxx.spouse.access;%and;%xxx.spouse.first_name; %xxx.spouse.surname;%and;%xxx.index;%end;%nn; %xxx.spouse.title; %end; %end; %elseif;xxx.has_families; %if;(evar.t="H") %foreach;family; %let;ifam;%family.index;%in; %reset_count1; %foreach;sorted_listb_item; %if;(item.1=ifam) %incr_count1; %end; %end; %reset_count2; %foreach;sorted_listc_item; %if;(item.1=index) %incr_count2; %end; %end; %if;(count1=0 or count2=0 or evar.implx="") %apply;table_row("xxx", prfx, fff, family_cnt, "ch_cnt", count, "desc", "xxx", family.index, nb_children, count1+count2) %end; %apply;add_in_sorted_listb(ifam) %end; %elseif;(evar.t="I") %reset_count1; %foreach;sorted_listc_item; %if;(item.1=index) %incr_count1; %end; %end; %if;(count1=0 or evar.implx="") %apply;table_row("xxx", prfx, fff, family_cnt, "ch_cnt", count, "desc", "xxx", 0, nb_children, count1) %end; %apply;add_in_sorted_listc(index) %if;(evar.marr="on" or evar.marr_date="on" or evar.marr_place="on" or evar.child="on") %foreach;family; %let;ifam;%family.index;%in; %reset_count1; %foreach;sorted_listb_item; %if;(item.1=ifam) %incr_count1; %end; %end; %reset_count2; %foreach;sorted_listc_item; %if;(item.1=spouse.index) %incr_count2; %end; %end; %if;(count1=0 or count2=0 or evar.implx="") %apply;table_row("xxx.spouse", prfx, fff, family_cnt, "ch_cnt", count, "spous", "xxx", family.index, nb_children, count1+count2) %end; %apply;add_in_sorted_listb(ifam) %end; %end; %end; %else; %reset_count1; %foreach;sorted_listc_item; %if;(item.1=xxx.index) %incr_count1; %end; %end; %if;(count1=0 or evar.implx="") %apply;table_row("xxx", prfx, fff, "", "ch_cnt", count, "desc", "xxx", 0, 0, count1) %end; %apply;add_in_sorted_listc(xxx.index) %end; %end; %define;families_of_one_p(xxx, prefx) %reset_count; %foreach;family; %let;fam;%if;(evar.num="on" and nb_families>1)%apply;letter(family_cnt)%end;%in; %(if;(nb_children>0)one family: #labl%end;%) %foreach;xxx.child; %apply;one_child("xxx", "prefx", "fam", child_cnt) %end; %end; %end; %( d’Aboville %) %define;list_row(xxx, prefx, fam_cnt, ch_cnt) %let;fam;%if;(fam_cnt>0)%apply;letter(fam_cnt)%end;%in; %if;("prefx"!="")
prefx.%end; %sp;%apply;image_MF("xxx") %apply;link%with;%xxx.access;%and;%xxx.first_name; %xxx.surname;%and;%xxx.index;%end;%nn; %if;(xxx.title!=""), %xxx.title;%end; %if;(has_families) %foreach;family; %sp;&%if;(nb_families>1)%apply;letter(family_cnt)%end; %if;(wizard and not cancel_links) %if;(marriage_date.year != "")%marriage_date.year;%else;%end;%nn; %else; %marriage_date.year;%nn; %end; %sp;%apply;image_MF("xxx.spouse") %apply;link%with;%xxx.spouse.access; %and;%xxx.spouse.first_name; %xxx.spouse.surname;%and;%xxx.spouse.index; %end; %if;(xxx.spouse.title!=""), %xxx.spouse.title;%end; %(  (%xxx.nb_children; %if;(1=0 or 1=0 and xxx.spouse.has_families and xxx.spouse.nb_children0)%apply;letter(fam_cnt)%end;%in; %let;nnpref;%npref;%fam;%in; %if;(lv1)%family_cnt;%else;0%end;%in; %if;(has_children) %foreach;child; %let;num;%if;(npref!="").%end;%child_cnt;%in; %let;nnnpref;%nnpref;%num;%in; %apply;one_person("child", lv+1, max_l, nnnpref, nfam, child_cnt) %end; %end; %end; %end; %else; %apply;list_row("xxx", nnpref, fam_cnt, ch_cnt) %end; %end; %( Parcours de l'arbre, horizontal, niveau par niveau descendant %) %( A chaque niveau, prefx et faml (lettre) définissent le préfixe d'Aboville %) %define;one_level(xxx, lv, max_l, prefx, faml, ch_cnt) %let;npref;%if;("prefx"!="")prefxfaml.%end;ch_cnt%nn;%in; %if;(lv1)%apply;letter(family_cnt)%end;%in; %foreach;child; %apply;one_level("child", lv+1, max_l, npref, fam, child_cnt) %end; %end; %end; %else; %apply;families_of_one_p("self", npref) %end; %end; %define;desc_count(xxx) %foreach;descendant_level; %if;(level=xxx)%number_of_descendants;%end; %end; %end; %define;desc_count_l(xxx) %foreach;descendant_level; %if;(level=xxx)%number_of_descendants_at_level;%end; %end; %end; %( Main %) %if;(evar.t="A") %let;nb_col;1%in; %apply;one_person("self", 0, evar.v, "", 0, 0) %else; %reset_count; %apply;table_header() %let;nb_col;%expr(count)%in; %let;max;%evar.v;%in; %reset_count; %empty_sorted_list; %( persons %) %empty_sorted_listb; %( families %) %empty_sorted_listc; %( descendants %) %if;(evar.only!="on") %apply;one_child("self", "-1", "", 1) %for;lev;0;max; %if;(evar.gen="on" and lev %end; %apply;one_level("self", 0, lev, "", "", 1) %end; %else; %if;(evar.v=0) %apply;one_child("self", "-1", "", 1) %else; %apply;one_level("self", 0, evar.v-1, "", "", 1) %end; %end; %end;
[*generation/generations]0 %expr(lev+1) %apply;desc_count_l(lev+1)%nn;
%reset_count; %foreach;sorted_list_item; %incr_count; %end;

[*total][:] %if;(evar.only="on")%apply;desc_count_l%with;%evar.v;%end; [descendants] (%count; [person/persons]1 [with] [spouse/spouses]1) %else;%apply;desc_count(max_desc_level) [descendants] %if;(evar.marr="on" or evar.t="I")(%count; [person/persons]1 [with root, spouses and unknowns])%end; %end;.

%include;trl %include;copyr %include;js