litex icon indicating copy to clipboard operation
litex copied to clipboard

error message: pdflatex not found

Open fbreuer opened this issue 10 years ago • 12 comments

When trying to compile a TeX file I get the error message

/bin/sh: pdflatex: command not found

However, pdflatex is installed and on the path. Running pdflatex from a terminal works fine, even from one using /bin/sh instead of /bin/bash as shell.

fbreuer avatar Jan 07 '15 13:01 fbreuer

Sorry -- I must have missed the email for this bug when you reported it. What OS are you using? What is your default shell?

If you're using OSX, this sounds a lot like #5.

rschroll avatar Jan 24 '15 19:01 rschroll

Same issue for me. I followed the other thread which doesn't do it for me. My tex setup works fine otherwise. I use it every day.

I tried manually specifying a path in the litex config, but that didn't seem to help.

mrtzh avatar Feb 10 '15 21:02 mrtzh

Same questions to you: Which OS? What's your default shell (if applicable)?

Also, if you could post your modified litexrc file and the resultant error message, it might give us some clues.

rschroll avatar Feb 10 '15 21:02 rschroll

Mac OS X 10.10.1 MacTex 2014 (TexLive 2014) I can run "pdflatex" from any shell (sh, bash, tcsh) and it works.

I added the following in my .literc file in the appropriate place:

 "commands": ["/usr/texbin/pdflatex"]

It results in the same error message as before:

/bin/sh: pdflatex: command not found

mrtzh avatar Feb 10 '15 21:02 mrtzh

The fact that the error message references "pdflatex", and not "/usr/bin/pdflatex" makes me suspect that the latexrc file is not being used. First, I'd like to double check that the file is named ".litexrc", not ".literc". I suspect you just mistyped in the bug report, but I want to be sure. :)

Then, I'd try changing the command to something that definitely doesn't exist, and see if the error message updates. If it doesn't, then the setting isn't being applied for some reason. Make sure the .litexrc file is in the same directory as your tex file, and make sure you're using the compilation command that corresponds to the one you're running (Cmd-Enter or Cmd-Shift-Enter, for file and project, respectively).

rschroll avatar Feb 10 '15 23:02 rschroll

Yeah, that was a typo, but still I messed up. I think I broke the local .litexrc so that litex skipped straight to the global rc file that still had the old setting in it. In the end what fixed it was simply to specify the absolute path in the rc file:

    "commands": ["/usr/texbin/pdflatex \"%f\""]

Thanks for your quick response.

mrtzh avatar Feb 11 '15 03:02 mrtzh

Hi, I think I got the same problem. May I ask where to find .litexrc file? Thx!

Ariel

arielleon avatar Apr 04 '15 18:04 arielleon

Litex will check two configuration files, first "litexrc" in your XDG data directory (~/.config/ on most linuxes) and then ".litexrc" in the current working directory. You can open these files in LightTable with the "Edit global LaTeX compilation settings" command and the "Edit local LaTeX compilation settings" command. (If those files don't exist, they will be created for you with a template for you to edit.)

rschroll avatar Apr 05 '15 03:04 rschroll

Thank you! Yet surprisingly I still get the same error, after editting both the global and local "litexrc". I add "commands": ["/usr/texbin/pdflatex "%f""] under the line
//"commands": "pdflatex",

Wenjie

arielleon avatar Apr 05 '15 23:04 arielleon

Are you getting any other error messages in the LightTable console? My first suspicion is that something is messed up in the rc files, and Litex is ignoring them. You can also try changing the command to an executable that doesn't exist and check that the error message changes. If not, that means the rc file is being ignored for some reason.

rschroll avatar Apr 08 '15 01:04 rschroll

I think they are not ignored. I change either one file into "commands": ["/usr/texbin/pdflatex "%f"" without the "]". In either case, I get error in console: litex_compiled.js[122]: Error parsing /Users/wenjieji/Library/Application Support/litexrc: SyntaxError: Unexpected token } Ignoring this file. While before changing, I had no errors in console.

Wenjie

arielleon avatar Apr 10 '15 03:04 arielleon

I fixed this problem on OS X EI Captian. On EI Captian, when installing MacTex-2015, it creates a symbolic link to /Library/Tex/texbin, rather than /usr/texbin. So in "litexrc" file, ( I open the global one by using the "Edit global LaTeX compilation settings" command in lighttable) add

"commands": ["/Library/Tex/texbin/pdflatex "%f""] under the line //"commands": "pdflatex"

Wenjie

arielleon avatar Oct 16 '15 16:10 arielleon