TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

When one has a lot of documents for a single project, it gets important not to lose the overview. I use \usepackage{auto-pst-pdf} together with pdflatex and it works fine in principal. However, the images are always created in the same folder as my .tex files (with the suffix "-pics.pdf") and I seem not able to change this default behavior. This makes my main folder really crowded. My question is: How can I change where my "temporary" .pdf files are saved and how they are called when I use \usepackage{auto-pst-pdf}?

For \usepackage{pst-pdf} there exists an option \edef\PDFcontainer{...}, with which one can define such a file name and path. Nevertheless, this does not work for the auto version, where there appear to be other definitions like \edef\pics{...} and \def\suffix{}, but those dont work as expected. I am sure it is pretty easy to solve my question, but I do not seem to get it.

Additional note: The option \usepackage[cleanup={log,dvi,ps,pdf}]{auto-pst-pdf} deletes all temporary files except for the temporary .pdf files "*-pics.pdf".

share|improve this question
how can your main folder "really crowed" when you have one additional file? – Herbert Nov 28 '11 at 18:46
I have a small workaround: add \makeatletter\app@remove@container\makeatother after every \end{pspicture}. It deletes the temporary files of this picture. This command seems not to be evoked after the compilation and I consider it a bug that the cleanup does not work properly. – Hendrik Nov 28 '11 at 19:23
the cleanup is the default and there will be no additional file other than the container file. – Herbert Nov 28 '11 at 19:55
Right, but I dont want a container file. How can I get auto-pst-pdf to delete this file automatically? – Hendrik Nov 28 '11 at 20:00
sorry, still no output file when using \usepackage[crop=off,pspdf={-sOutputFile=/tmp/\jobname-pics.pdf}]{auto-pst-pdf}‌​ and \edef\PDFcontainer{/tmp/\jobname-pics.pdf}. The folder "tmp" exists of course. The error message "File ..../tmp/...-pics.pdf not found." is being shown. – Hendrik Nov 29 '11 at 10:29

For example if the file should be saved in /tmp/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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