summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-09 03:00:43 +0000
committerNorbert Preining <norbert@preining.info>2019-09-09 03:00:43 +0000
commitcb5ec966f1a3e9b26dcd7fc1b13998e03581b8fd (patch)
tree5808cf29f3f394729731e7ce4d2e04d27c58b076 /support
parentdce09de80c37afccb6addb25d0c7d40367059ece (diff)
CTAN sync 201909090300
Diffstat (limited to 'support')
-rw-r--r--support/bundledoc/README16
-rw-r--r--support/bundledoc/arlatex.122
-rw-r--r--support/bundledoc/arlatex.pdfbin16731 -> 33296 bytes
-rwxr-xr-xsupport/bundledoc/bundledoc100
-rw-r--r--support/bundledoc/bundledoc.152
-rw-r--r--support/bundledoc/bundledoc.pdfbin29217 -> 49713 bytes
6 files changed, 133 insertions, 57 deletions
diff --git a/support/bundledoc/README b/support/bundledoc/README
index 30b6622021..bf65ec4454 100644
--- a/support/bundledoc/README
+++ b/support/bundledoc/README
@@ -25,14 +25,14 @@ as its archiver in place of tar, zip, etc.
Files
-----
--rwxrwxr-x 1 pakin users 9978 May 22 22:39 arlatex
--rw-r--r-- 1 pakin users 10176 May 22 22:40 arlatex.1
--rw-r--r-- 1 pakin users 16731 May 22 22:40 arlatex.pdf
--rwxrwxr-x 1 pakin users 29338 May 22 22:37 bundledoc
--rw-r--r-- 1 pakin users 23015 May 22 22:37 bundledoc.1
--rw-r--r-- 1 pakin users 29217 May 22 22:37 bundledoc.pdf
+-rwxrwxr-x 1 pakin users 9978 May 22 2018 arlatex
+-rw-r--r-- 1 pakin users 10262 Sep 6 22:21 arlatex.1
+-rw-r--r-- 1 pakin users 33296 Sep 6 22:26 arlatex.pdf
+-rwxrwxr-x 1 pakin users 31263 Sep 7 23:17 bundledoc
+-rw-r--r-- 1 pakin users 23351 Sep 7 23:18 bundledoc.1
+-rw-r--r-- 1 pakin users 49713 Sep 7 23:18 bundledoc.pdf
-rw-rw-r-- 1 pakin users 342 Jan 22 2014 miktex.cfg
--rw-r--r-- 1 pakin users 4430 May 22 22:40 README
+-rw-r--r-- 1 pakin users 4435 Sep 7 23:18 README
-rw-r--r-- 1 pakin users 248 Aug 24 2014 texlive-unix-arlatex.cfg
-rw-rw-r-- 1 pakin users 230 Apr 9 2010 texlive-unix.cfg
@@ -84,7 +84,7 @@ Copyright and license
---------------------
bundledoc
- Copyright (C) 2018 Scott Pakin
+ Copyright (C) 2018-2019 Scott Pakin
This program may be distributed and/or modified under the conditions
of the LaTeX Project Public License, either version 1.3c of this
diff --git a/support/bundledoc/arlatex.1 b/support/bundledoc/arlatex.1
index b485702d89..8ffce4fe1a 100644
--- a/support/bundledoc/arlatex.1
+++ b/support/bundledoc/arlatex.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -54,16 +54,20 @@
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
-. if !\nF==2 \{\
-. nr % 0
-. nr F 2
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
. \}
.\}
+.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
@@ -278,7 +282,7 @@ find it. That is, if the user running \fBlatex\fR on an
a different directory.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-\&\fIbundledoc\fR\|(1), \fIlatex\fR\|(1), \fIshar\fR\|(1), \fItar\fR\|(1), \fIzip\fR\|(1)
+\&\fBbundledoc\fR\|(1), \fBlatex\fR\|(1), \fBshar\fR\|(1), \fBtar\fR\|(1), \fBzip\fR\|(1)
.SH "AUTHOR"
.IX Header "AUTHOR"
Scott Pakin, \fIscott+bdoc@pakin.org\fR
diff --git a/support/bundledoc/arlatex.pdf b/support/bundledoc/arlatex.pdf
index 07601aeda2..66eb04a4eb 100644
--- a/support/bundledoc/arlatex.pdf
+++ b/support/bundledoc/arlatex.pdf
Binary files differ
diff --git a/support/bundledoc/bundledoc b/support/bundledoc/bundledoc
index 142f1aaac0..02c7d8e5d9 100755
--- a/support/bundledoc/bundledoc
+++ b/support/bundledoc/bundledoc
@@ -7,7 +7,7 @@
########################################################################
# bundledoc #
-# Copyright (C) 2018 Scott Pakin #
+# Copyright (C) 2018-2019 Scott Pakin #
# #
# This program may be distributed and/or modified under the conditions #
# of the LaTeX Project Public License, either version 1.3c of this #
@@ -24,8 +24,8 @@
# in the Files section of the associated README file. #
########################################################################
-use 5.006; # Fail gracefully if we're not using Perl v5.6.0.
-our $VERSION = "3.3"; # Specify the version of bundledoc.
+use 5.006; # Fail gracefully if we're not using Perl v5.6.0+.
+our $VERSION = "3.4"; # Specify the version of bundledoc.
use File::Basename;
use File::Copy;
use File::Spec::Functions qw(abs2rel catfile devnull rel2abs rootdir updir);
@@ -87,8 +87,7 @@ sub executecmd ($)
my $retval;
if ($verbose) {
- print "EXECUTING: $command\n";
- print " (BDINPUTS = $ENV{BDINPUTS})\n";
+ print "EXECUTING $command WITH BDINPUTS = $ENV{BDINPUTS}\n";
}
if ($pathsep eq "\\") {
# Dirty trick to work around idiotic "\" --> "/" conversion
@@ -100,12 +99,65 @@ sub executecmd ($)
die "${progname}: $!. Failing command was:\n\t$command\n" if $retval;
}
+# Append ".dep" to the dependency file if necessary.
+sub find_dependency_file ($)
+{
+ my $depfile = $_[0];
+
+ # Return the file as is if it exists.
+ return $depfile if -e $depfile || $depfile =~ /\.dep$/;
+
+ # Return the file with ".dep" appended if that exists.
+ return "${depfile}.dep" if -e "${depfile}.dep";
+
+ # Give up and return the file as specified.
+ return $depfile;
+}
+
+# Try hard to find a configuration file. Return the name of the actual file we
+# located.
+sub find_config_file ($)
+{
+ my $configfile = $_[0];
+ no warnings; # Don't complain if kpsewhich isn't found.
+
+ # Attempt 1: See if the file exists as named.
+ return $configfile if -e $configfile;
+
+ # Attempt 2: Append ".cfg" if it's not already there.
+ my $config_cfg = $configfile;
+ if ($config_cfg !~ /\.cfg$/) {
+ $config_cfg = "${configfile}.cfg";
+ return $config_cfg if -e $config_cfg;
+ }
+
+ # Attempt 3: Use kpsewhich to find the file with ".cfg" appended. (We
+ # don't search for it without ".cfg" because kpsewhich may find a version
+ # with ".tex" appended.)
+ my $kpfound = `kpsewhich $config_cfg`;
+ if (defined $kpfound) {
+ chomp $kpfound;
+ return $kpfound if -e $kpfound;
+ }
+
+ # Give up. Return the file name as specified.
+ return $configfile;
+}
+
# Read a configuration file, and set %uservariable accordingly.
sub process_config_file ($)
{
- my $configfile = $_[0];
+ my $configfile = find_config_file $_[0];
+ printf("CONFIGURATION FILE: %s\n", rel2abs($configfile)) if $verbose;
my $prevline = "";
- open (CONFIGFILE, "<$configfile") || die "${progname}: $! ($configfile)\n";
+ open (CONFIGFILE, "<", $configfile) || do {
+ my $configlist = $configfile;
+ if (! -e $configfile) {
+ # Error is "file not found". List the files we considered.
+ $configlist .= "; also considered ${configfile}.cfg" if $configfile !~ /\.cfg$/;
+ }
+ die "${progname}: $! ($configlist)\n";
+ };
while (my $oneline=<CONFIGFILE>) {
# Read a line and trim it.
chomp $oneline;
@@ -222,7 +274,7 @@ sub find_dependencies ()
my $numextras = 0;
foreach my $include_glob (@include_files) {
foreach my $include_file (glob $include_glob) {
- push @dependencies, $include_file;
+ push @dependencies, qualifyname $include_file;
$numextras++;
}
}
@@ -255,6 +307,7 @@ my $showhelp = "";
$keepdirs = 0;
$verbose = 0;
$localonly = 0;
+my $configfile;
Getopt::Long::Configure("bundling");
GetOptions ('texfile=s' => \$texfile,
'directory=s' => \$docdirname,
@@ -263,7 +316,7 @@ GetOptions ('texfile=s' => \$texfile,
'localonly!' => \$localonly,
'exclude=s' => \@exclude_files,
'include=s' => \@include_files,
- 'config=s' => sub { process_config_file($_[1]) },
+ 'config=s' => \$configfile,
'v|verbose!' => \$verbose,
'listdeps=s' => \@listdeps,
'V|version' => sub { print "bundledoc $VERSION\n"; exit -1 },
@@ -276,7 +329,8 @@ pod2usage (-message => "(For more detailed help, enter \"$0 --help --verbose\".)
pod2usage (-message => "${progname}: Too few arguments",
-exitval => 1,
-verbose => 0) if $#ARGV==-1;
-$depfile = shift; # Dependencies from snapshot.sty
+$depfile = find_dependency_file shift; # Dependencies from snapshot.sty
+process_config_file $configfile if defined $configfile;
($texfile = $depfile) =~ s/\.[^.]*$/.tex/ if !$texfile; # Main LaTeX source file
($docdirname = basename($depfile)) =~ s/\.[^.]*$// if !$docdirname; # Name to use for the document directory
($ENV{"BDBASE"} = rel2abs($depfile)) =~ s/\.[^.]*$//; # May be needed by user-defined variables
@@ -370,7 +424,7 @@ bundledoc
[B<--version>]
[B<--help>]
[B<-->[B<no>]B<verbose>]
-[B<--texfile>=I<file>]
+[B<--texfile>=I<file.tex>]
[B<--directory>=I<directory>]
[B<-->[B<no>]B<localonly>]
[B<--exclude>=I<string>]
@@ -378,8 +432,8 @@ bundledoc
[B<--manifest>=I<file>]
[B<-->B<listdeps>=[yes|no|only|rel]...]
[B<-->[B<no>]B<keepdirs>]
-[B<--config>=I<file>]
-I<.dep file>
+[B<--config>=I<file.cfg>]
+I<file.dep>
=head1 DESCRIPTION
@@ -414,8 +468,9 @@ In the following descriptions, I<somefile> refers to the name of your
main LaTeX document (no extension).
B<bundledoc> requires the name of the dependency file produced by
-B<snapshot> (normally I<somefile>F<.dep>). The following options may
-also be given:
+B<snapshot>, normally I<somefile>F<.dep>). (For convenience, the file
+can be specified without its F<.dep> extension.) The following
+options may also be given:
=over 4
@@ -561,7 +616,8 @@ The C<--config> option is used to point B<bundledoc> to the
appropriate configuration (F<.cfg>) file for your TeX distribution and
operating system. B<bundledoc> comes with a few configuration files
and it's easy to write more. See L<"CONFIGURATION FILES"> (below) for
-a description of the configuration file format.
+a description of the configuration file format. For convenience, the
+file can be specified without its F<.cfg> extension.
=back
@@ -654,8 +710,9 @@ distribution running on Microsoft Windows:
bundledoc --config=miktex.cfg myfile.dep
-(In practice, it's probably necessary to specify to C<--config> the
-complete path to B<bundledoc>'s F<miktex.cfg> configuration file.)
+This can be abbreviated to
+
+ bundledoc --config=miktex myfile
The following builds a F<.tar.gz> archive with the TeX Live
distribution running on a Unix-like operating system. B<bundledoc>
@@ -830,8 +887,11 @@ other common font formats, as well.
Thanks to Fabien Vignes-Tourneret for suggesting what became the
C<--localonly> option and for a discussion that led to the
-C<--exclude> and C<--include> options; and to Marius Kleiner for
-updating B<bundledoc> to properly handle document subdirectories.
+C<--exclude> and C<--include> options; to Marius Kleiner for updating
+B<bundledoc> to properly handle document subdirectories; and to Frank
+Mittelbach for suggesting using Kpathsea to help find F<.cfg> files
+and to automatically append F<.cfg> and F<.dep> extensions if
+necessary.
=head1 SEE ALSO
diff --git a/support/bundledoc/bundledoc.1 b/support/bundledoc/bundledoc.1
index 7f0ee40a69..2579c86568 100644
--- a/support/bundledoc/bundledoc.1
+++ b/support/bundledoc/bundledoc.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -54,16 +54,20 @@
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
-. if !\nF==2 \{\
-. nr % 0
-. nr F 2
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
. \}
.\}
+.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
@@ -129,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "BUNDLEDOC 1"
-.TH BUNDLEDOC 1 "2018-05-23" "v3.3" "User Commands"
+.TH BUNDLEDOC 1 "2019-09-08" "v3.4" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -142,7 +146,7 @@ bundledoc
[\fB\-\-version\fR]
[\fB\-\-help\fR]
[\fB\-\-\fR[\fBno\fR]\fBverbose\fR]
-[\fB\-\-texfile\fR=\fIfile\fR]
+[\fB\-\-texfile\fR=\fIfile.tex\fR]
[\fB\-\-directory\fR=\fIdirectory\fR]
[\fB\-\-\fR[\fBno\fR]\fBlocalonly\fR]
[\fB\-\-exclude\fR=\fIstring\fR]
@@ -150,8 +154,8 @@ bundledoc
[\fB\-\-manifest\fR=\fIfile\fR]
[\fB\-\-\fR\fBlistdeps\fR=[yes|no|only|rel]...]
[\fB\-\-\fR[\fBno\fR]\fBkeepdirs\fR]
-[\fB\-\-config\fR=\fIfile\fR]
-\&\fI.dep file\fR
+[\fB\-\-config\fR=\fIfile.cfg\fR]
+\&\fIfile.dep\fR
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBbundledoc\fR is a post-processor for the \fBsnapshot\fR package that
@@ -184,8 +188,9 @@ In the following descriptions, \fIsomefile\fR refers to the name of your
main LaTeX document (no extension).
.PP
\&\fBbundledoc\fR requires the name of the dependency file produced by
-\&\fBsnapshot\fR (normally \fIsomefile\fR\fI.dep\fR). The following options may
-also be given:
+\&\fBsnapshot\fR, normally \fIsomefile\fR\fI.dep\fR). (For convenience, the file
+can be specified without its \fI.dep\fR extension.) The following
+options may also be given:
.IP "\fB\-\-version\fR" 4
.IX Item "--version"
Output the \fBbundledoc\fR script's version number. This overrides all
@@ -301,7 +306,8 @@ The \f(CW\*(C`\-\-config\*(C'\fR option is used to point \fBbundledoc\fR to the
appropriate configuration (\fI.cfg\fR) file for your TeX distribution and
operating system. \fBbundledoc\fR comes with a few configuration files
and it's easy to write more. See \*(L"\s-1CONFIGURATION FILES\*(R"\s0 (below) for
-a description of the configuration file format.
+a description of the configuration file format. For convenience, the
+file can be specified without its \fI.cfg\fR extension.
.SH "CONFIGURATION FILES"
.IX Header "CONFIGURATION FILES"
.SS "Format"
@@ -390,8 +396,11 @@ distribution running on Microsoft Windows:
\& bundledoc \-\-config=miktex.cfg myfile.dep
.Ve
.PP
-(In practice, it's probably necessary to specify to \f(CW\*(C`\-\-config\*(C'\fR the
-complete path to \fBbundledoc\fR's \fImiktex.cfg\fR configuration file.)
+This can be abbreviated to
+.PP
+.Vb 1
+\& bundledoc \-\-config=miktex myfile
+.Ve
.PP
The following builds a \fI.tar.gz\fR archive with the TeX Live
distribution running on a Unix-like operating system. \fBbundledoc\fR
@@ -517,11 +526,14 @@ other common font formats, as well.
.IX Subsection "Acknowledgments"
Thanks to Fabien Vignes-Tourneret for suggesting what became the
\&\f(CW\*(C`\-\-localonly\*(C'\fR option and for a discussion that led to the
-\&\f(CW\*(C`\-\-exclude\*(C'\fR and \f(CW\*(C`\-\-include\*(C'\fR options; and to Marius Kleiner for
-updating \fBbundledoc\fR to properly handle document subdirectories.
+\&\f(CW\*(C`\-\-exclude\*(C'\fR and \f(CW\*(C`\-\-include\*(C'\fR options; to Marius Kleiner for updating
+\&\fBbundledoc\fR to properly handle document subdirectories; and to Frank
+Mittelbach for suggesting using Kpathsea to help find \fI.cfg\fR files
+and to automatically append \fI.cfg\fR and \fI.dep\fR extensions if
+necessary.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-\&\fIarlatex\fR\|(1), \fIgzip\fR\|(1), \fIkpsewhich\fR\|(1), \fIlatex\fR\|(1), \fIperl\fR\|(1), \fIzip\fR\|(1),
+\&\fBarlatex\fR\|(1), \fBgzip\fR\|(1), \fBkpsewhich\fR\|(1), \fBlatex\fR\|(1), \fBperl\fR\|(1), \fBzip\fR\|(1),
the \fBsnapshot\fR documentation
.SH "AUTHOR"
.IX Header "AUTHOR"
diff --git a/support/bundledoc/bundledoc.pdf b/support/bundledoc/bundledoc.pdf
index aeb7f5d788..8195a048fe 100644
--- a/support/bundledoc/bundledoc.pdf
+++ b/support/bundledoc/bundledoc.pdf
Binary files differ