Generalbundledoc: a backup solution for LaTeX documents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

bundledoc: a backup solution for LaTeX documents

Post by meho_r »

In short:
bundledoc is a post-processor for the snapshot package that bundles together all the classes, packages, and files needed to build a given LaTeX document. It reads the .dep file that snapshot produces, finds each of the files mentioned therein, and packages them into a single archive file (e.g., a .tar.gz file), suitable for moving across systems, transmitting to a colleague, etc.
1. The point: Preservation of documents and making sure they stay compilable with all originally used packages on every machine and in any time in the future.

2. Installation: as usual, tlmgr (TeXLive) or MPM (MiKTeX Package Manager) should do the job. However, take care of two things:
  • a) don't forget to install snapshot package too, and
    b) for Linux users: bundledoc by default uses compress command, so don't forget to install ncompress package.
3. Usage: again, two things to mention:
  • a) put \RequirePackage{snapshot} before \documentclass in your .tex file and run latex (or xelatex, or pdflatex...) on it (let's name it here test.tex):

    Code: Select all

    \RequirePackage{snapshot}
    \documentclass{memoir}
    
    \usepackage{lipsum}
    \usepackage{graphicx}
    
    \begin{document}
    
    \lipsum[1-5]
    
    \end{document}
    
    b) run bundledoc on generated test.dep file:

    Code: Select all

    bundledoc test.dep
    
    After that an archive will be created containing a snapshot of all files necessary for compilation (.cls, .clo, .tex, .sty etc. – even pictures will be included). Simple as that.
Enjoy ;)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply