Recently I have heard about the bundledoc package and wanted to test it. I use a fairly simple test file similar to the one shown in the documentation.
\RequirePackage{snapshot}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
\end{document}
I also put the miktex.cfg file from the package directory C:\Program Files (x86)\MiKTeX 2.9\tex\latex\bundledoc in the working directory.
I also was able to generate the dep file (test.dep) by running pfdlatex.
\RequireVersions{
*{application}{TeX} {1990/03/25 v3.x}
*{format} {LaTeX2e} {2017-04-15 v2.e}
*{package}{snapshot} {2002/03/05 v1.14}
*{class} {article} {2014/09/29 v1.4h}
*{file} {size10.clo} {2014/09/29 v1.4h}
*{package}{amsmath} {2017/09/02 v2.17a}
*{package}{amstext} {2000/06/29 v2.01}
*{package}{amsgen} {1999/11/30 v2.0}
*{package}{amsbsy} {1999/11/29 v1.2d}
*{package}{amsopn} {2016/03/08 v2.02}
}
But I fail to run the bundledoc command. I use the following batch file (Windows 10) with administrator privileges.
bundledoc --config=miktex.cfg --verbose test.dep
pause
And I get
No such file or directory (miktex.cfg)
Strangely enough, when I run the batch file without administrator privileges then I get another error (command zip not found in German).
I am on a business trip this week and won't be able to be very responsive. I would be happy if someone could test my setting and tell me if it works on his/her machine.
Hidden Agenda
I will give a LaTeX introduction to Ph.D. students in the summer and wanted to test bundledoc before that. If the test is successful then I will recommend bundledoc as a way to "freeze" one's LaTeX version for a long-term preservation or/and a safeguard for problems after updating the LaTeX distribution.
My favorite solution, however, is to use a virtual machine, but that's not important here.
Update
- Thanks to the comments it now boils down to utilize a zip program.
- Apparently, I do not have
zipavailable on the command line. - I installed 7zip and added the path to the exe (
C:\Program Files\7-Zip) to the PATH variable in Windows. - But I do now know how to configure the
miktex.cfgcorrectly.
# bundledoc configuration file for MikTeX
# By Scott Pakin <scott+bdoc@pakin.org>
# ASSUMPTION: You have "zip" somewhere in your path, and it accepts the
# command-line options utilized by the "bundle" line below.
rem bundle: zip -r -v -9 %BDBASE%.zip %BDINPUTS%
bundle: 7z.exe %BDBASE%.zip %BDINPUTS%
sink: > NUL:
find: kpsewhich -progname=latex %BDINPUTS%





C:\windows\system32. I just copied the neededmiktex.cfgfrom there to my test directory (D:\Downloads\delete.me\bundledocin my case). – Dr. Manuel Kuehner Feb 25 '18 at 22:10C:\windows\system32so you did runbundledocin that directory. – Skillmon Feb 25 '18 at 22:11C:\windows\system32. I am using batch files for many years now and I always used them the described way. – Dr. Manuel Kuehner Feb 25 '18 at 22:13>, which in the first screenshot isC:\WINDOWS\system32>).zipseems to be unavailable on your Windows machine. I don't know what you need to do to install it -- I'll go search for that. – Skillmon Feb 25 '18 at 22:23C:\windows\system32is used when I start the batch file with admin privileges. – Dr. Manuel Kuehner Feb 25 '18 at 22:26bundledocafter all, – Dr. Manuel Kuehner Feb 25 '18 at 22:45zipis available on Linux, but there I'd use a compressed tarball and not zip. – Skillmon Feb 25 '18 at 22:53