Latex: how to clean out all the intermediate files
09 Sep 2022Sometimes when compiling a document – say you’re added to the .bib file or really changed the sections – the document will not compile with pdlflatex
because all the intermediate files such as .aux
, .log
, have problems. The way to get the document to compile is to delete all that junk (including the .pdf
!) and try again.
To get around this manual process, I was looking for a ‘latex clean’ command. Tobias Fischer responded on Twitter, where he recommended latexmk
.
Build: latexmk -pdf main.tex
Clean: latexmk -C main.tex
Hey, it works great! CTAN information: latexmk.