# [Tex/LaTex] ‘Bundle’ TeX output in a directory

auxiliary-filesmacpdf

(My personal interest in this question is mainly for OS X but solutions/approaches for other operating systems are also appreciated.)

What I see as a main distraction with using TeX/LateX is that it creates too many auxiliary files beneath the files which are interesting. Especially, when browsing the folders to look for that certain file to print, I’m only interested in the PDF file which was generated. Of course, that’s a thing which is much easier with Word and OpenOffice files; you could have hundreds of those files in a directory and just quickview them.

Since it is good practice to have only a single document per folder, I wonder if there is a tool to make that folder a bundle which hides its contents from the Finder and only opens the PDF file.

Or is there a TeX editor which uses this technique for its project files? How is the best approach to deal with this distraction on the file system?

Edit:
To clarify things, I’m not so much interested in deleting the auxiliary files or putting them somewhere else. The problem is that, even with a makefile and a clean target or a special command which removes all aux files, I’ll still need to have a separate folder for each PDF target anyway. Just because thing get messier and messier when you have multiple documents per directory. It’s just that folders are distracting in their very own way. You can’t really preview the contents (e.g. the PDF) of them and actually the OS X finder does not look as if it’s designed for folders containing only folders but that’s another story.

I just want to have a way that the GUI layer of the file system shows my latex document folders in the same way it shows .app bundles. (Or XML Word/OpenOffice files, only that these files are actively bundled in a zip container, of course, but the principle is similar.)

You can specify different directories for auxiliary files and output files.

  -aux-directory=DIR              Use DIR as the directory to write auxiliary
files to.
-output-directory=DIR           Use DIR as the directory to write output
files to.


These are MikTeX option names. They might be called something differently in your TeX distribution.

Alternatively, define a :clean target in your Makefile.