%nn; %if;(e.t = "F")- [*surnames branch] -%nn; %else %apply;a_of_b%with; %if;(e.t = "M")[*missing ancestors]%else;[*ancestor/ancestors]1%end; %and; %if;(public_name != "")%public_name;%else;%first_name;%end; %if;(qualifier != "") %qualifier;%end; %sp;%surname; %end; %end;

%include;css %include;hed %message_to_wizard;
%include;perso_utils %if;not cancel_links; %include;menubar %include;buttons %end; %let;lvl; %if;(b.max_anc_level = "")%apply;min(e.v, max_anc_level, 7) %else;%apply;min(e.v, max_anc_level, b.max_anc_level)%end; %in;

### %nn; %if;(e.t = "F") %apply;a_of_b%with;[*surnames branch]%and; %if;(public_name != "")%public_name;%else;%first_name;%end; %if;(qualifier != "") %qualifier;%end; %sp;%surname; %if;(alias != "") (%alias;)%end;
%end; %elseif;(e.t = "E") %apply;a_of_b%with;[*list eclair]%and; %if;(public_name != "")%public_name;%else;%first_name;%end; %if;(qualifier != "") %qualifier;%end; %sp;%surname; %end; %else; %apply;a_of_b%with;[*ancestor/ancestors]1%and; %if;(public_name!="")%public_name;%else;%first_name;%end; %surname; %end; %if;(e.t="D")[up to] %p_of_index.1; %end; %end;%nn; %if;(e.t="H" or e.t="F" or e.t="E") %apply;togena(lvl)%end;

%define;ancestors_by_list(xx, nnn) %if;(xx.has_parents and nnn > 0)

- %xx.father;%xx.father.title;%xx.father.dates;%nl; %apply;ancestors_by_list("xx.father", nnn - 1)
- %xx.mother;%xx.mother.title;%xx.mother.dates;%nl; %apply;ancestors_by_list("xx.mother", nnn - 1)

%end; %end; %define;anc_row_hr(pp, vv, zz, ss1, ss2, ss3) %(if;("pp"="self")
%end; %) %if;(vv >= 0 and ((pp.surname is_substr e.surname1) or (pp.surname is_substr e.surname2) or (pp.surname is_substr e.surname3)))%) %if;(vv>=0) %if;(pp.has_parents and (pp.sosa.v=zz or e.implx!="on")) %apply;anc_row_hr("pp.father", vv-1, zz*2, "ss1 ", "ss1 ┌──╴", "ss1 | ") %end; %( or not browsing_with_sosa_ref à replacer ! %) ss2%nn; %nn; %if;(not cancel_links)%pp;%nn; %else;%pp;%end;%pp.title;%pp.dates;%nn; %if;(pp.sosa.v!=zz and e.force!="on") %if;(not cancel_links) %nn; %sp;(==)%sp; %else;%nn; %sp;(==)%sp; %end; %end;
%if;(pp.has_parents and (pp.sosa.v=zz or e.implx!="on")) %apply;anc_row_hr("pp.mother", vv-1, zz*2+1, "ss3 | ", "ss3 └──╴", "ss3 ") %end; %end; %end; %define;input(xx) Filtre xx %end; %if;(e.v="" and e.v=0) [*specify::generation/generations]0. %else; %if;(e.t="L") %( by list %)

%apply;togena(xx).

%apply;ancestors_by_list("self", lvl) %elseif;(e.t="H") %( horizontal ascendency %)
[*filter by][:]%nn; %apply;input(1)%apply;input(2)%apply;input(3)%apply;input(4)%apply;input(5)
%if;(sosa="" and e.force!="on") [redefine] [Sosa] 1 [or] [continue] [without implex display] %else; %if;(e.force="on") %apply;anc_row_hr("self", lvl, 1, " ", "──╴", " ") %else; %apply;anc_row_hr("self", lvl, sosa.v, " ", "──╴", " ") %end; %end;
%elseif;(e.t="E") %( list eclair by alphabetic/place/date/ind/event order %) %empty_sorted_list; %foreach;ancestor_surname(e.v) %apply;add_in_sorted_list%with; %if;(e.sort="ind") -%ancestor.nb_ind; %elseif;(e.sort="evt") -%ancestor.nb_events; %elseif;(e.sort="plc") %ancestor.place; %elseif;(e.sort="date") %ancestor.date_begin.year; %else;%ancestor.surname_end; %end; %and;%ancestor.surname_end; %and;%ancestor.surname_begin; %and;%ancestor.place; %and;%ancestor.date_begin.prec; %and;%ancestor.date_begin.year; %and;%ancestor.date_end.prec; %and;%ancestor.date_end.year; %and;%ancestor.nb_ind; %and;%ancestor.nb_events; %end; %end;
%if;(not cancel_links)
[*sort by/date begin/alphabetic order/nb individuals/nb events]0 [sort by/date begin/alphabetic order/nb individuals/nb events]2 [places] [sort by/date begin/alphabetic order/nb individuals/nb events]1 [sort by/date begin/alphabetic order/nb individuals/nb events]3 [sort by/date begin/alphabetic order/nb individuals/nb events]4
%end;

