4

Following this answer, I fully installed arara from Github, then I tried to run the user command Arara from Texstudio menu on this simple code but I got an error

Uh-oh, the configuration file appears to be invalid. Are you sure it's a proper YAML file? Unfortunately, arara cannot proceed until a proper configuration file is provided.

what is the missing step?

% arara: pdflatex
\documentclass{article}
\begin{document}
Hello, world!
\end{document}
  • 1
    Arara is installed as part of TeX Live, at least. Don't know about MikTeX. Why did you want the GitHub version especially? – cfr Jun 8 '16 at 0:26
  • I googled the way I can install arara, and I came across this answer. Unfortunately, I found this error not popular. What do you advise me to do now? – Diaa Jun 8 '16 at 0:29
  • Did you try on the command line? Did you try arara? Usually, it is arara unless it is specially capitalised for Windows. Are you using MikTeX? It is very strange if that answer is right as it would break Arara for every MikTeX user. Possible, of course. – cfr Jun 8 '16 at 0:30
  • 1
    I am sorry. I use arara but I don't know what a user command is. Maybe it is a Windows thing and you will need somebody who knows Windows to help you. The file looks right. I would then run arara <filename> or arara <filename.tex. arara is the command installed by TeX Live in my case. As I say, I'm just not familiar with the terminology. On the systems I use, something is a command or not. – cfr Jun 8 '16 at 0:59
  • 1
    Deeply sorry for being so late to this question. A couple of remarks: sadly, for version 3.0, I could not manage to integrate arara into MiKTeX, so the only way is through either a manual deployment or the graphical installer. I will try to contact the MiKTeX team when version 4.0 is ready, so MiKTeX users will also get updates. Regarding your question, I am a bit puzzled, as arara does not require a configuration file to exist at all; the error being reported is about a malformed existing configuration file located in your home directory (in Windows, it's C:\Users\Paulo, for example). – Paulo Cereda Jul 30 '16 at 13:19
3

Finally, I figured it out with the help of this answer.

The complete steps to configure arara in TeXstudio on Windows are as follows:

  1. Download and install arara source file from Github

  2. If you let arara be installed in the default directory (i.e. C:\Program Files (x86)\arara), create arara configuration file araraconfig.yaml in the same directory and edit it to make search path

    config
    paths:
    C:\Program Files (x86)\arara\rules
    
  3. In Texstudio > Options > Configure Texstudio > Build > User Commands, add the following command

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

    enter image description here

  4. Test arara by running the user command Arara you have just created on the following sample file

    % arara: pdflatex
    \documentclass{article}
    \begin{document}
    Hello, world!
    \end{document}
    

    then you will get SUCCESS in the Messages window and an output PDF file.

Needless to say, the directory C:\Program Files (x86)\arara should be changed in the previous steps according to the actual one arara installed in.


Update 1

I tried to run arara after installing it in MiKTeX package manager, but I didn't know how to make it working. So far, the first approach seems to be working and straightforward.


Update 2

Because I have been notified in the comments that this configuration file is not a valid one, I tried to completely remove this config. file and run arara again. It works flawlessly without any warning of missing configuration file. At the first run, it seems that the arara was looking for a configuration file in its installation directory regardless its content.

I completely removed arara installation directory (since uninstaller.jar has no effect) and reinstalled it again without any creation of configuration file, and it works again without any problems.

Maybe, there is some weird thing happened after I created that invalid configuration file (at the very first run) that made everything works normally from then onwards.

|improve this answer|||||
  • 1
    I am lost, as arara does not need a configuration file at all. And the configuration file lookup procedure only checks your home directory (top level). I believe there might be some malformed configuration file in your home directory which was causing the issue. I would need more information about your system as a whole to see what's going on. Did you paste something from the manual into a file? Sometimes we get problems with hidden characters and wrong indentation. – Paulo Cereda Jul 30 '16 at 13:22
  • Thanks for considering my question. I have Windows 10 x64 and MikTex 2.9.6022. No, I didn't copy anything from the manual. My failed trial was to try download arara last version as of 9th July and run it directly on a file, but I got the warning message of missing configuration file. And it worked perfectly after creating a configuration file the way I did in my answer. – Diaa Jul 30 '16 at 15:14
  • 1
    I am deeply sorry, but I still don't follow. The config file you posted in your answer is not a valid YAML file. If arara were supposed to read this file, it would certainly raise an error. The tool won't search directories other than $HOME for a config file, and it works without it, unless you have a malformed one. The default rule path is automatically detected by the application. So either we have a misunderstanding, or you just found the most obscure bug ever. If the latter, please help me fill an issue here. – Paulo Cereda Jul 30 '16 at 17:46
  • 1
    The code you posted does not look exactly like the examples in chapter 6 of the manual. There is a ! missing before config, a : after paths, and ` - ` before the given path. – Torbjørn T. Jul 30 '16 at 21:50
  • 1
    Computers are witchcraft, basically. :) I improved the error detection in version 4.0, so the log file contains a lot of helpful information, including which config file was used. I am glad (and relieved) things worked out in the end. I will still check this issue with my Windows 10 VM later on. – Paulo Cereda Jul 31 '16 at 10:51

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.