# Setting up arara user command in TeXstudio on Windows

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:

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.

• Have you tested that arara actually works from the command line? (dos prompt) it needs to at least work there in order to work in general. I cannot test it as I have no java on my computer ;-) – daleif Jun 3 '16 at 8:51
• Are you in the folder where `lecture3.tex` is? can nyou compile it with normal `pdflatex` on the command line? – daleif Jun 3 '16 at 9:08
• In the command line, if I navigate to the folder containing `lecture3.tex` and run `arara lecture 3.tex`, arara and the pdflatex it calls work fine. – Shane Jun 3 '16 at 9:23
• Is there an `arara.exe` file in `C:\Program Files (x86)\MiKTeX 2.9\miktex\bin` (with a `.exe` extension)? I don't use Windows, but arara is a Java application, so it comes as a `.jar` file. When you run `arara` from the command line, it might actually be invoking `java -jar /path/to/arara.jar`. – Nicola Talbot Jun 4 '16 at 10:56
• @NicolaTalbot Yes, there is an `arara.exe` file there. Judging from the error, the issue is not that `arara` isn't opening, but rather that when it does it cannot find `pdflatex.exe`, despite the fact that it's in the same folder as `arara.exe`. Perhaps it is looking for it in the folder where the `.tex` file is -- this is my suspicion. – Shane Jun 4 '16 at 12:05

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!

• If you use verbose option (`-v`) in TeXstudio on Windows 10, when there is an error (for example an undefined control sequence) Texstudio blocks and the process remains hanging even if you push the red stop button (you have to kill it with Task Manager). With the log option (`-l`) only: `arara -l % | txs:///view | txs:///view-log` it works like a charm! – CarLaTeX Nov 8 '16 at 22:05
• Moreover, I've installed arara with MiKTeX 2.9 an I've automatically found also the rules on my pc, at the directory: `C:\Users\myuser\AppData\Local\Programs\MiKTeX 2.9\scripts\arara\rules` – CarLaTeX Nov 9 '16 at 6:23