Take the 2-minute tour ×
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.

Possible Duplicate:
Deleting external/auxiliary files?

Is anyone aware of a way of how to cleanup temporary files generated by pdflatex during the generation of the PDF file? I came across the pdflatex parameter -aux-directory= but I cannot find where to set it. I also came across some sort of macro called LaTeX-clean-intermediate-suffixes, but neither am I sure how I can execute it manually or even better automatically after the compilation.

share|improve this question

migrated from stackoverflow.com Sep 29 '11 at 9:19

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Seamus, Loop Space, diabonas, Joseph Wright Sep 29 '11 at 10:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
This question has been asked before: tex.stackexchange.com/questions/24785/… and tex.stackexchange.com/questions/11123/… –  Seamus Sep 29 '11 at 9:32
    

1 Answer 1

up vote 2 down vote accepted

I don't think this is possible with pdflatex but it is with latexmk by using the option -c as in

latexmk -c foo.tex

See http://tex.stackexchange.com/questions/11123/prevent-pdflatex-from-writing-a-bunch-of-files/11125#11125 for details.


Why use latemk instead of pdflatex? Because it makes compilation easier. You just have to issue latexmk once and it runs pdflatex, bibtex or biber and makeindex as many times as it takes for the document to be fully compiled. It has several other features you might like too.

share|improve this answer
    
Thank you so much for your comments! They look very promising ;) In fact I use now the following solution, based on latexmk. jon.smajda.com/2008/03/08/latexmk –  Eric Sep 29 '11 at 17:10

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