I'm a LaTeX user in OSX. I use TexShop primarily. LaTeX automatically creates lots of helper files with various different extensions (.log, .nav, .aux, .out, etc).

It's almost never necessary to view these, so they add a ton of clutter to the finder folders. Does anyone have a good way of automatically hiding these files in the finder? Specifically, I want to hide all of the files with those extensions automatically. They are created every time I compile, so I need a way either for the finder to ignore them (in the way the windows explorer can treat certain extensions as hidden by default) or for the hidden flag to be set automatically upon creation.

I could actually do this globally if necessary, as my workflow rarely ever gives me cause to invoke or manipulate .log files from the finder. The ideal situation would be to do it only for the folders and sub-folders I use for writing.


Hiding all files isn’t implemented on a system level: make a certain file type hidden

Hiding files one by one is trivial:

 chflags hidden /path/to/*\.aux

I haven't seen a way to implement all the logic required to do what you ask, but I have seen people make up smart folders to show only specific files in a folder that match the good extensions. If your list of places where you want to filter is small, that effort will be less than scripting the hide tool you need.

Have you ruled out configuring latex to put all auxiliary files in a hidden subdirectory/folder that you name with a dot like .tmp? This is shown here for pdflatex -output-directory=\.tmp

Alternatively, you could use a make tool like rubber or latexmk to either run your custom hide script or even discard those files when you compile successfully. You’d only then need to mark in some way what folders get the hidden treatment.

  • So, I've actually done something like you're suggesting but the results are problematic. First, my scripts which move the aux files end up clashing with bibtex. Second, I kind of want the aux files to still be there in shared folders for my co-authors. I figured it would be much, much simpler to just hide them, since that's all I care about. – WildGunman Jan 14 '13 at 22:01
  • If you're up for shell scripting, you could use automator to call a hiding script like chflags hidden *.log *.nav *.aux etc... but it might be far easier to use a terminal alias. Again, the pieces of your answer are here on the site but you'll need to put together if you want a shell alias, automator script, shell script, launchd task, etc... – bmike Jan 14 '13 at 23:18

I haven't solved this, but to work a report in LaTeX I add " " to the Finder-comment of my main.tex-file, " " to my chapters-folder " " to my images-folder and so on. Then I view my project with folders cascading after sorting by comment. (press command-J to get options to add the comment-collumn to your project window). It's not neat at all, but still.

I would love a .htaccess-kind of file for Finder that would specify file-endings to hide or show (and, why not, columns or other view options).


Not exactly an answer to your question, but I wrote a program that removes all LaTeX auxiliary files from a directory IF they are more recent than the .tex file having the same name. The programming language is C++. If you have a C++ compiler I may provide a link to the code (that was an example given in a C/C++ class for students).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .