App-PDFLibrarian
view release on metacpan or search on metacpan
lib/App/PDFLibrarian/BibTeX.pm view on Meta::CPAN
# determine author format
my $authorformat;
if ($bibfield eq "collaboration") {
$authorformat = new Text::BibTeX::NameFormat("l");
$authorformat->set_text(BTN_LAST, "{", "}", undef, undef);
} else {
$authorformat = new Text::BibTeX::NameFormat("vljf");
$authorformat->set_text(BTN_LAST, "{", "}", undef, undef);
$authorformat->set_text(BTN_FIRST, undef, undef, undef, ".");
$authorformat->set_options(BTN_FIRST, 1, BTJ_FORCETIE, BTJ_SPACE);
}
# iterate over authors
my @authors = $bibentry->split($bibfield);
foreach my $author (@authors) {
# sanitise author string
$author =~ s/~/ /g;
$author =~ s/\.\s-/.-/g;
$author =~ s/\bet\sal\.?/others/;
( run in 0.482 second using v1.01-cache-2.11-cpan-e1769b4cff6 )