%let;evarv;%if;(evar.v!="")%evar.v;%else;5%end;%in;
%let;evart;%if;(evar.t!="")%evar.t;%else;T%end;%in;
%let;evart1;%if;(evar.t1!="")%evar.t1;%else;CT%end;%in;
%let;evarhi;%if;(evar.hi!="")%evar.hi;%else;H%end;%in;
%let;evarim;%if;(evar.image!="" and evar.image!="off")on%end;%in;
%let;evarix;%if;(evar.implx!="" and evar.implx="on")on%end;%in;
%let;evarso;%if;(evar.sosa!="" and evar.sosa="on")on%end;%in;
%let;evarcpl;%if;(evar.cpl!="" and evar.cpl="on")on%end;%in;
%let;evarsms;%if;(evar.sms!="" and evar.sms="on")on%end;%in;
%let;evarscl;%if;(evar.scale!="")%evar.scale;%else;100%end;%in;
%let;evarfs;%if;(evar.fs!="")%evar.fs;%else;17%end;%in;
%let;fs;%evarfs;%in;
%( dimensions des boites %)
%let;hbc;13%in; %( mode caractère %)
%let;wbc;8%in;
%( bug avec %expr en cgi, evar.scale désactivée temporairement %)
%let;hbs;%if;cgi;24%else;%expr(24*evarscl/100)%end;%in; %( espacement des boites en mode sosa dimension + marge %)
%let;wbs;%if;cgi;40%else;%expr(40*evarscl/100)%end;%in;
%let;hb1;%if;cgi;22%else;%expr(22*evarscl/100)%end;%in; %( dimensions de la boite sosa %)
%let;wb1;%if;cgi;38%else;%expr(38*evarscl/100)%end;%in;
%define;implexc(x0,y0,x1,y1)
x
%end;
%define;implexs(x0,y0,x1,y1)
%end;
%define;line(x0,y0,x1,y1)
%end;
%define;implex1(xx)
onmouseover="over1('sxx')" onmouseout="out1('sxx')" %nn;
%end;
%define;bg(xx)
%apply;nth%with;
/FFFFFF/FFC8E3/F0CBFE/DDCEFF/FFA8D3/E7A9FE/FF86C2/DD88FD/FF62B0/C4ABFE/C433FE/FFFFFF/
%and;xx%end;
%end;
%define;size(xx)
%apply;nth%with;
%if;(evarso="on")
//70/70/70/190/190/430/430/600/600/950/950/
%else;
//50/50/105/105/215/215/410/410/840/840/1650/1650/
%end;
%and;xx%end;
%end;
%define;wid(xx) %(nb of cells in the width of the total graph %)
%apply;nth%with;/////7/7/15/15/31/31/63/63/127%and;xx%end;
%end;
%define;hig(xx) %(nb of cells in the height of the total graph %)
%apply;nth%with;/////3/7/7/15/15/31/31/63/63/127%and;ll%end;
%end;
%define;divsr(xx)
%apply;nth%with;/1/2/4/8/16/32/64/128/256/512%and;xx%end;
%end;
%include;modules/arbre_hi_indexes
%define;prefix_all()
%if;(evar.templ!="")templ=%evar.templ;;%end;%nn;
%if;(evar.wide!="")wide=%evar.wide;;%end;%nn;
%if;(evar.p_mod!="")p_mod=%evar.p_mod;;%end;%nn;
%end;
%(a=ancestor, s=sosa, p=has_parents, bg=background, t=top, l=left %)
%define;boxsosa(aaa, sss, ppp, bgg, lll, ttt)
%let;imsz;%if;(boxsize=2)15%else;8%end;%in;
%if;(evar.cgl!="on")
%if;(evarcpl!="on")
%if;(aaahas_image)
%end;
%else;
%if;(aaahas_image)
%end;
%if;(aaaspouse.has_image)
%end;
%end;
%else;
%let;width;%if;(boxsize=2)%expr(wb1*2)%else;%wb1;%end;%in;
%let;imsz;%if;(boxsize=2)15%else;8%end;%in;
%let;fs1;%if;(sss>999)%expr(fs-10)%elseif;(boxsize=2)%fs;%else;%expr(fs-5)%end;%in;
%let;tm;%if;(boxsize=2)8%else;2%end;%in;
%let;dw1;%expr(width-imsz)%in;
%let;dw2;%expr(width-2*imsz)%in;
%let;dm;%if;(aaahas_image)%imsz;%end;%in;
%if;(evarcpl!="on")
%if;(aaahas_image)
%end;
%if;(aaaanc_sosa!="")%aaaanc_sosa;%else;1%end;
%else;
%if;(aaahas_image)%nn;
%nn;
%else;
%end;%nn;
%nn;
%if;(aaaanc_sosa!="")%aaaanc_sosa;%else;1%end;%nn;
%nn;
%if;(aaaspouse.has_image)%nn;
%nn;
%end;%nn;
%end;
%end;
%if;(evar.cgl!="on")
%end;
%end;
%define;linesosa(ss0, ll, yy, x0, y0)
%( ss=sosa, ll=level, yy=orientation I or H, x0, y0=coordinates of top left corner of box %)
%( x axis to the right, y axis to bottom %)
%let;ss;%if(evarcpl="on")%expr(ss0/2)%else;ss0%end;%in;
%if;(ss!=1)
%let;lev;
%if;(ss>=1 and ss<2)1%nn;
%elseif;(ss>=2 and ss<4)2%nn;
%elseif;(ss>=4 and ss<8)3%nn;
%elseif;(ss>=8 and ss<16)4%nn;
%elseif;(ss>=16 and ss<32)5%nn;
%elseif;(ss>=32 and ss<64)6%nn;
%elseif;(ss>=64 and ss<128)7%nn;
%elseif;(ss>=128 and ss<256)8%nn;
%elseif;(ss>=256 and ss<512)9%nn;
%elseif;(ss>=512 and ss<1024)10%nn;
%elseif;(ss>=1024 and ss<2048)11%nn;
%elseif;(ss>=2048 and ss<4096)12%nn;
%elseif;(ss>=4096 and ss<8192)13%nn;
%else;14%end;
%in;
%let;www;%apply;nth%with;///4/4/8/8/16/16/32/32/64/64/128%and;ll%end;%in;
%let;hhh;%apply;nth%with;///4/8/8/16/16/32/32/64/64/128%and;ll%end;%in;
%let;ddd;%apply;nth%with;/1/2/4/4/8/8/16/16/256/512/1024/2048/4096/8192%and;%if;("yy"="H")%lev;%else;%expr(lev-1)%end;%end;%in;
%let;or;%nn;
%if;("yy"="H")%apply;nth%with;/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/%and;%lev;%end;%nn;
%else;%apply;nth%with;/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/v/h/%and;%lev;%end;%nn;
%end;%nn;
%in;
%let;twid0;%expr(www*wbs)%in;
%let;twid;%if("yy"="H")%expr(twid0*2)%else;%expr(twid0)%end;%in;
%let;thig;%expr(hhh*hbs)%in;
%let;len;%if;(or="h")%expr(twid/ddd)%else;%expr(thig/ddd)%end;%in;
%let;len2;%if;(boxsize=2)%len;%else;%expr(len/2)%end;%in;
%let;wb2;%if;(boxsize=2)%wb1;%else;%expr(wb1/2)%end;%in;
%let;hb2;%if;(boxsize=2)%hb1;%else;%expr(hb1/2)%end;%in;
%let;x1;%expr(x0+wb2)%in;
%let;y1;%expr(y0+hb2)%in;
%let;x2;%if(or="h")%if;(ss%2=0)%expr(x1+len2)%else;%expr(x1-len2)%end;%else;%x1;%end;%in;
%let;y2;%if(or="v")%if;(ss%2=0)%expr(y1+len2)%else;%expr(y1-len2)%end;%else;%y1;%end;%in;
%apply;line(x1, y1, x2, y2)
%end;
%end;
%define;boxchar(aaa,yyy,lll,ttt) %( ttt and lll seem to be inversed in boxsosa%)
%let;xxx;%if;(evarcpl="on")%expr(aaaanc_sosa.v/2)%else;%aaaanc_sosa.v;%end;%in;
%end;
%define;linechar(nn,yy,oo) %( nn #linechar, yy I ou H, oo orientation %)
%for;i;0;nn;
%if;(oo=0)
%if;("yy"="H")│
%else;─%if;(evarso="on" and (evarv<9 and evarcpl!="on") or (evarv<8 and evarcpl="on") and nn!=1)───%elseif;(evarso="on" and nn!=1)─%end;%end;
%elseif;(oo=1)
%if;("yy"="H")─%if;(evarso="on" and (evarv<9 and evarcpl!="on") or (evarv<8 and evarcpl="on") and nn!=1)───%elseif;(evarso="on" and nn!=1)─%end;%else;│
%end;
%end;
%end;
%end;
%define;graph(xx,yy,zz) %( xx gen ; yy mode I ou H; zz 1=single 2=couple %)
%let;levelup;%expr(xx+1)%in;
%let;leveldown;%expr(xx-1)%in;
%let;hb;%if;(evarso="on" and boxsize=2)%expr(hbs*2)%elseif;(evarso="on")%hbs;%else;%hbc;%end;%in;
%let;wb;%if;(evarso="on" and boxsize=2)%expr(wbs*2)%elseif;(evarso="on")%wbs;%else;%wbc;%end;%in;
%let;wb2;%if;(evarso="on" and boxsize=2))%expr(wb1*2)%elseif;(evarso="on")%wb1;%else;%wbc;%end;%in;
%if;(zz=2) %( par couple %)
%foreach;ancestor_level(levelup)
%foreach;ancestor;
%if;(ancestor.anc_sosa.v %2=0)
%let;anc_sosahalf;%expr(ancestor.anc_sosa.v/2)%in;
%let;anc_sosasamehalf;%expr(ancestor.same/2)%in;
%let;top;%expr(topxx_yy(anc_sosahalf)*hb)%in; %( top left corner %)
%let;left;%expr(leftxx_yy(anc_sosahalf)*wb)%in;
%let;top1;%expr(topxx_yy(anc_sosahalf)*hb+6)%in; %( offset for implex liens %)
%let;left1;%expr(leftxx_yy(anc_sosahalf)*wb+4)%in;
%let;top2;%expr(topxx_yy(anc_sosasamehalf)*hb+6)%in;
%let;left2;%expr(leftxx_yy(anc_sosasamehalf)*wb+4)%in;
%let;bg;%if;(ancestor.same!="")CBFECE;%elseif(evarcpl="on")%apply;bg(level-1)%else;%apply;bg(level)%end;%in;
%if;(evarso!="on")
%if;(ancestor.same!="" and evarix="on")
%apply;implexc(left1, top1, left2, top2)
%else;
%if;(ancestor.anc_sosa.v!="" or ancestor.anc_sosa.v=1)
%apply;boxchar("ancestor.", "yy", left, top)
%else;
%apply;boxchar("", "yy", left, top)
%end;
%end;
%else;
%if;(ancestor.same!="" and evarix="on")%apply;implexs(left1, top1, left2, top2)%end;
%if;(ancestor.anc_sosa.v!="" or ancestor.anc_sosa.v=1)
%apply;boxsosa("ancestor.", ancestor.anc_sosa.v, ancestor.has_parents, bg, left, top)
%else;
%apply;boxsosa("", ancestor.anc_sosa.v, ancestor.has_parents, bg, left, top)
%end;
%apply;linesosa(ancestor.anc_sosa.v, xx+1, "yy", left, top)
%end;
%end;
%end;
%end;
%foreach;ancestor_level(xx)
%foreach;ancestor;
%let;top4;%expr(topxx_yy(ancestor.anc_sosa.v)*hb)%in;
%let;left4;%expr(leftxx_yy(ancestor.anc_sosa.v)*wb)%in;
%let;hb4;%expr(hb/2)%in;
%let;bb;%if;(evarso="on")1%else;0%end;%in;
%if;(not ancestor.has_parents and evarsms="on")
%(apply;linesosa(ancestor.anc_sosa.v, xx+1, "yy", left, top%)
%end;
%end;
%end;
%else; %( single %)
%foreach;ancestor_level(xx)
%foreach;ancestor;
%let;top;%expr(topxx_yy(ancestor.anc_sosa.v)*hb)%in; %( top left corner %)
%let;left;%expr(leftxx_yy(ancestor.anc_sosa.v)*wb)%in;
%let;top1;%expr(topxx_yy(ancestor.anc_sosa.v)*hb+6)%in; %( offset for implex liens %)
%let;left1;%expr(leftxx_yy(ancestor.anc_sosa.v)*wb+4)%in;
%let;top2;%expr(topxx_yy(ancestor.same.v)*hb+6)%in;
%let;left2;%expr(leftxx_yy(ancestor.same.v)*wb+4)%in;
%let;bb;%if;(evarso="on")1%else;0%end;%in;
%let;bg;%if;(ancestor.same!="")CBFECE;%elseif(evarcpl="on")%apply;bg(level-1)%else;%apply;bg(level)%end;%in;
%if;(evarso!="on")
%if;(ancestor.same!="" and evarix="on")
%apply;implexc(left1, top1, left2, top2)
%else;
%if;(ancestor.anc_sosa.v!="" or ancestor.anc_sosa.v=1)
%apply;boxchar("ancestor.", "yy", left, top)
%else;
%apply;boxchar("", "yy", left, top)
%end;
%end;
%else;
%if;(ancestor.same!="" and evarix="on")%apply;implexs(left1, top1, left2, top2)%end;
%if;(ancestor.anc_sosa.v!="" or ancestor.anc_sosa.v=1)
%apply;boxsosa("ancestor.", ancestor.anc_sosa.v, ancestor.has_parents, bg, left, top)
%else;
%apply;boxsosa("", ancestor.anc_sosa.v, ancestor.has_parents, bg, left, top)
%end;
%apply;linesosa(ancestor.anc_sosa.v, xx+1, "yy", left, top)
%end;
%end;
%end;
%foreach;ancestor_level(leveldown)
%foreach;ancestor;
%if;(not ancestor.has_parents and evarsms="on")
%let;top2;%expr(topxx_yy(ancestor.anc_sosa.v*2)*hb)%in;
%let;left2;%expr(leftxx_yy(ancestor.anc_sosa.v*2)*wb)%in;
%let;hb4;%expr(hb/2)%in;
%let;bb;%if;(evarso="on")1%else;0%end;%in;
%let;top3;%expr(topxx_yy(ancestor.anc_sosa.v*2+1)*hb)%in;
%let;left3;%expr(leftxx_yy(ancestor.anc_sosa.v*2+1)*wb)%in;
%end;
%end;
%end;
%end;
%end;
%define;graphlinks(xx,yy) %( xx level -1, yy mode : I ou H %)
%let;hb;%if;(evarso="on" and boxsize=2)%expr(hbs*2)%elseif;(evarso="on")%hbs;%else;%hbc;%end;%in;
%let;wb;%if;(evarso="on" and boxsize=2)%expr(wbs*2)%elseif;(evarso="on")%wbs;%else;%wbc;%end;%in;
%if;(evarso!="on")
%foreach;ancestor_level(xx-2)
%foreach;ancestor;
%let;top_;%expr(topxx_yy_(ancestor.anc_sosa.v)*hb)%in;
%let;left_;%expr(leftxx_yy_(ancestor.anc_sosa.v)*wb)%in;
%let;aaa;%if;("yy"="H")1%else;0%end;%in;
%let;bbb;%if;("yy"="H")0%else;1%end;%in;
%if;((evarcpl="on" and ancestor.has_parents) or (evarcpl!="on" and ancestor!=""))
%if;(ancestor.anc_sosa.v=2 or ancestor.anc_sosa.v=3)
%if;(xx=4 or xx=5) %apply;linechar(1,yy,aaa)
%elseif;(xx=6 or xx=7) %apply;linechar(3,yy,aaa)
%elseif;(xx=8 or xx=9) %apply;linechar(7,yy,aaa)
%elseif;(xx=10 or xx=11) %apply;linechar(15,yy,aaa)
%elseif;(xx=12) %apply;linechar(31,yy,aaa)
%end;
%elseif;(ancestor.anc_sosa.v>3 and ancestor.anc_sosa.v<8)
%if;(xx=5 or xx=6) %apply;linechar(1,yy,bbb)
%elseif;(xx=7 or xx=8) %apply;linechar(3,yy,bbb)
%elseif;(xx=9 or xx=10) %apply;linechar(7,yy,bbb)
%elseif;(xx=11 or xx=12) %apply;linechar(15,yy,bbb)
%end;
%elseif;(ancestor.anc_sosa.v>7 and ancestor.anc_sosa.v<16)
%if;(xx=6 or xx=7) %apply;linechar(1,yy,aaa)
%elseif;(xx=8 or xx=9) %apply;linechar(3,yy,aaa)
%elseif;(xx=10 or xx=11) %apply;linechar(7,yy,aaa)
%elseif;(xx=12) %apply;linechar(15,yy,aaa)
%end;
%elseif;(ancestor.anc_sosa.v>15 and ancestor.anc_sosa.v<32)
%if;(xx=7 or xx=8) %apply;linechar(1,yy,bbb)
%elseif;(xx=9 or xx=10) %apply;linechar(3,yy,bbb)
%elseif;(xx=11 or xx=12) %apply;linechar(7,yy,bbb)
%end;
%elseif;(ancestor.anc_sosa.v>31 and ancestor.anc_sosa.v<64)
%if;(xx=8 or xx=9) %apply;linechar(1,yy,aaa)
%elseif;(xx=10 or xx=11) %apply;linechar(3,yy,aaa)
%elseif;(xx=12) %apply;linechar(7,yy,aaa)
%end;
%elseif;(ancestor.anc_sosa.v>63 and ancestor.anc_sosa.v<128)
%if;(xx=9 or xx=10) %apply;linechar(1,yy,bbb)
%elseif(xx=11 or xx=12) %apply;linechar(3,yy,bbb)
%end;
%elseif;(ancestor.anc_sosa.v>127 and ancestor.anc_sosa.v<256)
%if;(xx=10 or xx=11) %apply;linechar(1,yy,aaa)
%elseif;(xx=12) %apply;linechar(3,yy,aaa)
%end;
%elseif;(ancestor.anc_sosa.v>255 and ancestor.anc_sosa.v<512)
%if;(xx=11 or xx=12) %apply;linechar(1,yy,bbb)
%end;
%elseif;(ancestor.anc_sosa.v>511 and ancestor.anc_sosa.v<1024)
%if;(xx=12) %apply;linechar(1,yy,aaa)
%end;
%end;
%end;
%end;
%end;
%end;
%end;
Arbre des ancêtres de %first_name; %surname; %dates;
%let;boxsize;%if;((evarv<9 and evarcpl!="on") or (evarv<10 and evarcpl="on"))2%else;1%end;%in;
%if;((evarcpl="on" and evarv < 4) or (evarcpl!="on" and evarv < 3))
[*compact tree][:] [specify::generation/generations]0 > 3.
%else;
%let;vvv;%if;(evarcpl="on")%evarv;%else;%expr(evarv+1)%end;%in;
%let;mmm;%if;(evarso="on" and boxsize=2)2%else;1%end;%in;
%let;nbc;%apply;nth%with;/0/1/1/3/3/7/7/15/15/31/31/63/63/127/127/255/255/%and;%nn;
%if;(evarhi="H")%expr(vvv+1)%else;%expr(vvv)%end;%end;%in;
%let;nbl;%apply;nth%with;/0/1/1/3/3/7/7/15/15/31/31/63/63/127/127/255/255/%and;%nn;
%if;(evarhi="H")%expr(vvv)%else;%expr(vvv+1)%end;%end;%in;
%let;widc;%expr(mmm*nbc*wbc)%in;
%let;wids;%expr(mmm*nbc*wbs)%in;
%let;higc;%expr(mmm*nbl*hbc)%in;
%let;higs;%expr(mmm*nbl*hbs)%in;
%if;(evarv >= 3)
%if;(evarhi="H" or evarhi="")
%if;(evarso="on")
%if;(evarv < 13 and evarcpl="on")
%apply;graph(evarv-1,"I",2)
%apply;graphlinks(evarv-1,"I")
%elseif;(evarv < 12 and evarcpl!="on")
%apply;graph(evarv,"I",1)
%apply;graphlinks(evarv,"I")
%else;
[*compact tree][:] [specify::generation/generations]0 %if;(evarcpl="on")< 13.%else;< 12.%end;
%end;
%elseif;(evarso!="on")
%if;(evarv < 14 and evarcpl="on")
%apply;graph(evarv-1,"I",2)
%apply;graphlinks(evarv-1,"I")
%elseif;(evarv < 13 and evarcpl!="on")
%apply;graph(evarv,"I",1)
%apply;graphlinks(evarv,"I")
%else;
[*compact tree][couples][:] [specify::generation/generations]0%if;(evarcpl="on")< 14.%else;< 13.%end;
%end;
%end;
%elseif;(evarhi="I")
%if;(evarso="on")
%if;(evarv < 13 and evarcpl="on")
%apply;graph(evarv-1,"H",2)
%apply;graphlinks(evarv-1,"H")
%elseif;(evarv < 12 and evarcpl!="on")
%apply;graph(evarv,"H",1)
%apply;graphlinks(evarv,"H")
%else;
[*compact tree][:] [specify::generation/generations]0%if;(evarcpl="on")< 13.%else;< 12.%end;
%end;
%elseif;(evarso!="on")
%if;(evarv < 14 and evarcpl="on")
%apply;graph(evarv-1,"H",2)
%apply;graphlinks(evarv-1,"H")
%elseif;(evarv < 13 and evarcpl!="on")
%apply;graph(evarv,"H",1)
%apply;graphlinks(evarv,"H")
%else;
[*compact tree][:] [specify::generation/generations]0%if;(evarcpl="on")< 14.%else;< 13.%end;
%end;
%end;
%else;no hi
%end;
%end;
%end;