texlive[53109] trunk: latexpand (12dec19)

commits+karl at tug.org commits+karl at tug.org
Thu Dec 12 23:59:47 CET 2019


Revision: 53109
          http://tug.org/svn/texlive?view=revision&revision=53109
Author:   karl
Date:     2019-12-12 23:59:47 +0100 (Thu, 12 Dec 2019)
Log Message:
-----------
latexpand (12dec19)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/latexpand/latexpand
    trunk/Master/texmf-dist/doc/support/latexpand/LICENCE
    trunk/Master/texmf-dist/doc/support/latexpand/README
    trunk/Master/texmf-dist/doc/support/latexpand/version.txt
    trunk/Master/texmf-dist/scripts/latexpand/latexpand

Modified: trunk/Build/source/texk/texlive/linked_scripts/latexpand/latexpand
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/latexpand/latexpand	2019-12-12 22:59:30 UTC (rev 53108)
+++ trunk/Build/source/texk/texlive/linked_scripts/latexpand/latexpand	2019-12-12 22:59:47 UTC (rev 53109)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # Inspired by latexpand by D. Musliner, University of Michigan
-# 2012, 2013, 2014, 2015, 2016, 2017: Matthieu Moy <git at matthieu-moy.fr>
+# 2012-2019: Matthieu Moy <git at matthieu-moy.fr>
 # BSD License
 
 use strict;
@@ -10,7 +10,9 @@
 use File::Spec;
 
 my $TEXINPUTS = $ENV{'TEXINPUTS'};
-if (!$TEXINPUTS) { $TEXINPUTS = getcwd(); }
+# By default, search in current directory. We use '.' and not getcwd()
+# to avoid issues if the working directory contains a ':' character.
+if (!$TEXINPUTS) { $TEXINPUTS = '.'; }
 
 my $verbose;
 my $keep_comments;
@@ -24,6 +26,7 @@
 my $graphics_extensions = ":.pdf:.png:.jpg:.eps";
 my $expand_usepackage;
 my $expand_bbl;
+my $biber;
 my $fatal;
 my $version;
 my $makeatletter;
@@ -44,6 +47,7 @@
 	'graphics-extensions' => \$graphics_extensions,
 	'expand-usepackage' => \$expand_usepackage,
 	'expand-bbl=s' => \$expand_bbl,
+	'biber=s' => \$biber,
 	'fatal' => \$fatal,
 	'version' => \$version,
         'makeatletter' => \$makeatletter,
