texlive[47861] trunk: crossrefware (28may18)

commits+karl at tug.org commits+karl at tug.org
Tue May 29 00:28:58 CEST 2018


Revision: 47861
          http://tug.org/svn/texlive?view=revision&revision=47861
Author:   karl
Date:     2018-05-29 00:28:57 +0200 (Tue, 29 May 2018)
Log Message:
-----------
crossrefware (28may18)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl
    trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl
    trunk/Master/texmf-dist/doc/man/man1/bbl2bib.1
    trunk/Master/texmf-dist/doc/man/man1/bbl2bib.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/bibzbladd.1
    trunk/Master/texmf-dist/doc/man/man1/bibzbladd.man1.pdf
    trunk/Master/texmf-dist/doc/support/crossrefware/README
    trunk/Master/texmf-dist/doc/support/crossrefware/crossrefware.pdf
    trunk/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl
    trunk/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl

Modified: trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bbl2bib.pl	2018-05-28 22:28:57 UTC (rev 47861)
@@ -172,7 +172,7 @@
 	/\\begin\{thebibliography\}/ || /\\end\{thebibliography\}/) {
 	next;
     }
-    if (/\\bibitem(\[[^\]]*\])?\{([^\}]*)\}/) {
+    if (/\\bibitem\s*(\[[^\]]*\])?\{([^\}]*)\}/) {
 	ProcessBibitem($bibitem);
 	$bibitem = undef;
 	$bibitem->{key}=$2;
@@ -266,6 +266,13 @@
     }
     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,7 +280,19 @@
 	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";
+	}
     }
 }
 

Modified: trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Build/source/texk/texlive/linked_scripts/crossrefware/bibzbladd.pl	2018-05-28 22:28:57 UTC (rev 47861)
@@ -189,7 +189,7 @@
 	$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",
 	}

Modified: trunk/Master/texmf-dist/doc/man/man1/bbl2bib.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/bbl2bib.1	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Master/texmf-dist/doc/man/man1/bbl2bib.1	2018-05-28 22:28:57 UTC (rev 47861)
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "bbl2bib 1"
-.TH bbl2bib 1 "2017-11-26" "" "CROSSREF LIBRARY"
+.TH bbl2bib 1 "2018-04-29" "" "CROSSREF LIBRARY"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l

Modified: trunk/Master/texmf-dist/doc/man/man1/bbl2bib.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/bibzbladd.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/bibzbladd.1	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Master/texmf-dist/doc/man/man1/bibzbladd.1	2018-05-28 22:28:57 UTC (rev 47861)
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "bibzbladd 1"
-.TH bibzbladd 1 "2017-11-18" "" "CROSSREF LIBRARY"
+.TH bibzbladd 1 "2018-04-15" "" "CROSSREF LIBRARY"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l

Modified: trunk/Master/texmf-dist/doc/man/man1/bibzbladd.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/crossrefware/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/crossrefware/README	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Master/texmf-dist/doc/support/crossrefware/README	2018-05-28 22:28:57 UTC (rev 47861)
@@ -27,6 +27,9 @@
 
 Changes:
 
+	2018/04/15    - Fixed a bug in bibzbladd
+		      - Work around a bug in mathscinet
+
 	2017/11/26:   - Switched to date-based versioning for the
 		        bundle. 
                       - bbl2bib now converts urls starting with

Modified: trunk/Master/texmf-dist/doc/support/crossrefware/crossrefware.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Master/texmf-dist/scripts/crossrefware/bbl2bib.pl	2018-05-28 22:28:57 UTC (rev 47861)
@@ -172,7 +172,7 @@
 	/\\begin\{thebibliography\}/ || /\\end\{thebibliography\}/) {
 	next;
     }
-    if (/\\bibitem(\[[^\]]*\])?\{([^\}]*)\}/) {
+    if (/\\bibitem\s*(\[[^\]]*\])?\{([^\}]*)\}/) {
 	ProcessBibitem($bibitem);
 	$bibitem = undef;
 	$bibitem->{key}=$2;
@@ -266,6 +266,13 @@
     }
     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,7 +280,19 @@
 	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";
+	}
     }
 }
 

Modified: trunk/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl	2018-05-28 22:28:24 UTC (rev 47860)
+++ trunk/Master/texmf-dist/scripts/crossrefware/bibzbladd.pl	2018-05-28 22:28:57 UTC (rev 47861)
@@ -189,7 +189,7 @@
 	$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",
 	}



More information about the tex-live-commits mailing list