5

As per the documentation of bundledoc, I have used a simple Tex file as mentioned in the document

\RequirePackage{snapshot}
\documentclass[11pt]{article}
\begin{document}
Hello, world! \ref{sec2}
\end{document}

Where it produces a file hello.dep. The content generated inside the hello.dep are:

\RequireVersions{
  *{application}{TeX}     {1990/03/25 v3.x}
  *{format} {LaTeX2e}     {2011/06/27 v2.e}
  *{package}{snapshot}    {2002/03/05 v1.14}
  *{class}  {article}     {2007/10/19 v1.4h}
  *{file}   {size11.clo}  {2007/10/19 v1.4h}
}

I ran the following command

bundledoc --config=miktex.cfg hello.dep

but it produces the below mentioned error

initexmf: --find-latex-input: unknown option
bundledoc: "initexmf --find-latex-input %BDINPUTS%" (BDINPUTS="hello.tex") failed to find hello.tex

Can anyone please guide me how to solve this error.

Thanks

Speravir
  • 19,491
user38642
  • 315

1 Answers1

5

The package is absolutely outdated in regard to the provided configuration file, as already noticed by Jon in a comment. As the error messsage shows, does the used command --find-latex-input not work and is not even mentioned in MiKTeX documentation anymore.

To get back the function one has to create an own file. Below I will provide one here. By the way: As it turned out, also TeX Live for Windows is affected.

First

Users of MiKTeX have to download a command line tool zip.exe, in TeX Live this is already included. So, as MiKTeX user go to ftp://ftp.info-zip.org/pub/infozip/win32/, download the latest zipXXX.zip and extract at least the contained zip.exe into a folder that is included in the system path. (A note on other archive programs in post scriptum.)

Second

Open your favorite text editor and paste the following in

# bundledoc configuration file for TeXing in Windows,
# by Steffen "Speravir" Hoffmann, licence LPPL,
# source: https://tex.stackexchange.com/a/159012/9237
#
# Derived from configuration files provided with program
# package by Scott Pakin 

# ASSUMPTION: You have "zip" somewhere in your path, and it accepts the
#             command-line options utilized by the "bundle" line below.

bundle: zip -r -v -9 %BDBASE%.zip %BDINPUTS%
sink:   > NUL 2>&1
find:   kpsewhich -progname=latex $BDINPUTS

Save it as wintex.cfg or whatever you want somewhere in your local TeXMF root (MiKTeX users: user maintained root, cf. Create a local texmf tree in MiKTeX). Pay attention, that you do not accidentally save with file extension .txt.

As experienced users will notice, this is actually built together from provided configuration files, but it works meanwhile in Windows.

Third

Make an update of your filename data base (FNDB). Then you can use the file with the --config option. MiKTeX users should know, though, that a Perl interpreter must be separately installed in Windows, cf. MiKTeX and Perl scripts (and one Python script).


PS: In theory you can use every archive program, that works on command line. You would have to adjust the line starting with bundle in the config file. But there is one caveat: The variables %BDBASE% and %BDINPUTS% expand to a string surrounded by double quotes (change the bundle line to bundle echo %BDBASE% %BDINPUTS% and execute bundledoc with this changed version and you will see). The archiver must be able to deal with this. In a test with 7z, the commandline version of 7-Zip, I was not successful, other programs I couldn't test.

Speravir
  • 19,491