@@ -80,7 +84,7 @@
 {
 	# $VERSION's value will be substituted by 'make dist', but the
 	# next line won't (the string has to be broken to avoid it).
-	my $VERSION = 'v1.5';
+	my $VERSION = 'v1.6';
 	if ($VERSION eq '@LATEXPAND' . '_VERSION@') {
 		my($vol,$dir,$file) = File::Spec->splitpath($0);
 		chdir($dir);
@@ -130,6 +134,16 @@
 	process_file($file, "  ");
 }
 
+sub cat_file
+{
+	my $file = shift;
+	open (my $INFILE, "<", $file) || die "could not open input file '$file'\n";
+	while (<$INFILE>) {
+		print;
+	}
+	close ($INFILE);
+}
+
 sub process_file
 {
 	my $file = shift;
@@ -195,8 +209,10 @@
 	if ($in_preamble && /^[^%]*\\makeatother/) {
 		$makeatletter_found = 0;
 	}
+	my $command;
 	if (!$makeatletter && !$makeatletter_found
-	    && (my ($command) = /^[^%]*(\\[[:alpha:]]*@[[:alpha:]]*)/)) {
+	    && (($command) = /^[^%]*(\\[[:alpha:]]*@[[:alpha:]]*)/)
+	    && ($command ne '\@')) {
 		print STDERR "Warning: command $command containing @ found in\n";
 		print STDERR "Warning: $file.\n";
 		print STDERR "Warning: consider using --makeatletter if the result is not compilable.\n";
@@ -235,8 +251,16 @@
 	}
 
 	unless ($keep_includes) {
-		if (my ($before, $ignored, $full_filename, $after)
-		    = /^($NON_COMMENT)\\include[{\s]+(.*?)[\s}](.*)$/) {
+		# \input{foo.tex}
+		my $ARGBRACES = '\{\\s*([^"}\\s][^}]*)(\\s*)\}';
+		# \input{"foo bar.tex"}
+		my $ARGQUOTED = '\{\\s*"([^"]*)"(\\s*)\}';
+		# \input foo.tex
+		my $ARGSPACES = '\\s([^\{\\s][^\\s]+?)\\s()';
+		my $ARGUMENT = "\\s*?(?|$ARGBRACES|$ARGQUOTED|$ARGSPACES)";
+
+		if (my ($before, $ignored, $full_filename, $trailing, $after)
+		    = /^($NON_COMMENT)\\include$ARGUMENT(.*)$/) {
 			$full_filename = find_tex_file($full_filename . ".tex");
 			if ($full_filename) {
 				say $prefix . "Found include for file: $full_filename\n";
@@ -253,8 +277,8 @@
 				print $nl . $after . "\n";
 				$_ = "";
 			}
-		} elsif (my ($before, $ignored, $full_filename, $after)
-			 = /^($NON_COMMENT)\\input[{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $full_filename, $trailing,  $after)
+			 = /^($NON_COMMENT)\\input$ARGUMENT(.*)$/) {
                         if ($inside_import) {
                               $full_filename = $inside_import . $full_filename;
                         }
@@ -261,7 +285,11 @@
 			$full_filename = find_tex_file($full_filename, ":.tex");
 			if ($full_filename) {
 				say $prefix . "Found input for file: $full_filename\n";
-				print $before . $nl;
+				# Surprisingly, space after filename
+				# in \input{foo.tex } is inserted
+				# _before_ the inclusion. Apply this
+				# rule in latexpand.
+				print $before . $trailing . $nl;
 				print "% start input $full_filename\n" if ($explain);
 				my $in_comment = process_file($full_filename, $prefix . "  ");
 				if ($explain) {
@@ -277,8 +305,8 @@
 				}
 				$_ = "";
 			}
-		} elsif (my ($before, $ignored, $dir, $full_filename, $after)
-			 = /^($NON_COMMENT)\\(?:sub)?import[{\s]+(.*?)[\s}][{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $dir, $ignored, $full_filename, $ignored,  $after)
+			 = /^($NON_COMMENT)\\(?:sub)?import$ARGUMENT$ARGUMENT(.*)$/) {
                         if ($explain) {
                               print "% dir " . $dir ."\n";
                               print "% full_filename " . $full_filename ."\n";
@@ -312,8 +340,8 @@
 				}
 				$_ = "";
 			}
-		} elsif (my ($before, $ignored, $args, $full_filename, $after)
-			 = /^($NON_COMMENT)\\includegraphics[\[\s]+(.*?)[\s\]][{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $args, $full_filename, $ignored, $after)
+			 = /^($NON_COMMENT)\\includegraphics[\[\s]+(.*?)[\s\]]$ARGUMENT(.*)$/) {
                         if ($explain) {
                                 print "% inside_import " . $inside_import ."\n";
                                 print "% before " . $before ."\n";
@@ -327,8 +355,8 @@
                                 print "$before\\includegraphics[$args]{$full_filename}$after\n";
                                 $_ = "";
                         }
-		} elsif (my ($before, $ignored, $args, $full_filename, $after)
-			 = /^($NON_COMMENT)\\lstinputlisting[\[\s]+(.*?)[\s\]][{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $args, $full_filename, $ignored, $after)
+			 = /^($NON_COMMENT)\\lstinputlisting[\[\s]+(.*?)[\s\]]$ARGUMENT(.*)$/) {
                         if ($explain) {
                                 print "% inside_import " . $inside_import ."\n";
                                 print "% before " . $before ."\n";
@@ -373,6 +401,36 @@
 			$_ = "";
 		}
 	}
+	if ($biber) {
+		if (my ($before, $after)
+		    = /^(.*)\\(?:addbibresource)\{[^\}]*\}(.*)$/) {
+			# See https://tex.stackexchange.com/questions/166518/biblatex-include-bbl-problem-with-verb-field/166526#166526
+			my $biber_noext = $biber;
+			$biber_noext =~ s/.bbl//;
+			print $before . $nl;
+			say $prefix . "Expanding Biber BBL file: $biber\n";
+			print '\begin{filecontents*}{' . $biber . '}' . "\n";
+			cat_file($biber);
+			print "\n";
+			print '\end{filecontents*}
+
+\usepackage{xpatch}
+
+%Patch the biblatex input command.
+%replace "testinput-bbl" if you change the name above.
+%disable if you want to run biblatex/biber normally
+\makeatletter
+\patchcmd\blx at bblinput{\blx at blxinit}
+                      {\blx at blxinit
+                       \def\jobname{' . $biber_noext . '}%new jobname
+                      }{}{\fail}
+\makeatother
+			    ';
+			say $prefix . "End expansion of Biber BBL file: $biber\n";
+			print " " . $nl . $after . "\n";
+			$_ = "";
+		}
+	}
 	if ($show_graphics) {
 		if (/\\includegraphics(\[[^\]]*\])?{([^}]*)}/) {
                         my $full_filename = $2;
@@ -393,10 +451,24 @@
 	print;
 }
 
+sub unquote
+{
+	my $str = shift;
+	my $x = substr($str, 0, 1);
+	my $y = substr($str, -1, 1);
+	if ($x eq $y && ($x eq '"' || $x eq "'")) {
+		$str = substr($str, 1, -1);
+	}
+	# There's a weird LaTeX syntax: \include{"file\space
+	# with\space spaces"}, so remove these \space when unquoting.
+	$str =~ s/\\space / /g;
+	return $str;
+}
+
 # search $1 in $TEXINPUTS, with possible extensions in $2
 sub find_tex_file
 {
-	my $file = shift;
+	my $file = unquote(shift);
 	my $extensions = (shift || ":");
 	foreach my $ext (split(':', $extensions, -1)) {
 		my $full = find_file_global($file . $ext);
@@ -417,15 +489,17 @@
 	my $file = shift;
 	if (open(my $fh, "-|", "kpsewhich", $file)) {
 		my $full = <$fh>;
-		chomp($full);
+		$full =~ s/\s+$//;
 		close($fh);
 		if ($full) {
 			return $full;
 		}
 	}
+	# Should be useless, but fall-back in case kpsewhich fails (or is not installed, or ...):
 	return find_file($file, $TEXINPUTS);
 }
 
+# Find files, not searching for global files (to allow not expanding global .sty packages)
 sub find_file
 {
 	my ($file, $path) = @_;
@@ -436,6 +510,13 @@
 			return;
 		}
 	}
+
+	# TEXINPUTS=...: (trailing :) means "append default search
+	# directories". We don't want global directories here, but
+	# still add . that may be needed.
+	if (substr($path, -1) eq ':') {
+		$path .= '.';
+	}
 	foreach my $dir (split(':', $path)) {
 		if (-e "$dir/$file" && ! -d "$dir/$file") {
 			return("$dir/$file");
@@ -471,6 +552,10 @@
 	--expand-bbl FILE
 	                 Expand the bibliography by inlining FILE
 	                 (should be a *.bbl file)
+	--biber FILE	 Include \bibliography{} with FILE's content,
+	                 as needed by biblatex with the biber backend.
+	                 (similar to --expand-bbl FILE, but for
+	                 biber+biblatex).
 	--help           this help message
 	--output <file>, -o <file>
 	                 generate output in <file>
@@ -577,4 +662,4 @@
 
 =head1 VERSION
 
-This is latexpand version v1.5.
+This is latexpand version v1.6.

Modified: trunk/Master/texmf-dist/doc/support/latexpand/LICENCE
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexpand/LICENCE	2019-12-12 22:59:30 UTC (rev 53108)
+++ trunk/Master/texmf-dist/doc/support/latexpand/LICENCE	2019-12-12 22:59:47 UTC (rev 53109)
@@ -1,5 +1,6 @@
-Copyright (c) 2012, 2013, 2014, 2015, 2016,
-              Matthieu Moy <git at matthieu-moy.fr>
+Copyright (c) 2012-2019, Matthieu Moy <git at matthieu-moy.fr> and
+contributors.
+
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

Modified: trunk/Master/texmf-dist/doc/support/latexpand/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexpand/README	2019-12-12 22:59:30 UTC (rev 53108)
+++ trunk/Master/texmf-dist/doc/support/latexpand/README	2019-12-12 22:59:47 UTC (rev 53109)
@@ -20,6 +20,10 @@
             --expand-bbl FILE
                              Expand the bibliography by inlining FILE
                              (should be a *.bbl file)
+            --biber FILE     Include \bibliography{} with FILE's content,
+                             as needed by biblatex with the biber backend.
+                             (similar to --expand-bbl FILE, but for
+                             biber+biblatex).
             --help           this help message
             --output <file>, -o <file>
                              generate output in <file>
@@ -117,5 +121,5 @@
     https://lacl.fr/~caubert/notes/portabilite-du-tex.html#dependances
 
 VERSION
-    This is latexpand version v1.5.
+    This is latexpand version v1.6.
 

Modified: trunk/Master/texmf-dist/doc/support/latexpand/version.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexpand/version.txt	2019-12-12 22:59:30 UTC (rev 53108)
+++ trunk/Master/texmf-dist/doc/support/latexpand/version.txt	2019-12-12 22:59:47 UTC (rev 53109)
@@ -1,2 +1,2 @@
-latexpand version v1.5 (be890116022866564388af207e11f4b5b962d57d).
-Committed on Sat Feb 16 08:42:38 2019 +0100.
+latexpand version v1.6 (ce086093a2413c99af11cc08aceab8e5483d65ff).
+Committed on Thu Dec 12 09:37:27 2019 +0000.

Modified: trunk/Master/texmf-dist/scripts/latexpand/latexpand
===================================================================
--- trunk/Master/texmf-dist/scripts/latexpand/latexpand	2019-12-12 22:59:30 UTC (rev 53108)
+++ trunk/Master/texmf-dist/scripts/latexpand/latexpand	2019-12-12 22:59:47 UTC (rev 53109)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # Inspired by latexpand by D. Musliner, University of Michigan
-# 2012, 2013, 2014, 2015, 2016, 2017: Matthieu Moy <git at matthieu-moy.fr>
+# 2012-2019: Matthieu Moy <git at matthieu-moy.fr>
 # BSD License
 
 use strict;
@@ -10,7 +10,9 @@
 use File::Spec;
 
 my $TEXINPUTS = $ENV{'TEXINPUTS'};
-if (!$TEXINPUTS) { $TEXINPUTS = getcwd(); }
+# By default, search in current directory. We use '.' and not getcwd()
+# to avoid issues if the working directory contains a ':' character.
+if (!$TEXINPUTS) { $TEXINPUTS = '.'; }
 
 my $verbose;
 my $keep_comments;
@@ -24,6 +26,7 @@
 my $graphics_extensions = ":.pdf:.png:.jpg:.eps";
 my $expand_usepackage;
 my $expand_bbl;
+my $biber;
 my $fatal;
 my $version;
 my $makeatletter;
@@ -44,6 +47,7 @@
 	'graphics-extensions' => \$graphics_extensions,
 	'expand-usepackage' => \$expand_usepackage,
 	'expand-bbl=s' => \$expand_bbl,
+	'biber=s' => \$biber,
 	'fatal' => \$fatal,
 	'version' => \$version,
         'makeatletter' => \$makeatletter,
@@ -80,7 +84,7 @@
 {
 	# $VERSION's value will be substituted by 'make dist', but the
 	# next line won't (the string has to be broken to avoid it).
-	my $VERSION = 'v1.5';
+	my $VERSION = 'v1.6';
 	if ($VERSION eq '@LATEXPAND' . '_VERSION@') {
 		my($vol,$dir,$file) = File::Spec->splitpath($0);
 		chdir($dir);
@@ -130,6 +134,16 @@
 	process_file($file, "  ");
 }
 
+sub cat_file
+{
+	my $file = shift;
+	open (my $INFILE, "<", $file) || die "could not open input file '$file'\n";
+	while (<$INFILE>) {
+		print;
+	}
+	close ($INFILE);
+}
+
 sub process_file
 {
 	my $file = shift;
@@ -195,8 +209,10 @@
 	if ($in_preamble && /^[^%]*\\makeatother/) {
 		$makeatletter_found = 0;
 	}
+	my $command;
 	if (!$makeatletter && !$makeatletter_found
-	    && (my ($command) = /^[^%]*(\\[[:alpha:]]*@[[:alpha:]]*)/)) {
+	    && (($command) = /^[^%]*(\\[[:alpha:]]*@[[:alpha:]]*)/)
+	    && ($command ne '\@')) {
 		print STDERR "Warning: command $command containing @ found in\n";
 		print STDERR "Warning: $file.\n";
 		print STDERR "Warning: consider using --makeatletter if the result is not compilable.\n";
@@ -235,8 +251,16 @@
 	}
 
 	unless ($keep_includes) {
-		if (my ($before, $ignored, $full_filename, $after)
-		    = /^($NON_COMMENT)\\include[{\s]+(.*?)[\s}](.*)$/) {
+		# \input{foo.tex}
+		my $ARGBRACES = '\{\\s*([^"}\\s][^}]*)(\\s*)\}';
+		# \input{"foo bar.tex"}
+		my $ARGQUOTED = '\{\\s*"([^"]*)"(\\s*)\}';
+		# \input foo.tex
+		my $ARGSPACES = '\\s([^\{\\s][^\\s]+?)\\s()';
+		my $ARGUMENT = "\\s*?(?|$ARGBRACES|$ARGQUOTED|$ARGSPACES)";
+
+		if (my ($before, $ignored, $full_filename, $trailing, $after)
+		    = /^($NON_COMMENT)\\include$ARGUMENT(.*)$/) {
 			$full_filename = find_tex_file($full_filename . ".tex");
 			if ($full_filename) {
 				say $prefix . "Found include for file: $full_filename\n";
@@ -253,8 +277,8 @@
 				print $nl . $after . "\n";
 				$_ = "";
 			}
-		} elsif (my ($before, $ignored, $full_filename, $after)
-			 = /^($NON_COMMENT)\\input[{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $full_filename, $trailing,  $after)
+			 = /^($NON_COMMENT)\\input$ARGUMENT(.*)$/) {
                         if ($inside_import) {
                               $full_filename = $inside_import . $full_filename;
                         }
@@ -261,7 +285,11 @@
 			$full_filename = find_tex_file($full_filename, ":.tex");
 			if ($full_filename) {
 				say $prefix . "Found input for file: $full_filename\n";
-				print $before . $nl;
+				# Surprisingly, space after filename
+				# in \input{foo.tex } is inserted
+				# _before_ the inclusion. Apply this
+				# rule in latexpand.
+				print $before . $trailing . $nl;
 				print "% start input $full_filename\n" if ($explain);
 				my $in_comment = process_file($full_filename, $prefix . "  ");
 				if ($explain) {
@@ -277,8 +305,8 @@
 				}
 				$_ = "";
 			}
-		} elsif (my ($before, $ignored, $dir, $full_filename, $after)
-			 = /^($NON_COMMENT)\\(?:sub)?import[{\s]+(.*?)[\s}][{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $dir, $ignored, $full_filename, $ignored,  $after)
+			 = /^($NON_COMMENT)\\(?:sub)?import$ARGUMENT$ARGUMENT(.*)$/) {
                         if ($explain) {
                               print "% dir " . $dir ."\n";
                               print "% full_filename " . $full_filename ."\n";
@@ -312,8 +340,8 @@
 				}
 				$_ = "";
 			}
-		} elsif (my ($before, $ignored, $args, $full_filename, $after)
-			 = /^($NON_COMMENT)\\includegraphics[\[\s]+(.*?)[\s\]][{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $args, $full_filename, $ignored, $after)
+			 = /^($NON_COMMENT)\\includegraphics[\[\s]+(.*?)[\s\]]$ARGUMENT(.*)$/) {
                         if ($explain) {
                                 print "% inside_import " . $inside_import ."\n";
                                 print "% before " . $before ."\n";
@@ -327,8 +355,8 @@
                                 print "$before\\includegraphics[$args]{$full_filename}$after\n";
                                 $_ = "";
                         }
-		} elsif (my ($before, $ignored, $args, $full_filename, $after)
-			 = /^($NON_COMMENT)\\lstinputlisting[\[\s]+(.*?)[\s\]][{\s]+(.*?)[\s}](.*)$/) {
+		} elsif (my ($before, $ignored, $args, $full_filename, $ignored, $after)
+			 = /^($NON_COMMENT)\\lstinputlisting[\[\s]+(.*?)[\s\]]$ARGUMENT(.*)$/) {
                         if ($explain) {
                                 print "% inside_import " . $inside_import ."\n";
                                 print "% before " . $before ."\n";
@@ -373,6 +401,36 @@
 			$_ = "";
 		}
 	}
+	if ($biber) {
+		if (my ($before, $after)
+		    = /^(.*)\\(?:addbibresource)\{[^\}]*\}(.*)$/) {
+			# See https://tex.stackexchange.com/questions/166518/biblatex-include-bbl-problem-with-verb-field/166526#166526
+			my $biber_noext = $biber;
+			$biber_noext =~ s/.bbl//;
+			print $before . $nl;
+			say $prefix . "Expanding Biber BBL file: $biber\n";
+			print '\begin{filecontents*}{' . $biber . '}' . "\n";
+			cat_file($biber);
+			print "\n";
+			print '\end{filecontents*}
+
+\usepackage{xpatch}
+
+%Patch the biblatex input command.
+%replace "testinput-bbl" if you change the name above.
+%disable if you want to run biblatex/biber normally
+\makeatletter
+\patchcmd\blx at bblinput{\blx at blxinit}
+                      {\blx at blxinit
+                       \def\jobname{' . $biber_noext . '}%new jobname
+                      }{}{\fail}
+\makeatother
+			    ';
+			say $prefix . "End expansion of Biber BBL file: $biber\n";
+			print " " . $nl . $after . "\n";
+			$_ = "";
+		}
+	}
 	if ($show_graphics) {
 		if (/\\includegraphics(\[[^\]]*\])?{([^}]*)}/) {
                         my $full_filename = $2;
@@ -393,10 +451,24 @@
 	print;
 }
 
+sub unquote
+{
+	my $str = shift;
+	my $x = substr($str, 0, 1);
+	my $y = substr($str, -1, 1);
+	if ($x eq $y && ($x eq '"' || $x eq "'")) {
+		$str = substr($str, 1, -1);
+	}
+	# There's a weird LaTeX syntax: \include{"file\space
+	# with\space spaces"}, so remove these \space when unquoting.
+	$str =~ s/\\space / /g;
+	return $str;
+}
+
 # search $1 in $TEXINPUTS, with possible extensions in $2
 sub find_tex_file
 {
-	my $file = shift;
+	my $file = unquote(shift);
 	my $extensions = (shift || ":");
 	foreach my $ext (split(':', $extensions, -1)) {
 		my $full = find_file_global($file . $ext);
@@ -417,15 +489,17 @@
 	my $file = shift;
 	if (open(my $fh, "-|", "kpsewhich", $file)) {
 		my $full = <$fh>;
-		chomp($full);
+		$full =~ s/\s+$//;
 		close($fh);
 		if ($full) {
 			return $full;
 		}
 	}
+	# Should be useless, but fall-back in case kpsewhich fails (or is not installed, or ...):
 	return find_file($file, $TEXINPUTS);
 }
 
+# Find files, not searching for global files (to allow not expanding global .sty packages)
 sub find_file
 {
 	my ($file, $path) = @_;
@@ -436,6 +510,13 @@
 			return;
 		}
 	}
+
+	# TEXINPUTS=...: (trailing :) means "append default search
+	# directories". We don't want global directories here, but
+	# still add . that may be needed.
+	if (substr($path, -1) eq ':') {
+		$path .= '.';
+	}
 	foreach my $dir (split(':', $path)) {
 		if (-e "$dir/$file" && ! -d "$dir/$file") {
 			return("$dir/$file");
@@ -471,6 +552,10 @@
 	--expand-bbl FILE
 	                 Expand the bibliography by inlining FILE
 	                 (should be a *.bbl file)
+	--biber FILE	 Include \bibliography{} with FILE's content,
+	                 as needed by biblatex with the biber backend.
+	                 (similar to --expand-bbl FILE, but for
+	                 biber+biblatex).
 	--help           this help message
 	--output <file>, -o <file>
 	                 generate output in <file>
@@ -577,4 +662,4 @@
 
 =head1 VERSION
 
-This is latexpand version v1.5.
+This is latexpand version v1.6.



More information about the tex-live-commits mailing list