[TxMt] Re: latex pgfplots cannot find gnuplot tables

Charilaos Skiadas cskiadas at gmail.com
Tue Sep 2 09:36:58 UTC 2008


Hello Graham,
On Sep 2, 2008, at 3:31 AM, Graham Smith wrote:

>
> I have run  pdflatex --shell-escape PDFPlotTrial2.tex from terminal
> (which seemed to work as I got pages of text appearing with no obvious
> error messages) and I have upgraded to version 2 of pgf. GNUPlot was
> installed with fink and runs OK from typing gnuplot in terminal.
>
> I am now stuck, and no idea what to try next. I am pretty new to this
> so it could well be something so obvious that no one is suggesting it.
>  Can anyone help.
>
> Many thanks,
>

This is almost certainly a path issue. First off, open the file again  
in TextMate, and press "opt-cmd-," which opens up the LaTeX  
preferences. Then click on the "Verbose TeX output" option, and type  
"-shell-escape" without the quotes in the Options box. Then close the  
window and compile again. This should show you the entire log file,  
and right before the first error you should be seeing the line:   sh:  
line 1: gnuplot: command not found

If this is indeed the case, then the problem is simple. Fink changes  
the shell files that run when you start a new terminal, in order to  
place its directory there. You can see that by typing "echo $PATH" on  
a terminal window. TextMate does not get to use these path settings,  
because it inherits its shell from the login process. The consequence  
of that is that when pdflatex is executed from within Textmate, it  
really doesn't know about Fink and where to find it. There are  
numerous solutions to this problem:

First off, close TextMate completely, then go to the terminal, and  
type "open -a TextMate". This should start TextMate for you, but now  
TextMate is inheriting the path from the terminal, and this should  
recognize Fink. If you now open your file in TextMate and compile, it  
should work. Of course, this requires starting TextMate this way  
every time.

There are other solutions, each with its slight drawbacks, but let's  
first make sure the above solution correctly identifies the problem,  
and then we can take it from there. In brief, some of those solutions  
would be:

a) add a PATH variable in the TextMate general preferences, which  
echoes the path from the terminal. Pretty safe if you don't change  
that path often.
b) Create a symbolic link to gnuplot from a location that is searched  
anyway, like for instance /usr/local/bin. You can get the full path  
to gnuplot by typing "which gnuplot" on the terminal. Should work if  
gnuplot doesn't have any dependencies on other parts of fink.
c) As Alain suggested, compile gnuplot from scratch. This would place  
it in a location that is searched for anyway.


> Graham

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College







More information about the textmate mailing list