%define;display_person(xxx) %if;(not cancel_links)
%end; %if;(xxx.has_sosa)%apply;display_sosa("xxx")
%end; %if;(cancel_links or xxx.is_restricted) %if;(xxx.public_name!="")%xxx.public_name; %else;%xxx.first_name; %end; %xxx.surname; %else; %if;(xxx.public_name!="")%xxx.public_name; %else;%xxx.first_name; %end; %xxx.surname; %end;%nn; %if;(wizard and not cancel_links) %end; %nn; %if;(xxx.dates!="")%xxx.dates;%nn; %elseif;(wizard and not cancel_links)-%nn; %elseif;(cancel_links)
%end;%nn;
%nn; %if;(wizard and not cancel_links)
%end;
%if;(evar.image!="off") %if;xxx.has_image; %if;not cancel_links; %nn; %end; [image/images]0%nn; %if;not cancel_links;%end; %elseif;(bvar.default_image="yes") %if;(wizard and not cancel_links) %nn; %end; [missing image] %if;(wizard and not cancel_links)%end; %else; %bvar.default_image_no; %end; %end;
%end; %define;add_to_count(nnn) %for;i;0;nnn;%incr_count;%end; %end; %define;nb_column(nnn,vvv) %( Width of the descendnace of one person %) %if;has_families; %if;(vvv=0) %let;mmm;%if(nb_families>1)%nb_families;%else;1%end;%in; %apply;add_to_count(mmm) %else; %foreach;family; %apply;fam_nb_column(nnn,vvv) %end; %end; %else; %incr_count; %end; %end; %define;fam_nb_column(nnn,vvv) %( Width of the descendnace of one family %) %if;has_children; %foreach;child; %apply;nb_column(nnn,vvv-1) %end; %else; %incr_count; %end; %end; %( Person: Root if(nb_families>1): | Hbarspouse: ----------------------- & & Spouse: Spouse1 Spouse2 if(has_children): | | Hbarchild: ------------ | if(not baseindex): | | | Person: Child1 Child2 Child3 %) %( xxx=descendant, lll=current level (recursion), nnn=target level, sss="skip" or not %) %( ttt=text, fff=position (left/right/cenetr/none), www= colspan %) %define;descendants_at_level(xxx,lll,nnn,ttt,fff,www) %(one level of descendants (%xxx.first_name;,lll,nnn,ttt,fff,www)
%) %(compute family position %) %if;(lll>evarv) %( we are done %) %elseif;(lll<=nnn) %if;(lll=nnn and "xxx"!="") %( Print information at level lll %) %if;("ttt"="hbarc" and lll>0 and "xxx"!="self") %( Horizontal bar linking childrens%) %if;("fff"="none") %else;
%if;("fff"="full" or "fff"="right")
%end; %end; %elseif;("ttt"="vbar" and lll>0 and "xxx"!="self") %if;(nb_children>0) │  %else;   %end; %elseif;("ttt"="person" and "xxx"!="") %if;(xxx.index!=baseindex)│%end;%apply;display_person("xxx") %if;(xxx.has_families) %reset_count1; %foreach;family;%if;(nb_children>1)%incr_count1;%end;%end; %(count1=has children%) %if;(evar.spouse!="on" and nnn0)│%end; %end;   %elseif;("ttt"="skip") %end; %if;has_families; %reset_count2; %reset_count1; %foreach;family;%if;(nb_children>1)%incr_count1;%end;%end; %foreach;family; %incr_count2; %reset_count; %apply;fam_nb_column(0,evarv+1) %let;fcount;%expr(2*count-1)%in; %let;fmpos;%nn; %if;(nb_families>1)%nn; %if;(family_cnt=1)right%nn; %elseif;(family_cnt=nb_families)left%nn; %else;center%nn; %end;%nn; %else;none%nn; %end;%nn; %in; %if;("ttt"="hbars") %if;(fmpos="right")
%elseif;(fmpos="center")
%elseif;(fmpos="left")
%elseif;(fmpos="none") %end; %(count1=has children%) %if;(count1>0 or evar.spouse="on") %if;(not cancel_links) &%if;(nb_families>1)%count2;%end; %else;& %end; %end; %if(evar.marriage="on" and (evar.spouse="on" or count1>0)) %if;(family.marriage_date.year!="") %marriage_date.year;%else; -%end; %end;   %elseif;("ttt"="spouse") %apply;display_person("spouse") %if;(has_children)│%end;   %elseif;("ttt"="vbars") %if;(nb_children>0) │ %else; %end; %end; %end; %else; %if;("ttt"="spouse" or "ttt"="vbars" or "ttt"="hbars") %end; %end; %elseif;("ttt"!="skip") %( Continue the recursion %) %if;has_families; %foreach;family; %if;has_children; %foreach;child; %let;chpos;%nn; %if;(nb_children>1)%nn; %if;(child_cnt=1)right%nn; %elseif;(child_cnt=nb_children)left%nn; %else;full%nn; %end;%nn; %else;none%nn; %end;%nn; %in; %reset_count; %apply;nb_column(0,evarv) %let;pcount;%expr(2*count-1)%in; %apply;descendants_at_level("child",lll+1,nnn,"ttt",chpos,pcount) %end; %else; %apply;descendants_at_level("none",lll+1,nnn,"skip","",0) %end; %end; %else; %( If no family, count 1 slot %) %end; %elseif;("ttt"="skip") %( Continue recursion to level nnn even if no child or no family %) %apply;descendants_at_level("none",lll+1,nnn,"skip","",0) %end; %end; %end; %let;evarv;%if;(evar.v!="")%evar.v;%else;3%end;%in; %let;evarborder;%if;(evar.border="" or evar.border="0")0%else;1%end;%in; %let;baseindex;%index;%in;

[*descendants tree]

%if;(has_parents and father.surname!="?" and father.first_name!="?") [*father/mother]0 %end;
%if;has_siblings; %foreach;father.child; %if;is_sibling_before; < %end; %end; [*siblings] %foreach;father.child; %if;is_sibling_after; > %end; %end; %end;
%if;(has_parents and mother.surname!="?" and mother.first_name!="?") [*father/mother]1 %end;
%reset_count; %apply;nb_column(0,evarv+1) %let;icount;%expr(2*count-1)%in; %for;v;0;evarv; %( For each level, display all 6 kinds of data (except hbarc and vbar at level 0) %) %if;(v!=0) %apply;descendants_at_level("self",0,v,"hbarc","center",icount) %end; %apply;descendants_at_level("self",0,v,"person","center",icount) %if;(v %apply;descendants_at_level("self",0,v,"hbars","center",icount) %if;(evar.spouse="on") %apply;descendants_at_level("self",0,v,"spouse","center",icount) %end; %end; %end;