[*surname/surnames]0 | [*place] | [*date begin] | [*date end] | #[*person/persons]1 | #[*event/events]1
--- | --- | --- | --- | --- | ---
%foreach;sorted_list_item;
%item.2;%item.3 | %item.4; | %if;(item.5 = "<") /%item.6; %elseif(item.5 = ">") %item.6;/ %elseif;(item.5 = "|" or item.5 = "..") %item.6; %else; %item.5;%item.6; %end; | %if;(item.7 = "<") /%item.7; %elseif(item.7 = ">") %item.8;/ %elseif;(item.7 = "|" or item.7 = "..") %item.8; %else; %item.7;%item.8; %end; | %item.9; | %item.10;
%end;

%elseif;(e.t="F" and e.sort="on") %( surnames branch sorted by number of branches %) %empty_sorted_list; %reset_count; %foreach;ancestor_surname(e.v) %incr_count; %let;neg_ancestor_nb_times;%expr(0-ancestor.nb_times)%in; %apply;add_in_sorted_list( neg_ancestor_nb_times, ancestor.nb_times, ancestor.surname_end, ancestor.surname_begin, ancestor.sosa_access, ancestor.place, ancestor.date_begin.prec, ancestor.date_begin.year, ancestor.date_end.prec, ancestor.date_end.year) %end; %let;nb_gen;%apply;min(e.v, max_anc_level)%in; %if;(count > 100)

[*number of branches] : %foreach;sorted_list_item; %if;(prev_item.2 != item.2) %item.2; %end; %end;

%end;

[*help surname branch].

%if;(not cancel_links)

[*sort by/branch/alphabetic order]0 |  | [sort by/branch/alphabetic order]1 |  | [sort by/branch/alphabetic order]2

%end;

%if;(count <= 100)
- %nn;

  [*surname/surnames]0 | [*nb branches] | [*place] | [*date/dates]0
  --- | --- | --- | ---
  %end; %foreach;sorted_list_item; %if;(prev_item.2 != item.2 and count > 100)

- %nn; %item.2;

  [*surname/surnames]0 | [*nb branches] | [*place] | [*date/dates]0
  --- | --- | --- | ---
  %end;
  %item.3;%item.4; | %if;(e.cgl != "on") %item.2; %else; %item.2; %end; | %item.6; | %if;(item.7 = "<") /%item.8; %elseif(item.7 = ">") %item.8;/ %elseif;(item.7 = "|" or item.7 = "..") %item.8; %else; %item.7;%item.8; %end;%nn; -%nn; %if;(item.9 = "<") /%item.10; %elseif(item.9 = ">") %item.10;/ %elseif;(item.9 = "|" or item.9 = "..") %item.10; %else; %item.9;%item.10; %end;
  %if;(item.2 != next_item.2 and count > 100)

%end; %end; %if;(count <= 100) %end;

%elseif;(e.t="F") %( surnames branch %) %let;nb_gen;%apply;min(e.v, max_anc_level)%in;

[*help surname branch].

%if;(not cancel_links)

[*sort by/branch/alphabetic order]0 |  | [sort by/branch/alphabetic order]1 |  | [sort by/branch/alphabetic order]2

%end;

[*surname/surnames]0 | [*nb branches] | [*place] | [*date/dates]0
--- | --- | --- | ---
%foreach;ancestor_surname(e.v)
%ancestor.surname_end;%ancestor.surname_begin; | %if;(e.cgl != "on") %ancestor.nb_times; %else; %ancestor.nb_times; %end; | %ancestor.place; | %if;(ancestor.date_begin.prec = "<") /%ancestor.date_begin.year;%nn; %elseif;(ancestor.date_begin.prec = ">") %ancestor.date_begin.year;/%nn; %elseif;(ancestor.date_begin.prec = "|" or ancestor.date_begin.prec = "..") %ancestor.date_begin.year;%nn; %else; %ancestor.date_begin.prec;%ancestor.date_begin.year;%nn; %end; -%nn; %if;(ancestor.date_end.prec = "<") /%ancestor.date_end.year;%nn; %elseif;(ancestor.date_end.prec = ">") %ancestor.date_end.year;/%nn; %elseif;(ancestor.date_end.prec = "|" or ancestor.date_end.prec = "..") %ancestor.date_end.year;%nn; %else; %ancestor.date_end.prec;%ancestor.date_end.year;%nn; %end;
%end;

%end; %end; %base_trailer; %include;copyr
%include;js