8

I have this example

% arara: pdflatex
% arara: pdflatex
% arara: clean: { files: [test.log,test.aux] }
\documentclass{article}
\usepackage{lipsum}

\begin{document}

\tableofcontents

\section{Section one}

\lipsum[1-5]

\section{Section two}

\lipsum[1-4]

\end{document}

I want to remove all auxiliary files except tex and pdf files, with % arara: clean: { files: [test.log,test.aux] } you can remove log and aux files, what I need is also to remove all created test.* files leaving only test.tex and test.pdf

Rather then % arara: clean: { files: [test.log,test.aux,test.toc,test.lof,test.lot,.....] } is there a possibility to just only mention the remaining files in this case test.tex and test.pdf

  • 2
    Stupid question: Can't you just add the other files in the list? – user36296 Jun 18 '17 at 18:54
  • 3
    You could make a new clean rule to use your own delete script instead of rm (which is what the default clean uses.) But as @NicolaTalbot says in her comment, "delete all except" scripts are dangerous; I have a script rmaux which deletes all files with particular extensions. This is a safer way to proceed. – Alan Munn Jun 18 '17 at 19:35
  • 2
    Could be quite dangerous to do that. What if you later decide to add an important file to that directory that doesn't have .tex or .pdf extension? – Nicola Talbot Jun 18 '17 at 19:35
  • 1
    My folder contain only test.tex file and I want only test.tex and test.pdf in this folder after compilation – Salim Bou Jun 18 '17 at 19:40
  • Hi Salim. Do you know how to do this with the current version (4.0) of Arara? – Evan Aad May 11 at 9:23
8

For arara 3.0 you could do:

% !TeX program = txs:///arara
% arara: pdflatex
% arara: lmkclean

\documentclass{article}

\begin{document}
test
\end{document}
  • Does it works also for Windows? I tried but I got this error: Can't locate Digest/MD5.pm in @INC (you may need to install the Digest::MD5 module) – CarLaTeX Jun 20 '17 at 20:33
  • @CarLaTeX No idea, I don't have windows. – user36296 Jun 20 '17 at 21:21

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.