emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] pdflatex not found?


From: Nick Dokos
Subject: Re: [O] pdflatex not found?
Date: Mon, 26 Oct 2015 20:14:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Peter Davis <address@hidden> writes:

> Nick Dokos <address@hidden> writes:
>
>
>> Peter Davis <address@hidden> writes:
>>
>>> I'm trying to export PDF from org, but I'm getting the error:
>>>
>>> pdflatex: Command not found. [3 times]
>>>
>>> I've checked the definition of exec-path, and it includes
>>> "/usr/texbin", which is where tcsh tells me the executable is.
>>>
>>> Any ideas?
>>>
>>
>> Backtrace?
>
> Sorry. Here's the backtrace:
>
> Debugger entered--Lisp error: (error "PDF file ./test.pdf wasn't produced")
>   signal(error ("PDF file ./test.pdf wasn't produced"))
>   error("PDF file ./test.pdf wasn't produced")
>   org-latex-compile("./test.tex")
>   #[(file) "\301!\207" [file org-latex-compile] 2]("./test.tex")
>   org-export-to-file(latex "./test.tex" nil nil nil nil nil #[(file)
> "\301!\207" [file org-latex-compile] 2])
>   org-latex-export-to-pdf(nil nil nil nil)
>   (org-open-file (org-latex-export-to-pdf nil s v b))
>   (if a (org-latex-export-to-pdf t s v b) (org-open-file 
> (org-latex-export-to-pdf nil s v b)))
>   (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b)
> (org-open-file (org-latex-export-to-pdf nil s v b))))(nil nil nil nil)
>   org-export-dispatch(nil)
>   call-interactively(org-export-dispatch nil nil)
>   command-execute(org-export-dispatch)
>
> This seems less useful to me than the *Messages* buffer:
>

Yes, probably, but if I can get people to submit backtraces when getting
an error, we can cut down the email volume by a factor of 2.43 (making up
fictitious data to bolster my case...) In all seriousness, at least it
shows that you are not going down some strange path.

It's not clear to me why the error message in the message file is different
from the error message above though.

> Debug on Error enabled globally
> org-babel-exp processing...
> executing Dot code block...
> Wrote 
> /var/folders/d4/xb7t0gbd0f97p6494kz5xzdnmlncz8/T/babel-2213VOW/ob-input-22136yU
> Code block evaluation complete.
> Saving file /Users/davisp/Dropbox/HMH/test.tex...
> Wrote /Users/davisp/Dropbox/HMH/test.tex
> Processing LaTeX file ./test.tex...
> pdflatex: Command not found. [3 times]
> Entering debugger...
> Mark set
> End of buffer
>
> I did verify that the shell, my default of tcsh, does show pdflatex at
> the right location, /usr/texbin/pdflatex
>

In combination, this pretty much says that org-latex-pdf-process was
called (by examining the code for org-latex-compile) and it is set to
the default value of invoking pdflatex three times (hence - probably -
the "command not found 3 times" error), so as I said the standard path.

As others have pointed out, your emacs does not know where to find
pdflatex, even though your tcsh might. If your emacs is started from a
tcsh that can find pdflatex, that would be strange; if it is started
from your desktop environment/window manager, not so much (there are
many things that could go wrong).

OTOH, if exec-path contains the directory where pdflatex resides, then
things are a bit screwy: exec-path is used by call-process, which is
used by shell-command, which is used by org-latex-compile: so pdflatex
should be found - that's a bit of a mystery.

What happens if you say M-x shell-command RET pdflatex RET?

Somebody suggested running "which pdflatex" in your shell - what does
that say?

And you say it should be in /usr/texbin - what happens if you invoke
it with an absolute path: "/usr/texbin/pdflatex" in your shell?

--
Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]