Skip to content

Commit

Permalink
No need to include surnames in books with -s
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 18, 2024
1 parent 83383fc commit 3666a22
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -1319,23 +1319,25 @@ if($opts{'H'}) {
$surname = $name;
$given_names = 'UNKNOWN';
}
if((!defined($current_surname)) || ($surname ne $current_surname)) {
$current_surname = $surname;
my $initial = uc(substr($surname, 0, 1));
if((!defined($current_initial)) || ($initial ne $current_initial)) {
$current_initial = $initial;
if(!$opts{'s'}) {
if((!defined($current_surname)) || ($surname ne $current_surname)) {
$current_surname = $surname;
my $initial = uc(substr($surname, 0, 1));
if((!defined($current_initial)) || ($initial ne $current_initial)) {
$current_initial = $initial;

$text->font($times_bold, 20);
$text->translate(25, $pdfpage->newline());
$text->translate(25, $pdfpage->newline());
$text->text($initial);
$text->font($times_bold, 20);
$text->translate(25, $pdfpage->newline());
$text->translate(25, $pdfpage->newline());
$text->text($initial);
$text->translate(25, $pdfpage->newline());
}

$text->font($times_italic, 16);
$text->translate(25, $pdfpage->newline());
$text->text(normalize_name($surname));
$text->font($times, 12);
}

$text->font($times_italic, 16);
$text->translate(25, $pdfpage->newline());
$text->text(normalize_name($surname));
$text->font($times, 12);
}
$text->translate(35, $pdfpage->newline());
$text->text("$given_names - " . join(', ', List::Uniq::uniq(@{$names2pages{$name}})));
Expand Down Expand Up @@ -1952,6 +1954,7 @@ sub print_person

$text->font($params{'font'}, 12);
if(my $key = $person->surname()) {
$key = normalize_name($key);
if(my $given = given_names($person)) {
$key .= ", $given";
}
Expand Down Expand Up @@ -6864,20 +6867,20 @@ sub print_person
$text->font($params{'font'}, 12);
pdfprint(string => $bio, text => $text, pdfpage => $pdfpage);
}
$bio = Data::Text->new(' ');
$bio = Data::Text->new(' ');
}
} else {
if($phrase->length() > 0) {
push @phrases, $phrase;
$phrase = Data::Text->new();
}
if(scalar(@phrases)) {
$bio->append(conjunction(map { $_->as_string() } @phrases))->append('.');
$bio->append(conjunction(map { $_->as_string() } @phrases))->append(".\n");
@phrases = ();
}
}
$notes =~ s/\.$//;
$phrase = Data::Text->new("\n")->append($notes);
$phrase = Data::Text->new($notes);
}

if($opts{'C'}) {
Expand Down

0 comments on commit 3666a22

Please sign in to comment.