summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-26 17:29:47 +0000
committerKarl Berry <karl@freefriends.org>2014-08-26 17:29:47 +0000
commit013683b030ca5199bd9b3a562b72da9d7918e427 (patch)
tree0676a8c33931d8de449a7e01016c04201090fb3a
parentf37a8d071f5ba62ebfb723ea32f128e66a4fd66e (diff)
bundledoc
git-svn-id: svn://tug.org/texlive/trunk@35041 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/bundledoc/arlatex9
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/bundledoc/bundledoc30
-rw-r--r--Master/texmf-dist/doc/man/man1/arlatex.131
-rw-r--r--Master/texmf-dist/doc/man/man1/arlatex.man1.pdfbin10167 -> 10173 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/bundledoc.180
-rw-r--r--Master/texmf-dist/doc/man/man1/bundledoc.man1.pdfbin23385 -> 23794 bytes
-rw-r--r--Master/texmf-dist/doc/support/bundledoc/README19
-rwxr-xr-xMaster/texmf-dist/scripts/bundledoc/arlatex9
-rwxr-xr-xMaster/texmf-dist/scripts/bundledoc/bundledoc30
-rw-r--r--Master/texmf-dist/tex/latex/bundledoc/miktex.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/bundledoc/texlive-unix-arlatex.cfg6
11 files changed, 139 insertions, 77 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/bundledoc/arlatex b/Build/source/texk/texlive/linked_scripts/bundledoc/arlatex
index bb7e5d304bc..32cdd45c90a 100755
--- a/Build/source/texk/texlive/linked_scripts/bundledoc/arlatex
+++ b/Build/source/texk/texlive/linked_scripts/bundledoc/arlatex
@@ -9,7 +9,7 @@
########################################################################
# arlatex #
-# Copyright (C) 2011 Scott Pakin #
+# Copyright (C) 2014 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 #
@@ -27,7 +27,7 @@
########################################################################
use 5.006; # Fail gracefully if we're not using Perl v5.6.0.
-our $VERSION = "1.02"; # Specify the version of arlatex.
+our $VERSION = "1.03"; # Specify the version of arlatex.
use Getopt::Long;
use Pod::Usage;
use File::Basename;
@@ -38,6 +38,7 @@ use strict;
my $progname = basename($0); # Name of this program
my $latexfile; # Main LaTeX document
my $outfile = "-"; # Output file (default is standard output)
+my $baseoutfile = "-"; # Base name of output file
######################################################################
@@ -46,6 +47,8 @@ sub includefile ($)
{
my $filename = $_[0];
my $basefilename = basename $filename;
+ next if $basefilename eq $baseoutfile; # Don't let a file overwrite itself.
+ $basefilename = "\"$basefilename\"" if $basefilename =~ /\s/ && substr($basefilename, 0, 1) ne '"';
open (SOMEFILE, "<$filename") || die "${progname}: $! ($filename)\n";
print OUTFILE "\\begin{filecontents*}{$basefilename}\n";
print OUTFILE <SOMEFILE>;
@@ -71,6 +74,7 @@ if (!-e $latexfile) {
$latexfile = $newlatexfile;
}
}
+$baseoutfile = basename $outfile if $outfile ne "-";
# Read the entire input file.
open (LATEXFILE, "<$latexfile") || die "${progname}: $! ($latexfile)\n";
@@ -84,6 +88,7 @@ open (OUTFILE, ">$outfile") || die "${progname}: $! ($outfile)\n";
while ($entirefile[0] =~ /^\s*(\%.*)?$/) {
print OUTFILE (shift @entirefile);
}
+print OUTFILE "\\IfFileExists{filecontents.sty}{\\RequirePackage{filecontents}}{}\n";
my @expandedARGV;
foreach my $filename (@ARGV) {
if (-f $filename) {
diff --git a/Build/source/texk/texlive/linked_scripts/bundledoc/bundledoc b/Build/source/texk/texlive/linked_scripts/bundledoc/bundledoc
index 322b88237a0..7c5d489eb51 100755
--- a/Build/source/texk/texlive/linked_scripts/bundledoc/bundledoc
+++ b/Build/source/texk/texlive/linked_scripts/bundledoc/bundledoc
@@ -7,7 +7,7 @@
########################################################################
# bundledoc #
-# Copyright (C) 2011 Scott Pakin #
+# Copyright (C) 2014 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 #
@@ -25,7 +25,7 @@
########################################################################
use 5.006; # Fail gracefully if we're not using Perl v5.6.0.
-our $VERSION = "3.1"; # Specify the version of bundledoc.
+our $VERSION = "3.2"; # Specify the version of bundledoc.
use File::Basename;
use File::Copy;
use File::Spec::Functions qw(abs2rel catfile devnull rel2abs rootdir updir);
@@ -39,9 +39,9 @@ use strict;
######################################################################
# Variables the user can override with a configuration file
-# DEFAULTS: Unix + kpathsea
+# DEFAULTS: Linux + kpathsea
my %uservariable;
-$uservariable{"bundle"} = '(tar -cvf - $BDINPUTS | compress > $BDBASE.tar.Z)';
+$uservariable{"bundle"} = '(tar -cvf - $BDINPUTS | gzip --best > $BDBASE.tar.gz)';
$uservariable{"find"} = 'kpsewhich -progname=latex $BDINPUTS';
$uservariable{"sink"} = '> ' . devnull() . ' 2>&1';
@@ -66,8 +66,10 @@ my %subdirs; # Map from a qualified name to its sub
# or abort if we can't.
sub qualifyname ($)
{
+ my $filename = $_[0];
+ $filename = "\"$filename\"" if $filename =~ /\s/ && substr($filename, 0, 1) ne '"';
my $command = $uservariable{find};
- $command =~ s/[\$\%]BDINPUTS\%?/$_[0]/g;
+ $command =~ s/[\$\%]BDINPUTS\%?/$filename/g;
$command =~ s/[\$\%]BDBASE\%?/$ENV{"BDBASE"}/g;
my $qualified = `$command` ||
die "${progname}: \"$uservariable{find}\" (BDINPUTS=\"$_[0]\") failed to find $_[0]\n";
@@ -694,8 +696,16 @@ files.
Configuration file for MikTeX installations. MikTeX is a popular TeX
distribution for Microsoft Windows. F<miktex.cfg> assumes you have
B<zip> and uses it to produce a F<.zip> archive file. The
-configuration file has B<bundledoc> use the rather nonstandard
-B<initexmf> to find LaTeX files.
+configuration file now has B<bundledoc> use B<kpsewhich> to find LaTeX
+files; older version of MikTeX required the rather nonstandard
+B<initexmf> for this purpose.
+
+=item F<texlive-unix-arlatex.cfg>
+
+This is a variant of F<texlive-unix.cfg> that uses B<arlatex> instead
+of B<gzip> to archive files. B<arlatex> is a script included in the
+B<bundledoc> distribution that generates a self-extracting F<.tex>
+file based on LaTeX's C<filecontents> environment.
=back
@@ -801,7 +811,7 @@ to run B<bundledoc> on a different system.
I'd like B<bundledoc> to work on as wide a variety of TeX
distributions as possible. If your platform is significantly
different from the ones listed in L<"Testing Status"> (e.g., if you're
-running MacOS) and you need to create a substantially different
+running Z<OS X>) and you need to create a substantially different
configuration file from F<texlive-unix.cfg> and F<miktex.cfg>, please
send it to me at the address listed in L<"AUTHOR"> so I can include it
in a future version of B<bundledoc>. (I make no promises, though).
@@ -826,8 +836,8 @@ updating B<bundledoc> to properly handle document subdirectories.
=head1 SEE ALSO
-gzip(1), kpsewhich(1), latex(1), perl(1), zip(1), the B<snapshot>
-documentation
+arlatex(1), gzip(1), kpsewhich(1), latex(1), perl(1), zip(1),
+the B<snapshot> documentation
=head1 AUTHOR
diff --git a/Master/texmf-dist/doc/man/man1/arlatex.1 b/Master/texmf-dist/doc/man/man1/arlatex.1
index 2db9327c252..ab0c881a359 100644
--- a/Master/texmf-dist/doc/man/man1/arlatex.1
+++ b/Master/texmf-dist/doc/man/man1/arlatex.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -38,6 +38,8 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
+. ds C`
+. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
@@ -48,17 +50,24 @@
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
..
-. nr % 0
-. rr F
-.\}
-.el \{\
-. de IX
+.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
+. \}
+. \}
.\}
+.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.
@@ -124,14 +133,14 @@
.\" ========================================================================
.\"
.IX Title "ARLATEX 1"
-.TH ARLATEX 1 "2011-05-01" "v1.02" "User Commands"
+.TH ARLATEX 1 "2014-08-24" "v1.03" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
arlatex \- archive a number of ancillary LaTeX files into a master
-\&\fI.tex\fR file
+\&.tex file
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
arlatex
diff --git a/Master/texmf-dist/doc/man/man1/arlatex.man1.pdf b/Master/texmf-dist/doc/man/man1/arlatex.man1.pdf
index 465f5eb9573..6ff47875a0a 100644
--- a/Master/texmf-dist/doc/man/man1/arlatex.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/arlatex.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/bundledoc.1 b/Master/texmf-dist/doc/man/man1/bundledoc.1
index c96c0fc8ec6..03b082fb65f 100644
--- a/Master/texmf-dist/doc/man/man1/bundledoc.1
+++ b/Master/texmf-dist/doc/man/man1/bundledoc.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -38,6 +38,8 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
+. ds C`
+. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
@@ -48,17 +50,24 @@
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
..
-. nr % 0
-. rr F
-.\}
-.el \{\
-. de IX
+.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
+. \}
+. \}
.\}
+.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.
@@ -124,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "BUNDLEDOC 1"
-.TH BUNDLEDOC 1 "2011-05-02" "v3.1" "User Commands"
+.TH BUNDLEDOC 1 "2014-08-24" "v3.2" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -172,7 +181,7 @@ The \f(CW\*(C`\eRequirePackage{snapshot}\*(C'\fR causes a \fIhello.dep\fR file t
When \fBbundledoc\fR is then given \f(CW\*(C`hello.dep\*(C'\fR as an argument, it locates the
dependent files \*(-- \fIsnapshot.sty\fR, \fIarticle.cls\fR, and \fIsize11.clo\fR \*(--
and bundles them into a single archive file, along with \fIhello.tex\fR and a
-\&\fI\s-1MANIFEST\s0\fR file (described in \*(L"\s-1OPTIONS\s0\*(R", below).
+\&\fI\s-1MANIFEST\s0\fR file (described in \*(L"\s-1OPTIONS\*(R"\s0, below).
.SH "OPTIONS"
.IX Header "OPTIONS"
In the following descriptions, \fIsomefile\fR refers to the name of your
@@ -190,18 +199,18 @@ of the remaining options.
Give a brief usage message. This overrides all of the remaining options.
.ie n .IP "\fB\-\-\fR[\fBno\fR]\fBverbose\fR (default: ""noverbose"")" 4
.el .IP "\fB\-\-\fR[\fBno\fR]\fBverbose\fR (default: \f(CWnoverbose\fR)" 4
-.IX Item "--[no]verbose (default: noverbose)"
+.IX Item "--[no]verbose (default: noverbose)"
\&\fBbundledoc\fR normally does not output anything except error messages.
With \f(CW\*(C`\-\-verbose\*(C'\fR, it outputs copious status messages.
.IP "\fB\-\-texfile\fR=\fImain .tex file\fR (default: \fIsomefile\fR\fI.tex\fR)" 4
-.IX Item "--texfile=main .tex file (default: somefile.tex)"
+.IX Item "--texfile=main .tex file (default: somefile.tex)"
\&\fBsnapshot\fR's dependency file does not list the main LaTeX file (the
one that gets passed to \fBlatex\fR). In order for \fBbundledoc\fR to find
and bundle that file, \fBbundledoc\fR assumes it has the same name as the
\&\fBsnapshot\fR dependency file but with a \fI.tex\fR extension. If this is
not the case, then use \f(CW\*(C`\-\-texfile\*(C'\fR to specify the correct filename.
.IP "\fB\-\-directory\fR=\fIarchive directory\fR (default: \fIsomefile\fR)" 4
-.IX Item "--directory=archive directory (default: somefile)"
+.IX Item "--directory=archive directory (default: somefile)"
When \fBbundledoc\fR creates an archive (e.g., a \fI.tar\fR or \fI.zip\fR file)
containing the document's files, it puts all of them in a directory to
avoid cluttering the current directory with files. If the given
@@ -211,13 +220,13 @@ archive will, by default, store all the dependent files in a
\&\f(CW\*(C`\-\-directory\*(C'\fR option.
.ie n .IP "\fB\-\-\fR[\fBno\fR]\fBlocalonly\fR (default: ""nolocalonly"")" 4
.el .IP "\fB\-\-\fR[\fBno\fR]\fBlocalonly\fR (default: \f(CWnolocalonly\fR)" 4
-.IX Item "--[no]localonly (default: nolocalonly)"
+.IX Item "--[no]localonly (default: nolocalonly)"
Although \fBbundledoc\fR normally archives all of the files named in the
\&\fI.dep\fR file, the \f(CW\*(C`\-\-localonly\*(C'\fR option tells \fBbundledoc\fR to exclude
all files located in a directory other than the \fI.tex\fR file's
directory or one of its subdirectories.
.IP "\fB\-\-exclude\fR=\fIstring\fR (default: \fInone\fR)" 4
-.IX Item "--exclude=string (default: none)"
+.IX Item "--exclude=string (default: none)"
While \f(CW\*(C`\-\-localonly\*(C'\fR causes files outside of the \fI.tex\fR file's
directory tree to be omitted from the archive, \f(CW\*(C`\-\-exclude\*(C'\fR provides
finer-grained control over files to omit from the archive. The
@@ -225,13 +234,13 @@ finer-grained control over files to omit from the archive. The
line, causes all files whose name contains \fIstring\fR to be omitted
from the archive.
.IP "\fB\-\-include\fR=\fIfilespec\fR (default: \fInone\fR)" 4
-.IX Item "--include=filespec (default: none)"
+.IX Item "--include=filespec (default: none)"
The \f(CW\*(C`\-\-include\*(C'\fR option, which can be specified repeatedly on the
command line, instructs \fBbundledoc\fR to include in the archive all of
the files matching \fIfilespec\fR, even if they're not referenced in the
\&\fI.dep\fR file.
.IP "\fB\-\-manifest\fR=\fImanifest file\fR (default: \fI\s-1MANIFEST\s0\fR)" 4
-.IX Item "--manifest=manifest file (default: MANIFEST)"
+.IX Item "--manifest=manifest file (default: MANIFEST)"
In addition to the dependent files, \fBbundledoc\fR includes in the
archive file one extra file called, by default, ``\fI\s-1MANIFEST\s0\fR''.
\&\fI\s-1MANIFEST\s0\fR is a text file that lists the original filenames of all
@@ -241,7 +250,7 @@ something else, use the \f(CW\*(C`\-\-manifest\*(C'\fR option. As a special cas
all.
.ie n .IP "\fB\-\-listdeps\fR=[yes|no|only|rel]...] (default: ""no"")" 4
.el .IP "\fB\-\-listdeps\fR=[yes|no|only|rel]...] (default: \f(CWno\fR)" 4
-.IX Item "--listdeps=[yes|no|only|rel]...] (default: no)"
+.IX Item "--listdeps=[yes|no|only|rel]...] (default: no)"
\&\f(CW\*(C`\-\-listdeps\*(C'\fR accepts one or more of \f(CW\*(C`yes\*(C'\fR, \f(CW\*(C`no\*(C'\fR, \f(CW\*(C`only\*(C'\fR, or \f(CW\*(C`rel\*(C'\fR
as a comma-separated list. As long as \f(CW\*(C`no\*(C'\fR does not appear in this
list, \fBbundledoc\fR outputs all of the main LaTeX file's dependencies.
@@ -251,7 +260,7 @@ then \fBbundledoc\fR exits after displaying the list, without producing
an archive.
.ie n .IP "\fB\-\-\fR[\fBno\fR]\fBkeepdirs\fR (default: ""nokeepdirs"")" 4
.el .IP "\fB\-\-\fR[\fBno\fR]\fBkeepdirs\fR (default: \f(CWnokeepdirs\fR)" 4
-.IX Item "--[no]keepdirs (default: nokeepdirs)"
+.IX Item "--[no]keepdirs (default: nokeepdirs)"
Normally, the archive file that \fBbundledoc\fR produces contains a
single directory \*(-- and subdirectories, if the document refers
explicitly to them \*(-- in which all the dependent files lie. If
@@ -291,11 +300,11 @@ addition, no manifest file is written to the archive file as it
contains redundant information.
.RE
.IP "\fB\-\-config\fR=\fIconfiguration file\fR (default: <none>)" 4
-.IX Item "--config=configuration file (default: <none>)"
+.IX Item "--config=configuration file (default: <none>)"
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\s0 \s-1FILES\s0\*(R" (below) for
+and it's easy to write more. See \*(L"\s-1CONFIGURATION FILES\*(R"\s0 (below) for
a description of the configuration file format.
.SH "CONFIGURATION FILES"
.IX Header "CONFIGURATION FILES"
@@ -325,7 +334,7 @@ by using \f(CW\*(C`\e\*(C'\fR as the line-continuation symbol.
.PP
There are two environment variables that \fBbundledoc\fR makes available
for use by configuration-file commands: \f(CW\*(C`BDBASE\*(C'\fR, which is set to
-\&\fIsomefile\fR (as in \*(L"\s-1OPTIONS\s0\*(R"), and \f(CW\*(C`BDINPUTS\*(C'\fR, which is set to a
+\&\fIsomefile\fR (as in \*(L"\s-1OPTIONS\*(R"\s0), and \f(CW\*(C`BDINPUTS\*(C'\fR, which is set to a
space-separated list of files that a command is to operate upon. That
is, when the command associated with \f(CW\*(C`bundle\*(C'\fR is running, \f(CW\*(C`BDINPUTS\*(C'\fR
contains the list of all the files that are to be archived. In
@@ -337,7 +346,7 @@ The following configuration file parallels \fBbundledoc\fR's default
values of the various configuration-file variables, which represents a
kpathsea-based TeX distribution running on a generic Unix system,
which doesn't necessarily have any of the \s-1GNU\s0 tools, such as \fBgzip\fR
-or \s-1GNU\s0 \fBtar\fR:
+or \s-1GNU \s0\fBtar\fR:
.PP
.Vb 2
\& # "Default" configuration file
@@ -407,7 +416,7 @@ though none of them are referenced by \fImyfile.dep\fR. Finally, no
The user must have previously installed \fIsnapshot.sty\fR and used it to
produce a dependency file for his document. Besides that, the set of
external files needed by \fBbundledoc\fR is system-specific and depends on the
-configuration file used. (See \*(L"\s-1CONFIGURATION\s0 \s-1FILES\s0\*(R", above.)
+configuration file used. (See \*(L"\s-1CONFIGURATION FILES\*(R"\s0, above.)
.PP
\&\fBbundledoc\fR currently comes with two configuration files:
.IP "\fItexlive\-unix.cfg\fR" 4
@@ -423,8 +432,15 @@ files.
Configuration file for MikTeX installations. MikTeX is a popular TeX
distribution for Microsoft Windows. \fImiktex.cfg\fR assumes you have
\&\fBzip\fR and uses it to produce a \fI.zip\fR archive file. The
-configuration file has \fBbundledoc\fR use the rather nonstandard
-\&\fBinitexmf\fR to find LaTeX files.
+configuration file now has \fBbundledoc\fR use \fBkpsewhich\fR to find LaTeX
+files; older version of MikTeX required the rather nonstandard
+\&\fBinitexmf\fR for this purpose.
+.IP "\fItexlive\-unix\-arlatex.cfg\fR" 4
+.IX Item "texlive-unix-arlatex.cfg"
+This is a variant of \fItexlive\-unix.cfg\fR that uses \fBarlatex\fR instead
+of \fBgzip\fR to archive files. \fBarlatex\fR is a script included in the
+\&\fBbundledoc\fR distribution that generates a self-extracting \fI.tex\fR
+file based on LaTeX's \f(CW\*(C`filecontents\*(C'\fR environment.
.SH "NOTES"
.IX Header "NOTES"
.SS "Including and excluding files"
@@ -474,7 +490,7 @@ Linux + TeX Live
.IP "\(bu" 4
Linux + teTeX
.IP "\(bu" 4
-Windows \s-1NT\s0 + MiKTeX
+Windows \s-1NT +\s0 MiKTeX
.IP "\(bu" 4
Solaris + ??? (something kpathsea-based)
.PP
@@ -487,9 +503,9 @@ to run \fBbundledoc\fR on a different system.
I'd like \fBbundledoc\fR to work on as wide a variety of TeX
distributions as possible. If your platform is significantly
different from the ones listed in \*(L"Testing Status\*(R" (e.g., if you're
-running MacOS) and you need to create a substantially different
+running ) and you need to create a substantially different
configuration file from \fItexlive\-unix.cfg\fR and \fImiktex.cfg\fR, please
-send it to me at the address listed in \*(L"\s-1AUTHOR\s0\*(R" so I can include it
+send it to me at the address listed in \*(L"\s-1AUTHOR\*(R"\s0 so I can include it
in a future version of \fBbundledoc\fR. (I make no promises, though).
.PP
Once \fBbundledoc\fR works on all the major operating systems and TeX
@@ -509,8 +525,8 @@ Thanks to Fabien Vignes-Tourneret for suggesting what became the
updating \fBbundledoc\fR to properly handle document subdirectories.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-\&\fIgzip\fR\|(1), \fIkpsewhich\fR\|(1), \fIlatex\fR\|(1), \fIperl\fR\|(1), \fIzip\fR\|(1), the \fBsnapshot\fR
-documentation
+\&\fIarlatex\fR\|(1), \fIgzip\fR\|(1), \fIkpsewhich\fR\|(1), \fIlatex\fR\|(1), \fIperl\fR\|(1), \fIzip\fR\|(1),
+the \fBsnapshot\fR documentation
.SH "AUTHOR"
.IX Header "AUTHOR"
Scott Pakin, \fIscott+bdoc@pakin.org\fR
diff --git a/Master/texmf-dist/doc/man/man1/bundledoc.man1.pdf b/Master/texmf-dist/doc/man/man1/bundledoc.man1.pdf
index 65abb3087f4..7ad9bf9baa5 100644
--- a/Master/texmf-dist/doc/man/man1/bundledoc.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/bundledoc.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bundledoc/README b/Master/texmf-dist/doc/support/bundledoc/README
index aadadd92f5c..2e96af6d782 100644
--- a/Master/texmf-dist/doc/support/bundledoc/README
+++ b/Master/texmf-dist/doc/support/bundledoc/README
@@ -25,14 +25,15 @@ as its archiver in place of tar, zip, etc.
Files
-----
--rwxrwxr-x 1 pakin users 9595 May 1 15:24 arlatex
--rw-rw-r-- 1 pakin users 10063 May 2 08:06 arlatex.1
--rw-rw-r-- 1 pakin users 9551 May 2 08:06 arlatex.pdf
--rwxrwxr-x 1 pakin users 28763 May 2 07:57 bundledoc
--rw-rw-r-- 1 pakin users 22574 May 2 08:06 bundledoc.1
--rw-rw-r-- 1 pakin users 21959 May 2 08:06 bundledoc.pdf
--rw-rw-r-- 1 pakin users 344 Mar 11 2006 miktex.cfg
--rw-rw-r-- 1 pakin users 4361 May 2 08:06 README
+-rwxrwxr-x 1 pakin users 9978 Aug 24 22:43 arlatex
+-rw-r--r-- 1 pakin users 10266 Aug 24 22:52 arlatex.1
+-rw-r--r-- 1 pakin users 10167 Aug 24 22:52 arlatex.pdf
+-rwxrwxr-x 1 pakin users 29261 Aug 24 23:07 bundledoc
+-rw-r--r-- 1 pakin users 23093 Aug 24 23:07 bundledoc.1
+-rw-r--r-- 1 pakin users 22943 Aug 24 23:07 bundledoc.pdf
+-rw-rw-r-- 1 pakin users 342 Jan 22 2014 miktex.cfg
+-rw-r--r-- 1 pakin users 4430 Aug 24 23:07 README
+-rw-r--r-- 1 pakin users 248 Aug 24 22:17 texlive-unix-arlatex.cfg
-rw-rw-r-- 1 pakin users 230 Apr 9 2010 texlive-unix.cfg
@@ -83,7 +84,7 @@ Copyright and license
---------------------
bundledoc
- Copyright (C) 2011 Scott Pakin
+ Copyright (C) 2014 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/Master/texmf-dist/scripts/bundledoc/arlatex b/Master/texmf-dist/scripts/bundledoc/arlatex
index bb7e5d304bc..32cdd45c90a 100755
--- a/Master/texmf-dist/scripts/bundledoc/arlatex
+++ b/Master/texmf-dist/scripts/bundledoc/arlatex
@@ -9,7 +9,7 @@
########################################################################
# arlatex #
-# Copyright (C) 2011 Scott Pakin #
+# Copyright (C) 2014 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 #
@@ -27,7 +27,7 @@
########################################################################
use 5.006; # Fail gracefully if we're not using Perl v5.6.0.
-our $VERSION = "1.02"; # Specify the version of arlatex.
+our $VERSION = "1.03"; # Specify the version of arlatex.
use Getopt::Long;
use Pod::Usage;
use File::Basename;
@@ -38,6 +38,7 @@ use strict;
my $progname = basename($0); # Name of this program
my $latexfile; # Main LaTeX document
my $outfile = "-"; # Output file (default is standard output)
+my $baseoutfile = "-"; # Base name of output file
######################################################################
@@ -46,6 +47,8 @@ sub includefile ($)
{
my $filename = $_[0];
my $basefilename = basename $filename;
+ next if $basefilename eq $baseoutfile; # Don't let a file overwrite itself.
+ $basefilename = "\"$basefilename\"" if $basefilename =~ /\s/ && substr($basefilename, 0, 1) ne '"';
open (SOMEFILE, "<$filename") || die "${progname}: $! ($filename)\n";
print OUTFILE "\\begin{filecontents*}{$basefilename}\n";
print OUTFILE <SOMEFILE>;
@@ -71,6 +74,7 @@ if (!-e $latexfile) {
$latexfile = $newlatexfile;
}
}
+$baseoutfile = basename $outfile if $outfile ne "-";
# Read the entire input file.
open (LATEXFILE, "<$latexfile") || die "${progname}: $! ($latexfile)\n";
@@ -84,6 +88,7 @@ open (OUTFILE, ">$outfile") || die "${progname}: $! ($outfile)\n";
while ($entirefile[0] =~ /^\s*(\%.*)?$/) {
print OUTFILE (shift @entirefile);
}
+print OUTFILE "\\IfFileExists{filecontents.sty}{\\RequirePackage{filecontents}}{}\n";
my @expandedARGV;
foreach my $filename (@ARGV) {
if (-f $filename) {
diff --git a/Master/texmf-dist/scripts/bundledoc/bundledoc b/Master/texmf-dist/scripts/bundledoc/bundledoc
index 322b88237a0..7c5d489eb51 100755
--- a/Master/texmf-dist/scripts/bundledoc/bundledoc
+++ b/Master/texmf-dist/scripts/bundledoc/bundledoc
@@ -7,7 +7,7 @@
########################################################################
# bundledoc #
-# Copyright (C) 2011 Scott Pakin #
+# Copyright (C) 2014 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 #
@@ -25,7 +25,7 @@
########################################################################
use 5.006; # Fail gracefully if we're not using Perl v5.6.0.
-our $VERSION = "3.1"; # Specify the version of bundledoc.
+our $VERSION = "3.2"; # Specify the version of bundledoc.
use File::Basename;
use File::Copy;
use File::Spec::Functions qw(abs2rel catfile devnull rel2abs rootdir updir);
@@ -39,9 +39,9 @@ use strict;
######################################################################
# Variables the user can override with a configuration file
-# DEFAULTS: Unix + kpathsea
+# DEFAULTS: Linux + kpathsea
my %uservariable;
-$uservariable{"bundle"} = '(tar -cvf - $BDINPUTS | compress > $BDBASE.tar.Z)';
+$uservariable{"bundle"} = '(tar -cvf - $BDINPUTS | gzip --best > $BDBASE.tar.gz)';
$uservariable{"find"} = 'kpsewhich -progname=latex $BDINPUTS';
$uservariable{"sink"} = '> ' . devnull() . ' 2>&1';
@@ -66,8 +66,10 @@ my %subdirs; # Map from a qualified name to its sub
# or abort if we can't.
sub qualifyname ($)
{
+ my $filename = $_[0];
+ $filename = "\"$filename\"" if $filename =~ /\s/ && substr($filename, 0, 1) ne '"';
my $command = $uservariable{find};
- $command =~ s/[\$\%]BDINPUTS\%?/$_[0]/g;
+ $command =~ s/[\$\%]BDINPUTS\%?/$filename/g;
$command =~ s/[\$\%]BDBASE\%?/$ENV{"BDBASE"}/g;
my $qualified = `$command` ||
die "${progname}: \"$uservariable{find}\" (BDINPUTS=\"$_[0]\") failed to find $_[0]\n";
@@ -694,8 +696,16 @@ files.
Configuration file for MikTeX installations. MikTeX is a popular TeX
distribution for Microsoft Windows. F<miktex.cfg> assumes you have
B<zip> and uses it to produce a F<.zip> archive file. The
-configuration file has B<bundledoc> use the rather nonstandard
-B<initexmf> to find LaTeX files.
+configuration file now has B<bundledoc> use B<kpsewhich> to find LaTeX
+files; older version of MikTeX required the rather nonstandard
+B<initexmf> for this purpose.
+
+=item F<texlive-unix-arlatex.cfg>
+
+This is a variant of F<texlive-unix.cfg> that uses B<arlatex> instead
+of B<gzip> to archive files. B<arlatex> is a script included in the
+B<bundledoc> distribution that generates a self-extracting F<.tex>
+file based on LaTeX's C<filecontents> environment.
=back
@@ -801,7 +811,7 @@ to run B<bundledoc> on a different system.
I'd like B<bundledoc> to work on as wide a variety of TeX
distributions as possible. If your platform is significantly
different from the ones listed in L<"Testing Status"> (e.g., if you're
-running MacOS) and you need to create a substantially different
+running Z<OS X>) and you need to create a substantially different
configuration file from F<texlive-unix.cfg> and F<miktex.cfg>, please
send it to me at the address listed in L<"AUTHOR"> so I can include it
in a future version of B<bundledoc>. (I make no promises, though).
@@ -826,8 +836,8 @@ updating B<bundledoc> to properly handle document subdirectories.
=head1 SEE ALSO
-gzip(1), kpsewhich(1), latex(1), perl(1), zip(1), the B<snapshot>
-documentation
+arlatex(1), gzip(1), kpsewhich(1), latex(1), perl(1), zip(1),
+the B<snapshot> documentation
=head1 AUTHOR
diff --git a/Master/texmf-dist/tex/latex/bundledoc/miktex.cfg b/Master/texmf-dist/tex/latex/bundledoc/miktex.cfg
index 8a31743194a..025bf6707b5 100644
--- a/Master/texmf-dist/tex/latex/bundledoc/miktex.cfg
+++ b/Master/texmf-dist/tex/latex/bundledoc/miktex.cfg
@@ -6,4 +6,4 @@
bundle: zip -r -v -9 %BDBASE%.zip %BDINPUTS%
sink: > NUL:
-find: initexmf --find-latex-input %BDINPUTS%
+find: kpsewhich -progname=latex %BDINPUTS%
diff --git a/Master/texmf-dist/tex/latex/bundledoc/texlive-unix-arlatex.cfg b/Master/texmf-dist/tex/latex/bundledoc/texlive-unix-arlatex.cfg
new file mode 100644
index 00000000000..51ee0d58546
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bundledoc/texlive-unix-arlatex.cfg
@@ -0,0 +1,6 @@
+# bundledoc configuration file for kpathsea + Unix + arlatex
+# By Scott Pakin <scott+bdoc@pakin.org>
+
+bundle: (arlatex --outfile=$BDBASE-all.tex --document=$BDBASE.tex $BDINPUTS)
+sink: > /dev/null 2>&1
+find: kpsewhich -progname=latex $BDINPUTS