print.m: using __gnuplot_has_feature__()

Ben Abbott bpabbott at mac.com
Fri Jan 30 10:45:35 CST 2009


On Friday, January 30, 2009, at 11:19AM, "John W. Eaton" <jwe at octave.org> wrote:
>On 29-Jan-2009, Ben Abbott wrote:
>
>| I've attached a trivial patch.
>
>I checked it in.
>
>| The file produced by "epslatexstandalone" was empty for me.
>| 
>| I tried using the terminal direclty from gnuplot, but that didn't work  
>| for me either
>| 
>| > gnuplot> set term epslatex standalone
>| > Terminal type set to 'epslatex'
>| > Options are '   leveldefault monochrome blacktext \
>| >    dashed dashlength 1.0 linewidth 1.0 butt \
>| >    palfuncparam 2000,0.003 \
>| >    noheader "" 11 '
>| > gnuplot> plot sin(x) "test.eps"
>| >                      ^
>| >          epslatex terminal cannot write to standard output
>| >          util.c: Undefined error: 0
>| 
>| I'm running a recent gnuplot build from the developers cvs. Am I doing  
>| something wrong or is there a bug in gnuplot?
>
>Try
>
>  set term epslatex standalone
>  set output "test.tex"
>  plot sin(x)
>
>It works for me with Octave if I choose an output file name that ends
>in ".tex".  Otherwise, it seems to fail.  Should we detect that in
>print.m for this terminal type so we can give a better error message.
>I see errors from gnuplot since I'm starting Octave from a terminal
>window, but if yours is not associated with a shell window, then maybe
>the messages are lost?
>
>jwe

I'm also running from a terminal window. I had tried "test.eps" and got ...

         line 0: For epslatex standalone mode, you have to give the tex filename as output

When I use "test.tex" all works correctly.

I think it is a good idea to check for the file suffix. Such is done for -dtex where a .eps suffix is added if the feature "epslatex_implies_eps_filesuffix" is absent.

hmmm ... some experimentation different versions of gnuplot may be rquired before we get this right.

Ben





More information about the Octave-maintainers mailing list