%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)
%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;