# Make arara close pdflatex upon error

I am using arara and TexStudio, and before I started using arara, Texstudio would shut down the pdflatex process on hitting Stop Compiling. I'm using arara with the following commands:

% arara: pdflatex
% arara: biber
% arara: pdflatex


Whenever there's an error, I have to shut down the pdflatex process manually from the Task-Manager, since Stop Compiling won't shut down the process anymore when I use arara.

(I'm not using the English version of TexStudio, so I'm not entirely sure that what I'm hitting is called Stop Compiling. It's a big red square that tells TexStudio to stop compiling.)

• Would % arara: pdflatex: {interaction: nonstopmode} help? This will make pdflatex finish the run, no matter if there had been an error or not, so you don't need the stop compile button at all. – user36296 Apr 23 '17 at 13:12
• @samcarter This tells me that there is no interaction argument in the pdflatex directive; I haven't played around with arara enough to know whether that is straightforward to implement – sgf Apr 23 '17 at 13:25
• Sounds strange, which version of arara are you using? Can you show the whole error message? – user36296 Apr 23 '17 at 13:35
• @samcarter Version 3.0, the error message is as follows: Oh no, there are arguments used in the diretive 'pdflatex' which are not defined in the 'pdflatex.yaml' rule located at 'C:\Program Files (x86)\arara\rules'. You can either remove them from the 'pdflatex' directive or add them to the list of arguments in the 'pdflatex.yaml' rule. Here they are: [interaction] – sgf Apr 23 '17 at 13:38
• @samcarter I checked the yaml file and it had this bit in it: - identifier: action flag: <arara> --interaction=@{parameters.action} Once I changed interaction in your code to action, it worked fine. Thanks! – sgf Apr 23 '17 at 13:41

Instead of trying to fix the behaviour of the stop compile button, I would avoid to having to use it in the first place.

If you call arara with:

% arara: pdflatex: {interaction: nonstopmode}


(arara version 4.0)

% arara: pdflatex: {action: nonstopmode}


(arara version 3.0)

this will tell pdflatex to finish its run, no matter if there had beed errors or not - so you will not need to aboard pdflatex manually.

You can pass arara the command line option halt-on-error:

% arara: pdflatex: { options: [-halt-on-error]}
% arara: bibtex
% arara: pdflatex

\documentclass{article}

\begin{document}

\ERROR

\end{document}


As you see from the picture, I clicked the “compile” button and it became green again after arara stopped.

Here I used TeXworks, but it should be the same with TeXStudio.

• Well that's the odd thing, apparently as far as TexStudio is concerned, clicking the red button does what it should do: The mouse curser becomes unbusy, the red button grays out and the green button becomes available again. But when I change the code and run it again, the error message will stay the same, I can't delete any auxiliary files because they're still open, and the TaskManager shows an instance of pdflatex running already (and hitting the green button will start a second one.) – sgf Apr 23 '17 at 13:22
• @sgf Sorry, but TeXStudio refuses to launch on my machine. – egreg Apr 23 '17 at 13:24
• But are you sure that there isn't an instance of pdflatex running and TeXworks just pretends it stopped the process? – sgf Apr 23 '17 at 13:25
• @sgf Yes, just checked. What OS are you on? – egreg Apr 23 '17 at 13:27
• I'm on Windows 8.1 – sgf Apr 23 '17 at 13:29