%define;a_tree_line() %if;(not is_first) %foreach;cell; %if;(not is_first)   %end; %nn; %if;(cell.is_empty or cell.is_top) %else;│%end; %end; %end; %foreach;cell; %if;(not is_first)   %end; %nn; %if;(cell.is_empty) %nn; %else; %if;(evar.image!="off" and cell.person.has_image) %if;(evar.cgl != "on")%end; [image/images]0%nn; %if;(evar.cgl != "on")%end;
%end; %apply;short_display_person_tree("cell.person")%nn; %if;cell.person.has_nobility_titles;
%cell.person.title;%end; %end; %end; %if;(not is_last) %foreach;cell; %if;(not is_first) %nn; %if;cell.is_right; %if;(evar.marriage = "on") %if;(wizard and not cancel_links)%end; %if;(cell.family.marriage_date.year!= "") %if;(cell.family.marriage_date.prec = "<") /%cell.family.marriage_date.year;%nn; %elseif;(cell.family.marriage_date.prec = ">") %cell.family.marriage_date.year;/%nn; %elseif;(cell.family.marriage_date.prec = "│" or cell.family.marriage_date.prec = "..") %cell.family.marriage_date.year;%nn; %else; %cell.family.marriage_date.prec;%cell.family.marriage_date.year;%nn; %end; %elseif;(wizard and not cancel_links)-%nn; %end; %if;(wizard and not cancel_links)%end; %else;  %end; %else;  %end; %end; %nn; %if;cell.is_empty; %nn; %elseif;(cancel_links)│%nn; %else; %nn; %end; %end; %foreach;cell; %if;(not is_first) %nn; %if;(cell.is_right)
%nn; %else;%( %)%end; %end; %nn; %if;cell.is_empty;%( %)%nn; %elseif;cell.is_left;
%nn; %elseif;cell.is_right;
%nn; %else;%(│%)%end; %end; %end; %end; %define;male_line(xx, yy) %if;(yy > 0) %if;(xx.has_parents)%apply;male_line("xx.father", yy - 1)%end; %xx;%xx.title;%xx.dates; %if;(evar.image!="off" and xx.has_image)
%if;(evar.cgl != "on")%end; [image/images]0 %if;(evar.cgl != "on")%end; %end; %if;("xx" != "self")

%end; %end;%nl; %end; %define;female_line(xx, yy) %if;(yy > 0) %if;(xx.has_parents)%apply;female_line("xx.mother", yy - 1)%end; %xx;%xx.title;%xx.dates; %if;(evar.image!="off" and xx.has_image)
%if;(evar.cgl != "on")%end; [image/images]0%nn; %if;(evar.cgl != "on")%end; %end; %if;("xx" != "self")

%end; %end;%nl; %end; %if;(evar.t = "T")%nn;
%nn; //
%end; %define;tree(xx) %foreach;ancestor_tree_line(xx) %apply;a_tree_line() %end; %end; %if;has_parents; %let;evarv;%if;(evar.v!="")%evar.v;%else;3%end;%in; %let;maxlev;%apply;min%with; %if;(bvar.max_anc_tree!="")%bvar.max_anc_tree;%else;120%end;%and; %if;(bvar.max_anc_level!="")%bvar.max_anc_level;%else;120%end;%and; %expr(static_max_anc_level)%end;%in; %let;maxv;%if;(maxlev<10 or maxlev=evarv+5 and evarv>5)%expr(evarv+5) %else;10%end;%in; %let;minv;%if;(maxlev>9 and maxlev9 and evarv>5)%expr(evarv-4) %else;1%end;%in; %(minv %minv; < evarv %evarv; < maxv %maxv; (maxlev %maxlev;)%)

%if;(evar.t="A")[*male line/female line]0%nn; %elseif;(evar.t="C")[*male line/female line]1%nn; %else[*ascendants tree]%end;

%if;not cancel_links;
%if;(maxlev>9 and evarv>5)  -⁵  - %end; %for;i;minv;maxv; %i; %end; %if;(maxlev>9 and maxlev-evarv>=5)  +  +⁵ %end;
%if;(evarv>1)
A C T
%end; %if;(evarv>1 and evar.t="T") %end;
%end;
%if;(evar.t="T" and evar.t1="m") %include;modules/arbre_9gen %elseif(evar.t = "A" or evar.t = "C") %if;(evar.t = "A") %elseif;(evar.t = "C") %end; %else; %apply;tree(evarv) %end;
%apply;male_line("self", evarv)
%apply;female_line("self", evarv)
%end;