diff options
author | Karl Berry <karl@freefriends.org> | 2018-05-28 22:28:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-05-28 22:28:57 +0000 |
commit | a81108bdb8e6c45d62a0e53488c078eeda74767b (patch) | |
tree | 2b4c634048e05287cd32172f599a85bb479c4cb7 /Master/texmf-dist/scripts/crossrefware | |
parent | 137220c3442927290385d230913b8cb7d6eff71b (diff) |
crossrefware (28may18)
git-svn-id: svn://tug.org/texlive/trunk@47861 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/crossrefware')
-rwxr-xr-x | Master/texmf-dist/scripts/crossrefware/bbl2bib.pl | 21 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/crossrefware/bibzbladd.pl | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl b/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl index 3f66a6f061b..397e52a6af8 100755 --- a/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl +++ b/Master/texmf-dist/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/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl b/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl index 2dba99eeedc..7516862bafe 100755 --- a/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl +++ b/Master/texmf-dist/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", } |