%nn; [*list/list (ancestors)] [of] [person/persons]0%if;(evar.surn!="") [by] [surname/surnames]0%end; [by] [place]%nn;

%include;css %include;hed %message_to_wizard;
%include;perso_utils %define;get_ip(n) %evar.in; %end; %define;get_var(vv, i) %evar_cur.vv.i; %end; %define;get_pl(i) %evar.pi; %end; %define;get_sub(nn,ss) %substr_start.nn.ss; %end; %( %qvar.index.marriage_places; renvoie une chaine avec les places de mariage, séparées par des | %) %define;get_marriage(myindex) %qvar.myindex.marriage_places; %end; %define;get_value(myindex,param) %qvar.myindex.param; %end; %let;nb;%evar.nb;%in;

# [*list/list (ancestors)] [of] [person/persons]1%if;(evar.surn!="") [by] [surname/surnames]0%end; [by] [place]

%nn; %nn;
%if;(nb!=1)
%nn;
%end;
%let;opt;%nn; %if;(evar.bi="on")&bi=on%end;%nn; %if;(evar.ba="on")&bp=on%end;%nn; %if;(evar.ma="on")&ma=on%end;%nn; %if;(evar.de="on")&de=on%end;%nn; %if;(evar.bu="on")&bu=on%end;%nn; %if;(evar.long="on")&long=on%end;%nn; %if;(evar.f_sort="on")&f_sort=on%end;%in; %let;k;%if;(evar.k!="")%evar.k;%end;%in; %let;nbs;%if;(evar.nbs!="")&nbs=%evar.nbs;%else;nbs=3%end;%in; %define;book_of(xx)[*book of %s:::xx]%end;
%if;(evar.surn!="")[*surname/surnames]0[:] %evar.surn;.%end;
[*event/events]1%if;(evar.date_sort="on") %sp;[sorted by]%sp; %if;(evar.date_sort="on")[date/dates]1%nn; %else;[sort by/branch/alphabetic order]2 ([first name/first names]1)%nn; %end; %end;[:]%sp; %define;evt(vv,tt,ii) %if;("vv"!="bi"), %end;tt ii%nn; %end; %apply;evt("bi",[birth],"N") %apply;evt("ba",[baptism],"B") %apply;evt("ma",[marriage event],"M") %apply;evt("de",[death],"D") %apply;evt("bu",[burial],"S").
%define;nbmds(xx,yy,tt,kk) %if;(xx!="" and xx="kk")yy%nn; %else;%if;("tt"=1) %end; %end; %end; %define;nbmds_m(xx,yy,tt,kk) %if;(xx!="" and ("kk" is_substr xx or xx="kk"))yy%nn; %else;%if;("tt"=1) %end; %end; %end; %define;tags(xx,tt,ss) %let;myindex;xx%in; %let;birthplace;%apply;get_value(myindex, "birth_place_raw")%in; %let;baptismplace;%apply;get_value(myindex, "baptism_place_raw")%in; %let;marriageplace;%apply;get_marriage(myindex)%in; %let;deathplace;%apply;get_value(myindex, "death_place_raw")%in; %let;burialplace;%apply;get_value(myindex, "burial_place_raw")%in; %apply;nbmds("birthplace","N","tt","ss")%nn; %apply;nbmds("baptismplace","B","tt","ss")%nn; %apply;nbmds_m("marriageplace","M","tt","ss")%nn; %apply;nbmds("deathplace","D","tt","ss")%nn; %apply;nbmds("burialplace","S","tt","ss")%nn; %end; %let;max_rlm_nbr;%if;(evar.max_rlm_nbr!="")%evar.max_rlm_nbr;%elseif;(bvar.max_rlm_nbr!="")%bvar.max_rlm_nbr;%else;80%end;%in; %( RLM commence a i1 et non i0 on décale i(0) en i(nb), à défaut on pourrait aussi tout décaller à i+1 %) %if;(nb < max_rlm_nbr) %if;(nb!=1) %nn; [*multi relations graph] (%nb;)%nn; %end; %else; [*multi relations graph] (%nb;)
[*rlm_nbr too large] %end; %empty_sorted_list %for;i;0;nb; %let;myindex;%apply;get_ip(i)%in; %let;first_name;%apply;get_value(myindex, "first_name")%in; %let;surname;%apply;get_value(myindex, "surname")%in; %let;occ;%apply;get_value(myindex, "occ")%in; %let;dates;%apply;get_value(myindex, "dates_sort")%in; %let;s;%apply;get_var("p", i)%in; %let;so;%if;(s="")%k;%else;%s;%end;%in; %if;(evar.date_sort="on") %apply;add_in_sorted_list%with; %so;%and; %dates;%and; %myindex;%and; %i;%and; %end; %else; %apply;add_in_sorted_list%with; %so;%and; %if;(evar.surn="")%surname;%end;%first_name;%occ;%and; %myindex;%and; %i;%and; %end; %end; %end;
%foreach;sorted_list_item; %let;sub;%apply;get_sub(5,item.1)%in; %( was item.2 %) %if;(item.1!=prev_item.1 or prev_item.1="")
- %if;(k!="")%item.1;%end; %if;wizard; %end; %end;
  %let;myindex;%item.3;%in; %let;so;%item.1;%in; %let;access;%apply;get_value(myindex, "access")%in; %let;sex;%apply;get_value(myindex, "sex")%in; %apply;tags(myindex,"1",item.1)%nn; %nn; %apply;get_value(myindex, "first_name")%sp; %apply;get_value(myindex, "surname")%nn; %( Occurence number is hidden of those lists for the moment %let;occ;%apply;get_value(myindex, "occ")%in;%nn; %if;(occ!="0")%sp;%[%occ;%]%end;%)%nn; %if;(evar.dates="on") %apply;get_value(myindex, "dates")%nn; %end; %if;(evar.parents="on") %let;fa;%apply;get_value(myindex, "father")%in; %let;mo;%apply;get_value(myindex, "mother")%in; %if;(fa!="" or mo!=""), %sp; %let;fa;%if;(fa="")?%else;%fa;%end;%in; %let;mo;%if;(mo="")?%else;%mo;%end;%in; %apply;a_of_b%with; %if;(sex=0)[son/daughter/child]0 %elseif;(sex=1)[son/daughter/child]1 %else;[son/daughter/child]2%end; %and;%fa; [and] %mo; %end; %end; %end;
  %end;
%base_trailer; %include;copyr
%include;js