Changeset 3156 for trunk/gsdl/perllib/plugins/BibTexPlug.pm
- Timestamp:
- 2002-06-18T14:01:26+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BibTexPlug.pm
r3142 r3156 249 249 use utf8; 250 250 if ($fullname =~ /\w+, \w+/) { 251 $doc_obj->add_utf8_metadata ($cursection, "Author", $fullname); 251 $doc_obj->add_utf8_metadata ($cursection, "Author", $fullname); 252 } else { 252 253 } 253 254 } … … 458 459 # ',s' => chr(0xc5).chr(0xa1), 459 460 # ',S' => chr(0xc5).chr(0xa5), 460 # breve461 461 # double acute 462 462 # ring … … 493 493 my %special_utf8_chars = 494 494 ( 495 # breve 496 'u g' => chr(0xc4).chr(0x9f), 497 'u G' => chr(0xc4).chr(0x9e), 498 'u i' => chr(0xc4).chr(0xad), 499 'u I' => chr(0xc4).chr(0xac), 500 'u o' => chr(0xc5).chr(0x8f), 501 'u O' => chr(0xc5).chr(0x8e), 502 'u u' => chr(0xc5).chr(0xad), 503 'u U' => chr(0xc5).chr(0xac), 495 504 # caron 505 'v c' => chr(0xc4).chr(0x8d), 506 'v C' => chr(0xc4).chr(0x8c), 496 507 'v n' => chr(0xc5).chr(0x88), 497 508 'v N' => chr(0xc5).chr(0x87), 498 509 'v s' => chr(0xc5).chr(0xa1), 499 510 'v S' => chr(0xc5).chr(0xa5), 511 'v z' => chr(0xc5).chr(0xbe), 512 'v Z' => chr(0xc5).chr(0xbd), 500 513 # cedilla 501 514 'c c' => chr(0xc3).chr(0xa7), … … 543 556 544 557 # remove {} around a single character (eg \'{e}) 545 $text =~ s@(\\[`'="\.]){(\w)}@ $1$2@g;558 $text =~ s@(\\[`'="\.]){(\w)}@{$1$2}@g; 546 559 547 560 # remove {} around a single character for special 1 letter commands - 548 561 # need to insert a space. Eg \v{s} -> {\v s} 549 $text =~ s@(\\[vcH]){(\w)}@{$1 $2}@; 550 562 $text =~ s@(\\[uvcH]){(\w)}@{$1 $2}@g; 551 563 # this is slow (go through whole hash for each substitution!) so 552 564 # only do if the text contains a '\' character. … … 563 575 } 564 576 # remove latex commands 565 $text =~ s@\\noopsort{[^}]+\}@@g; 566 $text =~ s@\\\w+{([^}]*)}@$1@g; # all other commands 577 # commands with optional arguments... 578 $text =~ s@\\\w+(\[.*?\])?\s*@@g; 579 # $text =~ s@\\noopsort{[^}]+\}@@g; 580 # $text =~ s@\\\w+{(([^}]*[^\\])*)}@$1@g; # all other commands 567 581 568 582 # remove latex groupings { } (but not \{ or \} )
Note:
See TracChangeset
for help on using the changeset viewer.