[Tex/LaTex] Setting up arara user command in TeXstudio on Windows

ararapdftextexstudio

I'm trying to set up an arara user command in TeXstudio. I've been following this very helpful little tutorial that can be found as an answer the following question:

How to configure TexStudio editor to use glossaries package with makeglossaries and xindy or how to configure TexStudio to use arara?

The only issue I have is that I can't seem to get the syntax for the user command correct on Windows. The closest to working that I can get is:

Arara user command

This does open arara, but then I get the error:

I'm sorry, but the command from the 'PDFLaTeX' task could not be
found. Are you sure the command 'pdflatex "lecture3.tex"' is
correct, or even accessible from the system path?

Note that the source tex file (lecture3.tex) has the command % arara: pdflatex at the top. Do I need to tell TeXstudio where to find pdflatex even though it's in the same folder as arara? This is all using MiKTeX on Windows.

Best Answer

While arara comes with MiKTeX, the default rules do not. When I was calling arara.exe to the .tex file, I was then instructing arara to call pdflatex which corresponds to the default rule pdflatex.yaml. Of course, since the default rules are not included in MiKTeX, this yielded an error. The simplest solution is to get the standalone version of arara from Github. You could perhaps also put a folder with the default rules inside the MiKTeX distribution file system, but I have not tested this.

Once you have the standalone version installed, I recommend creating the user command in TeXstudio as:

"C:\Program Files (x86)\arara\arara.exe" -v -l %

Of course, customize the path to wherever you installed arara.

Cheers to Paulo Cereda and his crew for this wonderful tool!