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.

enter image description here



a^2 + b^2 = c^2

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.

enter image description here

I also was able to generate the dep file (test.dep) by running pfdlatex.

  *{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

And I get

No such file or directory (miktex.cfg)

enter image description here

Strangely enough, when I run the batch file without administrator privileges then I get another error (command zip not found in German).

enter image description here

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.


  • Thanks to the comments it now boils down to utilize a zip program.
  • Apparently, I do not have zip available 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.cfg correctly.

enter image description here

# 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%


  • 1
    I didn't test but really the last thing I would do is to start a command in C:\windows\system32. And I wouldn't run such tests with admin privileges. – Ulrike Fischer Feb 25 '18 at 22:04
  • @UlrikeFischer Thanks for the comment. Apparently, I was misleading in my description: I did not run the batch file in C:\windows\system32. I just copied the needed miktex.cfg from there to my test directory (D:\Downloads\delete.me\bundledoc in my case). – Dr. Manuel Kuehner Feb 25 '18 at 22:10
  • But the screenshot you show us of the cmd is in C:\windows\system32 so you did run bundledoc in that directory. – Skillmon likes topanswers.xyz Feb 25 '18 at 22:11
  • @Skillmon You are right, but I think has to do with something different. But I am not a software expert but I just double-click the batch file in the mentioned test folder. I could imagine that the Windows batch exe is in C:\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
  • 1
    I can confirm that zip is available on Linux, but there I'd use a compressed tarball and not zip. – Skillmon likes topanswers.xyz Feb 25 '18 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.