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?
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?
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).
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")
if then else end if does not exist on windows?
– Lionel MANSUY
Nov 16 '12 at 08:53