TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way to pass a command in the .emacs so the Aquamacs to trash all the auxiliary files keeping only pdf and tex in the folder?

share|improve this question

closed as unclear what you're asking by Sean Allred, yo', Papiro, Martin Schröder, Joseph Wright Mar 14 '15 at 20:25

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Why would you want to do that? It just means you have to run latex more times next time you edit it? – David Carlisle Jun 26 '14 at 18:00
Trashing auxiliary files only makes (little) sense when the document is in its really-really-no-more-changes; until that time, the auxiliary files mustn't be trashed, because they're used in the next run of TeX. – egreg Jul 5 '14 at 21:33
I would just open dired, mark the files I want to keep (m), toggle the marks (t), and delete the marked files (D). Quick, painless, and you're always sure of exactly what you're deleting. If there are a lot of files to go through, you can use dired-mark-extension. (I would bind this to a key.) – Sean Allred Mar 14 '15 at 18:30

If you put \nofiles in your preamble then you will not generate any aux files.

share|improve this answer
Technical note: This does not delete auxiliary files (as requested by the OP), it prevents their creation in the first place. – Paul Gessler Jun 26 '14 at 18:47
Thanks for the advices. But I noticed that by using \nofiles in the preamble, it still creates some extra files in the folder. – user45367 Jun 26 '14 at 22:25
I meant, it would be nice to hear an automagically solution for "when Aquamacs close, delete all created auxiliary files." – user45367 Jun 26 '14 at 22:37
@user45367 While possible, that's neither reasonable nor reliable. It's best to write a cleanup shell script or use arara to manage your build. – Sean Allred Mar 14 '15 at 18:31

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