6

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

jimbo
  • 113
  • Do you have arara.jar in the system path? What do you get if you type arara.jar -v in the terminal? –  Nov 21 '14 at 04:48
  • I get -bash: arara.jar: command not found – jimbo Nov 21 '14 at 04:49
  • Then add arara.jar in system path. Don't ask me how, I am on windows ;) –  Nov 21 '14 at 05: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 http://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-Ubuntu then arara and latexindent should work pretty much out of box -- let us know, and hopefully we can help :) – cmhughes Nov 28 '14 at 23:16

2 Answers2

3

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 &

http://chat.stackexchange.com/transcript/message/19316883#19316883

and see:

texworks on mac epstopdf or repstopdf not found

Marco Daniel
  • 95,681
  • 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 :) – Sean Allred Dec 31 '14 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) – Marco Daniel Dec 31 '14 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: http://tex.stackexchange.com/a/208310/61839 – Adam Maxwell Jan 02 '15 at 04:24
0

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"
        activate
    end tell
    return input
end run
Centzon
  • 130