3

I have a pdflatex program located in

/usr/local/texlive/2014/bin/i386-linux/pdflatex

I added it's folder to $PATH both in .bashrc and .bash_profile:

PATH=$PATH:/usr/local/texlive/2014/bin/i386-linux/

When I run this command in ordinary shell: both in X and console, it works. I wanted to run pdflatex upon the current file in buffer using this elisp command:

(start-process-shell-command
    "pdflatex"
    "*async pdflatex*"
    (concat "pdflatex " file-name))

It works in Windows, worked in Linux previously. But now I get an error:

/usr/bin/bash: pdflatex: command not found

How to fix?

0

1 Answer 1

4

Let me start by guessing that you start emacs from your graphical environment, and not from a shell. If you start it from the shell, emacs will inherit PATH from the shell, and you should be able to run your program.

How to fix depends on what linux distro you are using. As for me, I am running Ubuntu (15.10), and emacs sees the environment defined in .profile. In other words, try adding /usr/local/texlive/2014/bin/i386-linux to your PATH in .profile.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.