Skip to content

Scripts to pack all external file dependencies of a LaTeX file into a local folder

Notifications You must be signed in to change notification settings

jfriedlein/LaTeX-standalone-packer

Repository files navigation

LaTeX-standalone-packer

Scripts to pack all external file dependencies of a LaTeX file into a local folder

When to use this

When you write a LaTeX document and load files from other directories all over your hard drive, it gets difficult to backup and exchange the LaTeX project with others. This repository proposes one option to handle this problem. The scripts extracts all external file dependencies from the LaTeX document and copies these files into a local folder. In contrast to bundledoc, we only copy external files (.tex, .png, .pdf, .pdf_tex, ...) but not internal LaTeX packages etc.

Setup

Currently, there is only a batch file, so it's available and tested only for the Windows-Miktech-TexStudio combination. I'll need a Linux version soon anyway, so this might join the batch file in the future.

ToDo

Here we need an MWE and some pictures of the directories so it becomes clear what needs to be saved where

How to

  1. Download the "LaTeX-standalone-packer"
  2. Save the folder somewhere on your drive
  3. Copy the file "LaTeX-Packer_X_to_Y.bat" to your LaTeX working directory (where your LaTeX master file is located)
  4. Edit the content of this batch file by entering a) the path from the current LaTeX working directory to the LaTeX-standalone-packer folder, b) the name of your master file without the ending .tex, c) the subdirectory that will be created or appended to store the local copies of the external files
  5. Add the "headerLocal.tex" file to your LaTeX working directory
  6. Open your LaTeX master file, create an input for the 'headerLocal.tex' file such as "\input{headerLocal}".
  7. Now for the tricky part. Open this headerLocal.tex file and take a close look. Modify it to meet your needs as outlined above in Setup.
  8. Execute your local batch script, e.g. by double-clicking it
  9. Now a file with ending .dep should have been created in your LaTeX working directory, that contains lines like "........\GRAPHICS\Fundamentals\processWindows.pdf" (without the quotes!) and you should have the chosen subfolder with again subfolders containing in this case the PDF.

Bugs, todos

Acknowledgements

  • The "BatchSubstitute.bat" stems form dostips.com. Very good place to find proper scripts. Thanks a lot!

About

Scripts to pack all external file dependencies of a LaTeX file into a local folder

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published