%doctype;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: anclist.txt,v 5.4 2007/01/19 01:53:16 ddr Exp $ -->
  <!-- Copyright (c) 1998-2007 INRIA -->
  <!-- Modified mickroue(a)yahoo.fr 20121129 templ=templm -->
  <title>%nn;
    %if;(evar.t = "E" and evar.opt = "csv")
      CSV
    %elseif;(evar.t = "E" and evar.opt = "fam")
        %apply;a_of_b%with;
          %sp;[*family/families]0
        %and;
          %if;(public_name != "")%public_name;%else;%first_name;%end;
          %if;(qualifier != "") %qualifier;%end;
          %sp;%surname;
        %end;
    %elseif;(evar.t = "F")- [*surnames list] -%nn;
      %apply;a_of_b%with;
        [*ancestors]
      %and;
        %if;(public_name != "")%public_name;%else;%first_name;%end;
        %if;(qualifier != "") %qualifier;%end;
        %sp;%surname;
      %end;
    %end;
  </title>
  <meta name="robots" content="none"%/>
  <meta name="format-detection" content="telephone=no"%/>
  <meta http-equiv="Content-Type" content="text/html; charset=%charset;"%/>
  <meta http-equiv="Content-Style-Type" content="text/css"%/>
  <link rel="shortcut icon" href="%image_prefix;/favicon_gwd.png"%/>
  %include.css;
  %base_header;
</head>
%(<!-- Begin define --> %)
%let;birth_symbol;%if;(bvar.birth_symbol != "")%bvar.birth_symbol;%else;&deg;%end;%in;
%let;death_symbol;%if;(bvar.death_symbol != "")%bvar.death_symbol;%else;&dagger;%end;%in;
%let;ref_index;%index;%in;
%let;ref_sex;%if(is_male)[him/her]0%elseif;(is_female)[him/her]1%else;0%end;%in;

%define;tothegen(xx)
  [*to the %s generation:::xx]%nn;
%end;

%define;togen(xx)
  %if;(xx = 1)[*specify::generation/generations]0%nn;
  %elseif;(xx = 2)[*to the parents]%nn;
  %elseif;(xx = 3)[*to the grandparents]%nn;
  %elseif;(xx = 4)[*to the great-grandparents]%nn;
  %else;
    %apply;tothegen%with;
      %apply;nth([nth (generation)], xx)
    %end;
  %end;
%end;

%define;ancestors_by_list(xx, nnn)
  %if;(xx.has_parents and nnn > 1)
    <ul>
    <li style="list-style-type:square"><a href="%prefix;
    %xx.father.access;">%xx.father;</a>%xx.father.title;%xx.father.dates;%nl;
    %apply;ancestors_by_list("xx.father", nnn - 1)</li>
    <li style="list-style-type:circle"><a href="%prefix;
    %xx.mother.access;">%xx.mother;</a>%xx.mother.title;%xx.mother.dates;%nl;
    %apply;ancestors_by_list("xx.mother", nnn - 1)</li>
    </ul>
  %end;
%end;

%define;ancestors_horizontally(pp, xx, ss1, ss2, ss3)
  %if;(xx > 0)
    %if;(pp.has_parents)
      %apply;ancestors_horizontally(
        "pp.father", xx - 1, "ss1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",
        "ss1&nbsp;+--&nbsp;", "ss1&nbsp;|&nbsp;&nbsp;&nbsp;")
    %end;
    <tt>ss2</tt><a href="%prefix;%pp.access;">%pp;</a>%pp.title;%pp.dates;<br%/>
    %if;(pp.has_parents)
      %apply;ancestors_horizontally(
        "pp.mother", xx - 1, "ss3&nbsp;|&nbsp;&nbsp;&nbsp;",
        "ss3&nbsp;+--&nbsp;", "ss3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
    %end;
  %end;
%end;

%define;csv_line2()
          ;%family_cnt;
          ;%marriage_date.prec;
          ;%marriage_date.year;
          ;%marriage_date.month;
          ;%marriage_date.day;
          ;%marriage_place;
          ;%spouse.first_name;
          ;%spouse.surname;
          ;%spouse.first_name_key_val;
          ;%spouse.surname_key_val;
          ;%spouse.occ;
%end;

%define;csv_line1(yy)
          ;%index;
          ;%family.index;
          ;%first_name_key_val;
          ;%surname_key_val;
          ;%occ;
          ;%if;(sosa_in_list != "")%sosa_in_list;%end;
          ;%ancestor.anc_sosa;
          ;yy.%child_cnt;
          ;%sex;
          ;%consanguinity;
          ;%first_name;
          ;%surname;
          ;%birth_date.prec;
          ;%birth_date.year;
          ;%birth_date.month;
          ;%birth_date.day;
          ;%birth_place;
          ;%death_date.prec;
          ;%death_date.year;
          ;%death_date.month;
          ;%death_date.day;
          ;%death_place;
          ;%father.first_name;
          ;%father.surname;
          ;%father_age_at_birth;
          ;%mother.first_name;
          ;%mother.surname;
          ;%mother_age_at_birth;
          %nn;
%end;

%define;csv_line3(xx,yy,zz)
          ;%xx.index;
          ;%family.index;
          ;%xx.first_name_key_val;
          ;%xx.surname_key_val;
          ;%xx.occ;
          ;%if;(sosa_in_list != "")%sosa_in_list;%end;
          ;%ancestor.anc_sosa;
          ;yy.%child_cnt;xzz%nn;
          ;%xx.sex;
          ;%consanguinity;
          ;%xx.first_name;
          ;%xx.surname;
          ;%birth_date.prec;
          ;%birth_date.year;
          ;%birth_date.month;
          ;%birth_date.day;
          ;%xx.birth_place;
          ;%death_date.prec;
          ;%death_date.year;
          ;%death_date.month;
          ;%death_date.day;
          ;%xx.death_place;
          ;%xx.father.first_name;
          ;%xx.father.surname;
          ;%nn;
          ;%xx.mother.first_name;
          ;%xx.mother.surname;
          ;%nn;
          ;%family_cnt;
          ;%marriage_date.prec;
          ;%marriage_date.year;
          ;%marriage_date.month;
          ;%marriage_date.day;
          ;%marriage_place;
          ;%first_name;
          ;%surname;
          ;%first_name_key_val;
          ;%surname_key_val;
          ;%occ;
          %nn;
%end;

%define;csv_line(yy,zz)
  %foreach;child;
    %if;(child.has_families)
      %foreach;child.family;
        %incr_count;%count;
        %apply;csv_line1("yy.zz")
        %apply;csv_line2()
        <br%/>
        %if;(spouse.sosa_in_list = "")
          %incr_count;%count;
          %apply;csv_line3("spouse","yy.zz",family_cnt)<br%/>
        %end;
        %if;(evar.cousins="on" and child.has_families and child.sosa_in_list = "")
          %apply;csv_line("yy.zz",child_cnt)
        %end;
      %end;
    %else;
    %incr_count;%count;
    %apply;csv_line1("yy.zz")%nn;
     ;;;<br%/>
    %end;
  %end;
%end;

%define;ld_somebody1(bbb,ddd,xx,yy,lexa,lexb,sss,ttt)
  %let;relationship;
    %if;("lexb" != "")
      %apply;a_of_b%with;
        %if(xx.is_male)[lexa]0%elseif;(xx.is_female)[lexa]1%else;[lexa]2%end;
      %and;
        %if(sss = 0)[lexb]0%elseif;(sss = 1)[lexb]1%else;[lexb]2%end;
      %end;
    %else;
      %if;(xx.is_male)[lexa]0%elseif;(xx.is_female)[lexa]1%else;[lexa]2%end;
    %end;
  %in;
  %apply;add_in_sorted_list%with;
    %if;(xx.yy_date.year != "")
      %xx.yy_date.year;%nn;
      %if;(xx.yy_date.month = "")00%elseif;(xx.yy_date.month < 10)0%end;%xx.yy_date.month;%nn;
      %if;(xx.yy_date.day = "")00%elseif;(xx.yy_date.day < 10)0%end;%xx.yy_date.day;%nn;
    %else;
      99999999%xx.yy_date.year;%nn;
    %end;
  %and;
    %if;(xx.yy_date.year >=  bbb)
      %expr(xx.yy_date.year - bbb)%nn;
    %elseif;(bbb > xx.yy_date.year)
      -%expr(bbb - xx.yy_date.year)%nn;
    %end;
  %and;
    %if;("yy" = "birth")1%else;3%end;%(sorted : birth = 1 marriage = 2 death = 3%)%nn;
  %and;
    %xx.on_yy_date;
  %and;
    %xx.yy_place;
  %and;
    ttt%nn;
  %and;
    %if;(cancel_links or xx.is_restricted)
      %xx;%nn;
    %else;
      %if;(browsing_with_sosa_ref)
        <a href="%prefix;m=RLM;et=S;spouse=on;image=%evar.image;;%nn;
          i1=%sosa_ref.index;;%nn;
          i2=%xx.index;;t2=%relationship;;%nn;
          i3=%ref_index;;t3=%ref_sex;;%nn;
          i4=%sosa_ref.index;;t4=sosa_1">%xx;</a>%nn;
      %else;
        <a href="%prefix;em=R;ei=%xx.index;;spouse=on;et=S;image=%evar.image;;i=%ref_index;">%xx;</a>%nn;
      %end;
    %end;
  %and;
    %relationship;
    %if;("yy" = "death" and xx.computable_death_age)
      <span class="nobr xs">%sp;%death_symbol;%xx.death_age;</span>
    %end;
    %if;("yy" = "birth" and xx.computable_age)
      <span class="nobr xs">%sp;%birth_symbol;%xx.age;</span>
    %end;
  %and;
    %xx.occupation;
  %and;
    %xx.index;
  %and;
    %if;(xx.yy_date.year < bbb)
      ld_before%nn;
    %elseif;(xx.yy_date.year > ddd)
      ld_after%nn;
    %elseif;(xx.yy_date.year >= 0)
      ld_yy%xx.sex;%nn;
    %else;
      ld_no_date%nn;
    %end;
  %and;
    %xx.has_sosa;
  %and;
    %if;("lexa" = "him/her")
      ld_him_her%nn;
    %end;
  %and;
    border_family_%xx.has_families; border_sex_%xx.sex;
  %and;
    %if;("yy" = "birth" and "xx" != "spouse" and "xx" != "parent")
      %if;("xx" != "ancestor" or xx.anc_sosa.v % 2 = 0)
        %xx.index;
      %end;
    %end;
  %end;
%end;

%define;ld_marriage(bbb,ddd,xx,lexa,lexb,sss)
  %let;relationship;
    %if;("lexb" != "")
      %apply;a_of_b%with;
        %if(xx.is_male)[lexa]0%elseif;(xx.is_female)[lexa]1%else;[lexa]2%end;
      %and;
        %if(sss = 0)[lexb]0%elseif;(sss = 1)[lexb]1%else;[lexb]2%end;
      %end;
    %else;
      %if;(xx.is_male)[lexa]0%elseif;(xx.is_female)[lexa]1%else;[lexa]2%end;
    %end;
  %in;
  %apply;add_in_sorted_list%with;
    %if;(marriage_date.year != "")
      %marriage_date.year;%nn;
      %if;(marriage_date.day = "")00%elseif;(marriage_date.month < 10)0%end;%marriage_date.month;%nn;
      %if;(marriage_date.day = "")00%elseif;(marriage_date.day < 10)0%end;%marriage_date.day;%nn;
    %else;
      99999999%marriage_date.year;%nn;
    %end;
  %and;
    %if;(marriage_date.year >=  bbb)
      %expr(marriage_date.year - bbb)%nn;
    %elseif;(bbb > marriage_date.year)
      -%expr(bbb - marriage_date.year)%nn;
    %end;
  %and;
    2%nn;%(sorted : birth = 1 marriage = 2 death = 3%)
  %and;
    %on_marriage_date;
  %and;
    %marriage_place;
  %and;
    &amp;%nn;
  %and;
    %if;(cancel_links or xx.is_restricted)
      %xx;<br%/> &amp; %spouse;%nn;
    %else;
      %if;(browsing_with_sosa_ref)
        <a href="%prefix;m=RLM;et=S;spouse=on;image=%evar.image;;%nn;
          i1=%sosa_ref.index;;%nn;
          i2=%xx.index;;t2=%relationship;;%nn;
          i3=%ref_index;;t3=%ref_sex;;%nn;
          i4=%sosa_ref.index;;t4=sosa_1">%xx;</a>%nn;
      %else;
        <a href="%prefix;em=R;ei=%xx.index;;spouse=on;et=S;image=%evar.image;;i=%ref_index;">%xx;</a>
      %end;
       &amp; %spouse;%nn;
    %end;
  %and;
    %relationship;
  %and;
    %xx.occupation;%nn;
  %and;
    %xx.index;
  %and;
    %if;(marriage_date.year < bbb)
      ld_before%nn;
    %elseif;(marriage_date.year > ddd)
      ld_after%nn;
    %elseif;(marriage_date.year >= 0)
      ld_marriage%nn;
    %else;
      ld_no_date%nn;
    %end;
  %and;
    %xx.has_sosa;
  %and;
    %if;("lexa" = "him/her")
      ld_him_her%nn;
    %end;
  %and;
    border_family_%xx.has_families; border_sex_%xx.sex;
  %and;
  %end;
%end;

%define;ld_somebody(bbb,ddd,xx,lexa,lexb,sss)
  %apply;ld_somebody1(bbb,ddd,"xx","birth","lexa","lexb","sss",birth_symbol)
  %if;(xx.is_dead)
    %apply;ld_somebody1(bbb,ddd,"xx","death","lexa","lexb","sss",death_symbol)
  %end;
%end;

%define;ld_cousin(bbb,ddd,curlev,maxlev,lexa,lexb,sss)
  %if;(nb_children > 0)
    %foreach;child;
      %if;(child.sosa_in_list = "" and child.index != a_i and child.index != b_i and child.index != c_i)
        %apply;ld_somebody(bbb,ddd,"child","lexa","lexb","sss")
        %if;(child.has_families)
          %foreach;child.family;
            %apply;ld_marriage(bbb,ddd,"child","lexa","lexb","sss")
            %if;(curlev = 0)
              %apply;ld_somebody(bbb,ddd,"spouse","the spouse","an uncle/an aunt",sex)
              %apply;ld_cousin(bbb,ddd,curlev+1,maxlev,"a cousin","","")
            %elseif;(curlev = 1)
              %apply;ld_cousin(bbb,ddd,curlev+1,maxlev,"a son/a daughter/a child","a cousin",sex)
            %elseif;(curlev = 2)
              %apply;ld_cousin(bbb,ddd,curlev+1,maxlev,"a grandson/a granddaughter/a grandchild","a cousin","sss")
            %elseif;(curlev = 3)
              %apply;ld_cousin(bbb,ddd,curlev+1,maxlev,"a great-grandson/a great-granddaughter/a great-grandchild","a cousin","sss")
            %elseif;(curlev = 4)
              %apply;ld_cousin(bbb,ddd,curlev+1,maxlev,"a great-grandson/a great-granddaughter/a great-grandchild","a cousin","sss")
            %end;
          %end;
        %end;
      %end;
    %end;
  %end;
%end;

%define;ld_2nd_cousin(bbb,ddd,curlev,maxlev,lexa,lexb,sss)
  %if;(nb_children > 0)
    %foreach;child;
      %if;(child.sosa_in_list = "" and child.index != a_i and child.index != b_i and child.index != c_i 
           and child.index != d_i and child.index != e_i and child.index != f_i and child.index != g_i)
        %apply;ld_somebody(bbb,ddd,"child","lexa","lexb","sss")
        %if;(child.has_families)
          %foreach;child.family;
            %apply;ld_marriage(bbb,ddd,"child","lexa","lexb","sss")
            %if;(curlev = 0)
              %apply;ld_somebody(bbb,ddd,"spouse","the spouse","a great-uncle/a great-aunt",sex)
              %apply;ld_2nd_cousin(bbb,ddd,curlev+1,maxlev,"a cousin","the father/the mother/a parent","")
            %elseif;(curlev = 1)
              %apply;ld_2nd_cousin(bbb,ddd,curlev+1,maxlev,"a 2nd cousin","",sex)
            %elseif;(curlev = 2)
              %apply;ld_2nd_cousin(bbb,ddd,curlev+1,maxlev,"a son/a daughter/a child","a 2nd cousin",sex)
            %elseif;(curlev = 3)
              %apply;ld_2nd_cousin(bbb,ddd,curlev+1,maxlev,"a grandson/a granddaughter/a grandchild","a 2nd cousin","sss")
            %elseif;(curlev = 4)
              %apply;ld_2nd_cousin(bbb,ddd,curlev+1,maxlev,"a great-grandson/a great-granddaughter/a great-grandchild","a 2nd cousin","sss")
            %end;
          %end;
        %end;
      %end;
    %end;
  %end;
%end;

%define;ld_children(bbb,ddd,curlev,maxlev,lexa,lexb,sss)
  %if;(nb_children > 0)
    %foreach;child;
      %apply;ld_somebody(bbb,ddd,"child","lexa","","")
      %if;(child.has_families)
        %foreach;child.family;
          %apply;ld_marriage(bbb,ddd,"child","lexa","","")
          %if;(curlev = 0 and maxlev > 2)
            %apply;ld_somebody(bbb,ddd,"spouse","a son-in-law/a daughter-in-law","","")
            %apply;ld_children(bbb,ddd,curlev+1,maxlev,"a grandson/a granddaughter/a grandchild","",sex)
          %elseif;(curlev = 1 and maxlev > 3)
            %apply;ld_somebody(bbb,ddd,"spouse","the spouse","a grandson/a granddaughter/a grandchild","sss")
            %apply;ld_children(bbb,ddd,curlev+1,maxlev,"a great-grandson/a great-granddaughter/a great-grandchild","","")         
          %end;
        %end;
      %end;
    %end;
  %end;
%end;

%define;ld_nephew(bbb,ddd,curlev,maxlev,lexa)
  %if;(nb_children > 0)
    %foreach;child;
      %if;(child.index != a_i)
        %apply;ld_somebody(bbb,ddd,"child","lexa","","")
        %if;(child.has_families)
          %foreach;child.family;
            %apply;ld_marriage(bbb,ddd,"child","lexa","","")
            %if;(curlev = 0)
              %if;("lexa" = "a half-brother/a half-sister/a half-sibling")
                %let;test;[the spouse]%in;
                %apply;ld_somebody(bbb,ddd,"spouse","the spouse","lexa",sex)
              %else;
                %apply;ld_somebody(bbb,ddd,"spouse","a brother-in-law/a sister-in-law","","")
              %end;
              %apply;ld_nephew(bbb,ddd,curlev+1,maxlev,"a nephew/a niece")
            %elseif;(curlev = 1 and maxlev > 2)
              %apply;ld_nephew(bbb,ddd,curlev+1,maxlev,"a great-nephew/a great-niece")
            %end;
          %end;
        %end;
      %end;
    %end;
  %end;
%end;

%define;ld(bbb,ddd)
  %let;maxlev;
    %apply;min(evar.v, max_anc_level, 4)
  %in;
  %empty_sorted_list;
  %foreach;ancestor_level(maxlev)
    %foreach;ancestor;
      %if;(level=1)
        %apply;ld_somebody(bbb,ddd,"ancestor","him/her","","")
        %foreach;ancestor.family;
          %apply;ld_marriage(bbb,ddd,"ancestor","him/her","","")
          %apply;ld_somebody(bbb,ddd,"spouse","the spouse","","")
          %if;(spouse.has_parents and evar.v != 1)
            %foreach;spouse.parent;
              %apply;ld_somebody(bbb,ddd,"parent","the father-in-law/the mother-in-law","","")
            %end;
          %end;
          %apply;ld_children(bbb,ddd,0,maxlev,"a son/a daughter/a child","","")
        %end;
      %elseif;(level=2)
        %let;a_i;%index;%in;
        %apply;ld_somebody(bbb,ddd,"ancestor","the father/the mother/a parent","","")
        %if;(evar.cousins = "on")
          %foreach;ancestor.family;
            %if;(ancestor.is_male and spouse.index = ancestor.spouse.index)
              %apply;ld_marriage(bbb,ddd,"ancestor","the parents","","")
            %elseif;(ancestor.nb_families > 1 and spouse.index != ancestor.spouse.index)
              %apply;ld_marriage(bbb,ddd,"ancestor","the father/the mother/a parent","","")
              %apply;ld_nephew(bbb,ddd,0,maxlev,"a half-brother/a half-sister/a half-sibling")
            %else;
              %apply;ld_nephew(bbb,ddd,0,maxlev,"a brother/a sister/a sibling")
            %end;
          %end;
        %end;
      %elseif;(level=3)
        %let;a_i;%index;%in;
        %let;b_i;%father.index;%in;
        %let;c_i;%mother.index;%in;
        %apply;ld_somebody(bbb,ddd,"ancestor","a grandfather/a grandmother/a grandparent","","")
        %if;(evar.cousins = "on")
          %foreach;ancestor.family;
            %apply;ld_cousin(bbb,ddd,0,maxlev,"an uncle/an aunt","","")
          %end;
        %end;
      %elseif;(level=4)
        %let;a_i;%index;%in;
        %let;b_i;%father.index;%in;
        %let;c_i;%mother.index;%in;
        %let;d_i;%father.father.index;%in;
        %let;e_i;%father.mother.index;%in;
        %let;f_i;%mother.father.index;%in;
        %let;g_i;%mother.mother.index;%in;
        %apply;ld_somebody(bbb,ddd,"ancestor","a great-grandfather/a great-grandmother/a great-grandparent","","")
        %if;(evar.cousins = "on")
          %foreach;ancestor.family;
            %apply;ld_2nd_cousin(bbb,ddd,0,maxlev,"a great-uncle/a great-aunt","","")
          %end;
        %end;
      %end;
    %end;
  %end;
%end;

%define;url(z1,z2)
  %apply;lazy_print("z1=z2;")
  %foreach;env_binding;
    %if;(env.key="z1")%lazy_force;%else;%env.key;=%env.val;;%end;
  %end;
  %if;(not lazy_printed)
    z1=z2;
  %end;
%end;

%(<!-- End define --> %)

<body%body_prop; id="anclist">
%message_to_wizard;

<h1>%nn;
  %if;(evar.t = "E" and evar.opt = "")
    !?! [select] [*family/families]0 ([maximum] 4 [generation/generations]1) [or] [*long display] (csv)
  %elseif;(evar.t = "E" and evar.opt = "csv")
  %elseif;(evar.t = "E" and evar.opt = "fam")
    %apply;a_of_b%with;
      %sp;[*family/families]0
    %and;
      %if;(public_name != "")%public_name;%else;%first_name;%end;
      %if;(qualifier != "") %qualifier;%end;
      %sp;%surname;
      %sp;%dates;
    %end;
  %elseif;(evar.t = "F")
    %if;(public_name != "")%public_name;%else;%first_name;%end;
    %if;(qualifier != "") <em>%qualifier;</em>%end;
    %sp;%surname;
    %if;(alias != "") <em>(%alias;)</em>%end;<br%/>
    - [*surnames list] -
  %else;
    %apply;a_of_b%with;[*ancestors]%and;
      %if;(public_name != "")%public_name;%else;%first_name;%end;
      %if;(qualifier != "") <em>%qualifier;</em>%end;
      %sp;%surname;
      %if;(alias != "") <em>(%alias;)</em>%end;
    %end;
    %if;(evar.t = "D") [up to] %pvar.1;%end;
  %end;
</h1>
%if;(not cancel_links and evar.opt != "csv")
  <div class="menu2">
    <a style="text-decoration:line-through;" href="%prefix_base;%apply;url("cgl","on")"
       title="[cancel GeneWeb links]">@</a>
    %if;has_referer;
      <a href="%referer;" title="[back]">&lt;&lt;</a>
    %end;
      <a href="%prefix;" title="[visualize/show/hide/summary]3">^^</a>
  </div>
%end;
%if;(evar.t = "E" and evar.opt = "fam")
  %(family life dates %)
  %if;(is_dead and death_date.year > 0)
    %apply;ld(birth_date.year,death_date.year)
  %else;
    %apply;ld(birth_date.year,9999)
  %end;
  <table summary="family life dates" class="ld_table">
  <colgroup>
    <col width="35"%/>
    <col width="10"%/>
    <col width="300"%/>
    <col width="30"%/>
    <col width="300"%/>
    <col width="300"%/>
    <col width="300"%/>
  </colgroup>
  <thead>
    <tr>
      <th>[years old]</th>
      <th>[date/dates]0</th>
      <th>[place]</th>
      <th><abbr title="[birth] [marriage/marriages]0 [death]">%birth_symbol;&amp;%death_symbol;</abbr></th>
      <th>[person/persons]0</th>
      <th>[relationship]0</th>
      <th>[occupation/occupations]0</th>
    </tr>
  </thead>
  <tbody>
    %reset_count;
    %foreach;sorted_list_item;
      %if;(prev_item.4 = item.4 and prev_item.6 = item.6 and prev_item.10 = item.10)
      %else;
        <tr %if;(item.13 != "")class="%item.13;"%end;>
          <td>%item.2;</td>
          <td>%item.4;</td>
          <td>%item.5;</td>
          <td class="%item.11;">%item.6;</td>
          <td><div %if;(item.12 = "1")class="border_sosa"%end;>%item.7;</div></td>
          <td><div class="%item.14;">%item.8;</div></td>
          <td>%item.9;</td>
        </tr>
        %if;(item.3 = 1)
          %incr_count;
        %end;
      %end;
    %end;
    <tr><td colspan="7">[*total] : %count; [[person/persons]1@(c)]%sp;
      %reset_count;
      <a href="%prefix;m=RLM;et=S;spouse=on;%nn;
      %foreach;sorted_list_item;
        %if;(item.15 != "")
          %incr_count;
          i%count;=%item.15;;%nn;
          %incr_count;
          i%count;=%index;;%nn;
        %end;
       %end;
       %incr_count;
       i%count;=%index;;t%count;=*;">[*tree]</a>
    </td></tr>
  </tbody>
  </table>
%elseif;(wizard and evar.t = "E" and evar.opt = "csv")
  %( csv display full %)
  <p>
  [number]%nn;
  ;index%nn;
  ;index_family%nn;
  ;first_name_key_val%nn;
  ;surname_key_val%nn;
  ;occ%nn;
  ;[Sosa]%nn;
  ;[Sosa]_[father/mother]0%nn;
  ;[child/children]0_[number]%nn;
  ;[sex]%nn;
  ;[consanguinity]%nn;
  ;[first name/first names]0%nn;
  ;[surname/surnames]0%nn;
  ;[birth]_[precision]%nn;
  ;[birth]_[year/month/day]0%nn;
  ;[birth]_[year/month/day]1%nn;
  ;[birth]_[year/month/day]2%nn;
  ;[birth]_[place]%nn;
  ;[death]_[precision]%nn;
  ;[death]_[year/month/day]0%nn;
  ;[death]_[year/month/day]1%nn;
  ;[death]_[year/month/day]2%nn;
  ;[death]_[place]%nn;
  ;[father/mother]0_[first name/first names]0%nn;
  ;[father/mother]0_[surname/surnames]0%nn;
  ;[father/mother]0_[age]%nn;
  ;[father/mother]1_[first name/first names]0%nn;
  ;[father/mother]1_[surname/surnames]0%nn;
  ;[father/mother]1_[age]%nn;
  ;[family/families]0_[number]%nn;
  ;[marriage/marriages]0_[precision]%nn;
  ;[marriage/marriages]0_[year/month/day]0%nn;
  ;[marriage/marriages]0_[year/month/day]1%nn;
  ;[marriage/marriages]0_[year/month/day]2%nn;
  ;[marriage/marriages]0_[place]%nn;
  ;[marriage/marriages]0_[first name/first names]0%nn;
  ;[marriage/marriages]0_[surname/surnames]0%nn;
  ;[marriage/marriages]0_first_name_key_val%nn;
  ;[marriage/marriages]0_surname_key_val%nn;
  ;[marriage/marriages]0_occ%nn;
  <br%/>
  %reset_count;
  %foreach;ancestor_level(evar.v)
    %if;(level != 1 and evar.only != "on" or level = evar.v)
      %foreach;ancestor;
        %if;(ancestor.same = "" and ancestor.is_male)
          %foreach;ancestor.family;
            %apply;csv_line("","")
          %end;
        %elseif;(ancestor.same = "" and ancestor.is_female and ancestor.nb_families > 1)
          %foreach;ancestor.family;
            %if;(spouse.index != ancestor.spouse.index)
              %apply;csv_line("","")
            %end;
          %end;
        %end;
      %end;
    %end;
  %end;
  </p>
%elseif;(evar.t = "L")
  %( by list %)
  %let;xx;
    %if;(bvar.max_anc_level = "")%apply;min(evar.v, max_anc_level, 7)
    %else;%apply;min(evar.v, max_anc_level, bvar.max_anc_level)%end;
  %in;
  <p>
  %apply;togen(xx).
  </p>
  %apply;ancestors_by_list("self", xx)
%elseif;(evar.t = "H")
  %( horizontally %)
  %let;xx;
    %if;(bvar.max_anc_level = "")%apply;min(evar.v, max_anc_level, 7)
    %else;%apply;min(evar.v, max_anc_level, bvar.max_anc_level)%end;
  %in;
  <p>
  %apply;togen(xx).
  </p>
  <table><tr><td style="white-space:nowrap">
  %apply;ancestors_horizontally(
    "self", xx, "&nbsp;&nbsp;&nbsp;", "--&nbsp;", "&nbsp;&nbsp;&nbsp;")
  </tr></tr></table>
%elseif;(evar.t = "F")
  %( surnames list %)
  <ul>
  %foreach;ancestor_surname(evar.v)
    <li>%nn;
    %if;(evar.cgl != "on")<a href="%prefix;m=DAG;%ancestor.sosa_access;">%nn;
    %ancestor.surname_end;%ancestor.surname_begin;</a>%nn;
    %else;%ancestor.surname_end;%ancestor.surname_begin;%end;
    %if;(ancestor.nb_times > 1) (%ancestor.nb_times;)%end;
    ; %ancestor.place;
    ; %ancestor.date_begin.year;-%ancestor.date_end.year;</li>
  %end;
  </ul>
%end;
%if;(evar.opt != "csv")
  %base_trailer;
  %copyright;
%end;
</body>
</html>
