4

I am writing a report in TeXShop with a main file (main.tex) and several chapter files, which I include with the \include command. The main.tex looks as follows:

% !TEX TS-program = pdflatexmk
\documentclass{article}
\begin{document}
\include{chapters/one}
\include{chapters/two}
\end{document}

The directory structure looks like this:

root
|
|-main.tex
|
|-chapters
    |
    |-one.tex
    |-two.tex

When compiling, .aux files are created in the root folder but also in the chapters folder. When something goes wrong and I want to trash the .aux files I press the "Trash Aux Files" button in the console or hit "Trash Aux & Typeset" in the menu.

However, this only trashes the .aux files in the root folder, not in the chapters folder. Is there a way to direct TeXShop to the aux files in the subfolders? I am using TeXShop 3.26 with pdflatexmk 4.37

7

After an e-mail to the developer of TexShop it turned out that I didn't read the manual. Going to Help -> TeXShop Help Panel... -> How do I configure TeXShop -> Hidden Preference Items I found:

Sometimes a more extensive cleanup is desirable. If the option key is held down while choosing "Trash AUX Files," TeXShop uses the "% !TEX root = ..." and "Set Project Root" mechanisms to find the root file. It then moves all files in the folder of this file and any subfolders of this folder to the trash if they have appropriate extensions, regardless of the names of the files. This behavior can be made the default behavior for "Trash AUX Files" without using the option key; issue the command

defaults write TeXShop AggressiveTrashAUX YES

This solved my problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.