2

Possible Duplicate:
Prevent pdflatex from writing a bunch of files.

Every time I generate the PDF in TexMakerX 2.1 for Windows, it also generates the log, aux and gz files, in which I have no interest. How can I stop that?

  • 1
    You can't. Those file are necessary for typesetting the file. – egreg Nov 15 '12 at 16:49
  • @egreg can't I make it auto-delete after the PDF is ready? O create those in a temp folder and move the PDF to my desktop (automatically)? – The Student Nov 15 '12 at 16:53
  • Welcome to TeX.SE. Yes you can delete them, but that will just slow down your next compilation (assuming you want all the references). I fought this battle a while ago and learned to just live with them, and clean them up every once in a while, but if you are using a script to build, then remove them from there. – Peter Grill Nov 15 '12 at 18:58
  • 1
    TeXmakerX is pretty outdated. That very same program has been called "TeXstudio" since June last year, and its current version is 2.5. – doncherry Nov 15 '12 at 19:05

1 Answers1

1

As egreg already mentioned, the auxiliary files are needed for typesetting your document. You can remove the auxiliary files only after the "complete" PDF output is generated. The "complete" means that the cross-reference is properly typeset.

Removing the auxiliary files will be easier if you create a make file (in Linux) or a batch file (in Windows).

Edit:

An example of batch file (for Windows user) that not only compiles the input file 3 times (3 times should be enough) and but also removes the auxiliary files at the end.

echo off

rem %1 TeX input filename without extension

if exist "%~1.pdf" del "%~1.pdf"

if exist "%~1.tex" pdflatex --shell-escape -draftmode -interaction=batchmode "%~1.tex"
if exist "%~1.tex" pdflatex --shell-escape -draftmode -interaction=batchmode "%~1.tex"
if exist "%~1.tex" pdflatex --shell-escape -draftmode -interaction=batchmode "%~1.tex"
if exist "%~1.tex" pdflatex --shell-escape "%~1.tex"

for %%x in (aux log out toc nav snm) do (if exist "%~1.%%x" del "%~1.%%x")