Changeset 38802 for main/trunk/greenstone2
- Timestamp:
- 2024-02-28T13:18:31+13:00 (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BibTexPlugin.pm
r32129 r38802 190 190 191 191 192 print "Processing line = $line \n" if $verbosity>=4; 193 194 # The first line is special, it contains the reference type and OID 195 if ($line =~ /\@(\w+)\W*\{\W*([\*\.\w\d:-]*)\W*$/) { 196 $EntryType = $1; 197 my $EntryID = (defined $2) ? $2 : "default"; 198 print "** $EntryType - \"$EntryID\" \n" 199 if ($verbosity >= 4); 200 192 print STDERR "Processing line = $line \n" if $verbosity>=4; 193 194 # The first line is special, it contains the reference type and optional OID 195 # oid (citekey) can contain alphanumeric, _, - and : 196 if ($line =~ /\@(\w+)\W*\{\W*([\*\.\w:-]*)\W*$/) { 197 $EntryType = $1; # eg @workingpaper 198 my $EntryID = $2; # eg {Witen2020, 199 print "** $EntryType - \"$EntryID\" \n" if ($verbosity >= 4); 200 if (defined $EntryID && $EntryID =~ /\w+/) { 201 $self->{'key'} = $EntryID; 202 } 201 203 next; 202 204 } … … 816 818 } 817 819 818 sub add_ OID {820 sub add_segment_OID { 819 821 my $self = shift (@_); 820 822 my ($doc_obj, $id, $segment_number) = @_; 821 822 823 if ( $self->{'key'} eq "default") { 823 $self->SUPER::add_OID(@_); 824 # $doc_obj->set_OID("$id\_$segment_number"); 824 $self->SUPER::add_segment_OID(@_); 825 825 } else { 826 826 $doc_obj->set_OID($self->{'key'});
Note:
See TracChangeset
for help on using the changeset viewer.