LaTeX auxiliary file clean-up
Here is a quick definition for bash/zsh what will delete all output files related to LaTeX .tex files in the current directory:
rubber () {
shopt -s nullglob # Ignore unmatched globs (bash; zsh not needed)
local exts=(
aux fdb_latexmk idx ilg ind fls log out synctex.gz toc snm nav
gnuplot table vrb lot lof blg bcf bbl run.xml synctex dep
)
for t in *.tex; do
local base=${t%.tex}
for ext in "${exts[@]}"; do
rm -f -- "$base.$ext"
done
done
}
Usage: just run rubber in the directory of interest.
Example: with a.tex a.log, b.log, it removes a.log but keeps b.log.
