3

I was wondering whether there's an automated way to detect unnecessary files (not auxiliary files) that are not needed for compilation of a LaTeX document, perhaps during or after compilation? For research articles I usually brute force it: for instance I change the name of the figures folder to figures2 and create a new figures folder, and then compile/copy missing file iteratively from figures2 to figures until the document compiles. I then delete whatever was left in folders2.

This is doable for small projects. Now I've been working on a book for a couple of years and the project is near completion. This project has gotten so big that the brute force approach is not possible. I would appreciate any tips in getting this automated.

EDIT It was suggested to use the snapshot package as discussed in this post. I tried this and it's helpful, but it still requires some manual intervention because it tells you what are the files that are needed instead of those that are not needed by traversing a hierarchy.

aaragon
  • 3,041
  • Add \listfiles as first line of your main file, and check the end of the log output. It will, however, list all the style fles loaded from the TeX distribution. – gernot Feb 13 '23 at 20:39

0 Answers0