[auctex] pdflatex: command not found

  • Follow


Aloha all,

I'm setting up Emacs 23 on my OS X 10.5 MacBook and have run into an 
old problem:

Running `LaTeX' on `tsd_135_drr' with ``pdflatex -synctex=1  
-interaction=nonstopmode "\input" tsd_135_drr.tex''
/bin/sh: pdflatex: command not found

This is one I've solved before with other emacsen, so I went through 
the old steps:
1) make sure exec-path has the path to pdflatex:

("/usr/bin" "/bin" "/usr/sbin" "/sbin" 
"/Applications/Emacs23.app/Contents/MacOS/bin" "/usr/texbin")

2) copy the failed command from the output window and see if it runs in 
the shell (pre-pending the path to pdflatex in exec-path)

potofo-ou:report dk$ /usr/texbin/pdflatex -synctex=1  
-interaction=nonstopmode "\input" tsd_135_drr.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
entering extended mode
LaTeX2e <2009/09/24>
....

I'm stumped.

Carbon Emacs on the same machine does just fine, using /bin/sh and what 
appears to me to be a functionally equivalent exec-path (it also has 
/usr/texbin).

I've read several approaches to setting path variables on the Mac, but 
would like to rely completely on settings in my .emacs for this setup.

Any pointers will be much appreciated.

All the best,
Tom

-- 
Tom Dye
T. S. Dye & Colleagues, Archaeologists, Inc.
Honolulu, Hawai`i

0
Reply tsd (104) 12/6/2009 1:52:09 AM

Tom Dye <tsd@tsdye.com> writes:

> Aloha all,
>
> I'm setting up Emacs 23 on my OS X 10.5 MacBook and have run into an
> old problem:
>
> Running `LaTeX' on `tsd_135_drr' with ``pdflatex -synctex=1
> -interaction=nonstopmode "\input" tsd_135_drr.tex''
> /bin/sh: pdflatex: command not found
>
> This is one I've solved before with other emacsen, so I went through
> the old steps:
> 1) make sure exec-path has the path to pdflatex:
>
> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
> "/Applications/Emacs23.app/Contents/MacOS/bin" "/usr/texbin")

What makes you think that helps?  AUCTeX calls everything through a
shell.

So you better do something like

(setenv "PATH" (concat "my path:" (getenv "PATH")))

>
> 2) copy the failed command from the output window and see if it runs
> in the shell (pre-pending the path to pdflatex in exec-path)
>
> potofo-ou:report dk$ /usr/texbin/pdflatex -synctex=1
> -interaction=nonstopmode "\input" tsd_135_drr.tex
> This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
> entering extended mode
> LaTeX2e <2009/09/24>
> ...
>
> I'm stumped.
>
> Carbon Emacs on the same machine does just fine, using /bin/sh and
> what appears to me to be a functionally equivalent exec-path (it also
> has /usr/texbin).
>
> I've read several approaches to setting path variables on the Mac, but
> would like to rely completely on settings in my .emacs for this setup.
>
> Any pointers will be much appreciated.
>
> All the best,
> Tom

-- 
David Kastrup
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>
0
Reply David 12/6/2009 8:48:44 AM


Tom Dye <tsd@tsdye.com> writes:

> Aloha all,
>
> I'm setting up Emacs 23 on my OS X 10.5 MacBook and have run into an
> old problem:
>
> Running `LaTeX' on `tsd_135_drr' with ``pdflatex -synctex=1
> -interaction=nonstopmode "\input" tsd_135_drr.tex''
> /bin/sh: pdflatex: command not found
>
> This is one I've solved before with other emacsen, so I went through
> the old steps:
> 1) make sure exec-path has the path to pdflatex:
>
> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
> "/Applications/Emacs23.app/Contents/MacOS/bin" "/usr/texbin")
>
> 2) copy the failed command from the output window and see if it runs
> in the shell (pre-pending the path to pdflatex in exec-path)

This is a known problem. See: (info "(emacs)Mac OS / GNUstep").

So what you need to do is to create
/Users/someusername/.MacOSX/environment.plist with the following in
it:

--8<---------------cut here---------------start------------->8---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>PATH</key>
        <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/texlive/2009basic/bin/universal-darwin</string>
</dict>
</plist>
--8<---------------cut here---------------end--------------->8---

Restart Emacs.app 23 and it will get the env PATH from that file.

Leo
0
Reply Leo 12/6/2009 10:06:45 AM

Aloha David,

Thanks for your response.  I appreciate your taking the time to offer 
advice.  A reply to your question follows.

On 2009-12-05 22:48:44 -1000, David Kastrup <dak@gnu.org> said:

>> 1) make sure exec-path has the path to pdflatex:
>> 
>> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
>> "/Applications/Emacs23.app/Contents/MacOS/bin" "/usr/texbin")
> 
> What makes you think that helps?  AUCTeX calls everything through a
> shell.

Given the following definition of exec-path (C-h v exec-path), and my 
(possibly mistaken) belief that pdflatex is run as a subprocess, it 
seemed logical to think that it will help.

exec-path is a variable defined in `C source code'.
Its value is
("/usr/bin" "/bin" "/usr/sbin" "/sbin" 
"/Applications/Emacs23.app/Contents/MacOS/bin" "/usr/texbin")


Documentation:
*List of directories to search programs to run in subprocesses.
Each element is a string (directory name) or nil (try default directory).

All the best,
Tom

-- 
Tom Dye
T. S. Dye & Colleagues, Archaeologists, Inc.
Honolulu, Hawai`i

0
Reply Tom 12/6/2009 3:48:26 PM

Aloha Leo,

Thank you.  I appreciate the pointer to the emacs documentation and 
your solution to the problem.

All the best,
Tom

On 2009-12-06 00:06:45 -1000, Leo <sdl.web@gmail.com> said:

> Tom Dye <tsd@tsdye.com> writes:
> 
>> Aloha all,
>> 
>> I'm setting up Emacs 23 on my OS X 10.5 MacBook and have run into an
>> old problem:
>> 
>> Running `LaTeX' on `tsd_135_drr' with ``pdflatex -synctex=1
>> -interaction=nonstopmode "\input" tsd_135_drr.tex''
>> /bin/sh: pdflatex: command not found
>> 
>> This is one I've solved before with other emacsen, so I went through
>> the old steps:
>> 1) make sure exec-path has the path to pdflatex:
>> 
>> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
>> "/Applications/Emacs23.app/Contents/MacOS/bin" "/usr/texbin")
>> 
>> 2) copy the failed command from the output window and see if it runs
>> in the shell (pre-pending the path to pdflatex in exec-path)
> 
> This is a known problem. See: (info "(emacs)Mac OS / GNUstep").
> 
> So what you need to do is to create
> /Users/someusername/.MacOSX/environment.plist with the following in
> it:
> 
> --8<---------------cut here---------------start------------->8---
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
> "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
>         <key>PATH</key>
>         
> <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/texlive/2009basic/bin/universal-darwin</string>
</dict>
</plist>
--8<---------------cut 
> 
> here---------------end--------------->8---
> 
> Restart Emacs.app 23 and it will get the env PATH from that file.
> 
> Leo


-- 
Tom Dye
T. S. Dye & Colleagues, Archaeologists, Inc.
Honolulu, Hawai`i

0
Reply Tom 12/6/2009 3:52:01 PM

4 Replies
1308 Views

(page loaded in 0.058 seconds)

Similiar Articles:













7/22/2012 10:35:22 PM


Reply: