I am quite new in LaTeX and I am using TexMaker. How can I remove some of its output (such as .aux, .out, .synctex) and just see the .tex and .pdf files?

  • 1
    You mean without going to Tools -> Clean? BTW, under Options -> Configure Texmaker there is a checkbox at the bottom that says Launch the "Clean" tool when exiting Texmaker – azetina Jan 8 '15 at 0:24
  • Exactly! Is there any box that I can unmarked? – Sam Jan 8 '15 at 0:26
  • Actually I do not want that texMaker makes those outputs anytime, is there any option? because my files are on dropbox and I should see these new files each time that I run it! – Sam Jan 8 '15 at 0:31
  • 5
    That's a little bit hard to do as aux, toc and log files are necessary when indexing and creating table of contents etc. The only way possible is to compile like normal and the delete. Maybe wait for another comment but that is what most here will tell you. – azetina Jan 8 '15 at 0:34
  • Check this out: tex.stackexchange.com/q/119533/10898 or tex.stackexchange.com/q/165660/10898. Possible duplicate. – azetina Jan 8 '15 at 0:50

As stated in the comment, use the clean tool or set to use clean tool on exit in the preferences. But be sure to quit and not just close the file.

Especially when having many files open this isn't always possible, so I made a small bat script that deletes nearly all types of output files in the folder it sits in and its sub folders:

del /S *.log
del /S *.lof
del /S *.out
del /S *.synctex.gz
del /S *.aux
del /S *.bbl
del /S *.lot
del /S *.blg
del /S *.tdo
del /S *.toc

just add any extensions you might encounter and save the file as a .bat using your favorite text editor and place it in the root folder of your latex project(s). Obviously use different commands and options for linux...


Trying to prevent the creation of auxiliary files is a very bad idea - as well as deleting them after every run. Latex needs them in many instances to produce correct output. But if you don't want them in your directory, a possible solution would be the LaTeX build wrapper ltx2any. This does not prevent the creation of all the auxiliary files, but places them in another directory, which you can specify

ltx2any -t path_where_you_want_the_auxiliary_files_to_go filename.tex 

This path can very well be a tmp folder, so you will not see these files again, but latex can access them.

For more options, see ltx2any --help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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