Changeset 13413
- Timestamp:
- 2006-12-05T11:43:25+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BibTexPlug.pm
r12169 r13413 221 221 $value =~ s/^"//; $value =~ s/"$//; 222 222 } 223 $value = &process_latex($value); 224 225 # Add this line of metadata 226 $metadata{$entryname} .= "$value"; 227 223 224 # special case for year - we only want a 4 digit year, not 225 # "circa 2004" etc 226 if ($entryname=~ /^year$/i) { 227 if ($value=~ /(\d{4})/) { 228 $value=$1; 229 $metadata{$entryname} .= "$value"; 230 } 231 } 232 else { 233 234 $value = &process_latex($value); 235 # Add this line of metadata 236 $metadata{$entryname} .= "$value"; 237 } 228 238 } 229 239 … … 365 375 # Add the various fields as metadata 366 376 $doc_obj->add_utf8_metadata ($cursection, $name, $value); 377 367 378 } 368 379 … … 692 703 # remove space (if any) between \ and letter to accent (eg {\' a}) 693 704 694 $text =~ s@(\\[`'="^~\.])\s(\w)@$1$2@g; 695 705 $text =~ s@(\\[`'="^~\.])\s(\w)@$1$2@g; #` 706 696 707 # remove {} around a single character (eg \'{e}) 697 $text =~ s@(\\[`'="^~\.]){(\w)}@{$1$2}@g; 708 $text =~ s@(\\[`'="^~\.]){(\w)}@{$1$2}@g; #` 698 709 699 710 # \, is another way of doing cedilla \c … … 707 718 if ($text =~ m|\\|) { 708 719 # "normal" accents - ie non-alpha latex tag 709 while ($text =~ m@\\([`'="^~\.])([\w])@) { 720 while ($text =~ m@\\([`'="^~\.])([\w])@) { #` 710 721 my $tex="$1$2"; my $char="$2"; 711 722 my $replacement=$utf8_chars{$tex};
Note:
See TracChangeset
for help on using the changeset viewer.