1

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?

cryingshadow
  • 2,350
Sam
  • 11
  • 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 08 '15 at 00:24
  • Exactly! Is there any box that I can unmarked? – Sam Jan 08 '15 at 00: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 08 '15 at 00: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 08 '15 at 00:34
  • Check this out: http://tex.stackexchange.com/q/119533/10898 or http://tex.stackexchange.com/q/165660/10898. Possible duplicate. – azetina Jan 08 '15 at 00:50
  • Menu Tools -> Clean. – Bernard Jan 08 '15 at 01:25
  • If you delete them then your references, cross-references etc. will never be resolved, you will be unable to use citations or a bibliography, or an index, or a table of contents, or a list of tables or figures. Also, some tables will never display properly and some diagrams will never be positioned correctly, if they appear at all. And you will probably lose some other functionality besides. You can delete the files safely once you have finalised your document and generated the final PDF. And you can delete the .log file if you have no problems. – cfr Jan 08 '15 at 03:47
  • https://tex.stackexchange.com/questions/24785/deleting-external-auxiliary-files/30650 – qwr Jun 20 '21 at 20:53

2 Answers2

1

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...

ic_fl2
  • 387
1

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.