summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-05-28 22:28:57 +0000
committerKarl Berry <karl@freefriends.org>2018-05-28 22:28:57 +0000
commita81108bdb8e6c45d62a0e53488c078eeda74767b (patch)
tree2b4c634048e05287cd32172f599a85bb479c4cb7 /Build/source
parent137220c3442927290385d230913b8cb7d6eff71b (diff)
crossrefware (28may18)
git-svn-id: svn://tug.org/texlive/trunk@47861 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl21
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl2
2 files changed, 21 insertions, 2 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl b/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl
index 3f66a6f061b..397e52a6af8 100755
--- a/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl
+++ b/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl
@@ -172,7 +172,7 @@ while (<$input>) {
/\\begin\{thebibliography\}/ || /\\end\{thebibliography\}/) {
next;
}
- if (/\\bibitem(\[[^\]]*\])?\{([^\}]*)\}/) {
+ if (/\\bibitem\s*(\[[^\]]*\])?\{([^\}]*)\}/) {
ProcessBibitem($bibitem);
$bibitem = undef;
$bibitem->{key}=$2;
@@ -266,6 +266,13 @@ sub SearchMref {
}
if ($response =~ /<pre>(.*)<\/pre>/s) {
my $bib= $1;
+ # Looks like Mathscinet sometimes fails to unaccent text.
+ # For the time being we just delete the offending characters.
+ # Should probably write LaTeX::FromUnicode instead
+ $bib =~ s/[^\x00-\x7f]//g;
+ if ($debug) {
+ print STDOUT "DEBUG: got $bib\n";
+ }
my $fh = new FileHandle;
open $fh, "<", \$bib;
my $parser = new BibTeX::Parser($fh);
@@ -273,6 +280,18 @@ sub SearchMref {
if (ref($entry) && $entry->parse_ok()) {
$entry->key($bibitem->{key});
return ($entry);
+ } else {
+ if ($debug) {
+ if (!ref($entry)) {
+ print STDERR "DEBUG: not a reference\n";
+ } else{
+ print STDERR "DEBUG: parsing $entry->parse_ok\n";
+ }
+ }
+ }
+ } else {
+ if ($debug) {
+ print STDOUT "DEBUG: did not get an entry\n";
}
}
}
diff --git a/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl b/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl
index 2dba99eeedc..7516862bafe 100755
--- a/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl
+++ b/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl
@@ -189,7 +189,7 @@ sub GetZbl {
$response->decoded_content, "\n";
}
- if ($response->decoded_content =~ /^\s*"zbl_id":\s*"(.*)",\s*$/m) {
+ if ($response->decoded_content =~ /^\s*"zbl_id":\s*"(.*)",?\s*$/m) {
if ($debug) {
print STDERR "DEBUG: got zbl: $1\n",
}