I'm trying to use latexindent to clean up my code in TexStudio and I can't get it to work.

  • I've installed latexindent and arara in Tex Live Utility
  • I've added a User Command to TexStudio of: /usr/texbin/arara -v -l %
  • At the top of my document I've written: % arara: indent: {overwrite: yes, trace: yes}

When I run the user command, I get:

/usr/texbin/arara: line 2: kpsewhich: command not found
Error: Unable to access jarfile

Any ideas? Thanks

  • Do you have arara.jar in the system path? What do you get if you type arara.jar -v in the terminal?
    – user11232
    Commented Nov 21, 2014 at 4:48
  • I get -bash: arara.jar: command not found
    – jimbo
    Commented Nov 21, 2014 at 4:49
  • Then add arara.jar in system path. Don't ask me how, I am on windows ;)
    – user11232
    Commented Nov 21, 2014 at 5:08
  • Did you install the full texlive? If so, how did you install it? Did you use apt-get? If you use the method illustrated in tex.stackexchange.com/questions/1092/… then arara and latexindent should work pretty much out of box -- let us know, and hopefully we can help :)
    – cmhughes
    Commented Nov 28, 2014 at 23:16

2 Answers 2


If you use Yosemite, the error is repeatable. Joseph Wright has found a temporary solution until the issue will be fixed by the maintainers:

Start TeXWorks from the terminal

/Applications/TeXworks.app/Contents/MacOS/TeXworks &


and see:

texworks on mac epstopdf or repstopdf not found

  • To this end, you may be able to edit /etc/paths to modify your global PATH to include texbin. This may allow the user to open the application normally. I'm not sure about the path to that file -- I'm not in front of my computer right now :) Commented Dec 31, 2014 at 16:40
  • @SeanAllred: Thanks for the hint. I tried it, unfortunately without any success. Maybe I missed something and you can improve the answer (it's a cw) Commented Dec 31, 2014 at 18:03
  • 1
    Don't launch it using open, as you'll end up with the same bad environment. Launch the executable inside the .app bundle directly, as described here: tex.stackexchange.com/a/208310/61839 Commented Jan 2, 2015 at 4:24

Same problem as the OP on Yosemite 10.10.3. My simple solution was to create an app (so that I could launch it from Alfred) in Automator:

on run {input, parameters}
    tell application "texstudio"
    end tell
    return input
end run

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .