%define;access_ind(nnn) %if;(cancel_links or nnn.is_restricted) %nnn; %else; %nnn;%nnn.title;%nn; %end; %nnn.dates;%nn; %end; %define;access(num,nnn) %if;(evars=1)num%end; %apply;display_sosa("nnn")%nn; %if;("num" = 1) %nnn;%nnn.title;%nnn.dates;
%else; %apply;access_ind("nnn")
%end; %end; %define;vbar(i, sx, mm, f_m) %let;m1;%expr(mm-1)%in; %let;n1;%if;(m1=1)2%elseif;(m1=2)4%elseif;(m1=3)8%elseif;(m1=4)16%elseif;(m1=5)32%end;%in; %let;n2;%expr(n1/2)%in; %let;n4;%expr(n1/4)%in; %let;n8;%expr(n1/8)%in; %let;n16;%expr(n1/16)%in; %let;n32;%expr(n1/32)%in; %if;(i=0) %if;(mm=2) %let;s1;%expr(sx+f_m)%in; %let;min;%expr(n1+1*n2)%in; %if;(s1=min)│%else; %end; %else; %let;min;%expr(n1+1*n4)%in; %let;max;%expr(n1+3*n4)%in; %if;(sx>=min and sx=min1 and sx=min2 and sx=min1 and sx=min2 and sx=min3 and sx=min4 and sx=min1 and sx=min2 and sx=min3 and sx=min4 and sx=min5 and sx=min6 and sx=min7 and sx=min8 and sx=7) lvl >=7 not implemented %elseif;(max=0) %else; %let;l1;%expr(lev-1)%in; %let;l2;%if;(lev>=2)%expr(lev-2)%else;0%end;%in; %let;l3;%if;(lev>=3)%expr(lev-3)%else;0%end;%in; %if;(lev=max) %let;sosf;%expr(sx*2)%in; %let;sosm;%expr(sx*2+1)%in; %if;nnn.has_parents; %for;i;0;l1; %apply;vbar(i, sx, max, 0) %for;j;1;wid; %end; %end; ╭%for;i;1;wid;─%end;%nn; %apply;access(sosf, "nnn.father")%nn; %end; %for;i;0;l2; %apply;vbar(i, sx, max, 0) %for;j;1;wid; %end; %end; %let;ds;%expr(sx-sx/2*2)%in; %if;(max>1)%if;(ds=0)╭%else;╰%end;%for;i;1;wid;─%end;%end;%nn; %apply;access(sx, "nnn")%nn; %if;nnn.has_parents; %for;i;0;l1; %apply;vbar(i, sx, max, 1) %for;j;1;wid; %end; %end; ╰%for;i;1;wid;─%end;%nn; %apply;access(sosm, "nnn.mother")%nn; %end; %else; %let;sosf;%expr(sx*2)%in; %let;sosm;%expr(sx*2+1)%in; %if;nnn.has_parents;%apply;displ_parent(max, lev+1, "nnn.father", sosf, wid)%nn;%end; %if;(max=4) %for;i;0;l2; %if;(i=0 and (sx=5 or sx=6))│%else; %end; %for;j;1;wid; %end; %end; %elseif;(max=5) %for;i;0;l2; %if;((i=0 and (sx=5 or sx=6 or (sx>=10 and sx<=13))) or (i=1 and (sx=9 or sx=10 or sx=13 or sx=14)) )│%else; %end; %for;j;1;wid; %end; %end; %elseif;(max=6) %for;i;0;l2; %if;((i=0 and (sx=5 or sx=6 or (sx>=10 and sx<=13) or (sx>=20 and sx<=27))) or (i=1 and (sx=9 or sx=10 or sx=13 or sx=14 or (sx>=18 and sx<=21) or (sx>=26 and sx<=29))) or (i=2 and (sx=17 or sx=18 or sx=21 or sx=22 or sx=25 or sx=26 or sx=29 or sx=30)))│%else; %end; %for;j;1;wid; %end; %end; %end; %let;ds;%expr(sx-sx/2*2)%in; %if;(lev>1)%if;(ds=0)╭%else;╰%end;%for;i;1;wid;─%end;%end;%nn; %apply;access(sx, "nnn")%nn; %if;nnn.has_parents;%apply;displ_parent(max, lev+1, "nnn.mother", sosm, wid)%nn;%end; %end; %end; %end; %if;has_parents; %let;evarvh;%if;(evar.vh!="")%evar.vh;%else;3%end;%in; %let;evartw;%if;(evar.twidth!="")%evar.twidth;%else;10%end;%in; %let;evars;%if;(evar.sosa="on")1%else;0%end;%in;

[*preview family tree]

%if;not cancel_links;
%for;i;1;7; %i; %end;
%if;(evartw>=6)  - %end;
 +
%end;
    %if;(evarvh>0)
      %apply;displ_parent(evarvh, 1, "self", 1, evartw)
    %else;
      %apply;access(1, "self")%nn; 
    %end;
  
%end;