|
From: <mw...@gm...> - 2007-11-22 11:56:34
|
Thomas Sefzick <t.s...@fz...> wrote:
> i wouldn't call it a bug, it's a feature...
This comment realy made me smile :-)
> it's documented ('help set terminal pslatex': the section about 'auxfile')
>
> what happens is:
> 'set output "foo.tex"' opens the file 'foo.tex' in the current directory
> and creates a filehandle which is used for writing into it.
>
> you change the directory ('cd ..')
>
> 'plot' produces the output file, which is 'subdir/foo.tex', because
> the filehandle was already existing before you changed the directory.
>
> 'foo.tex' (which in reality is 'subdir/foo.tex') is then closed and the
> output file for writing the eps code is opened using
> 'EPSLATEX_reopen_output()'
> in 'pslatex.trm' simply by cutting off the extension from 'foo.tex',
> so the output file is now 'foo.eps'.
> and it is opened in the actual directory because gnuplot doesn't
> care for directories (why should it?) as long as you don't specify
> one (like in your 2nd example).
>
> so, 'cd' doesn't have an effect on an already specified output file,
> but it does have an effect an the auxiliary output file which is
> produced after the main output file is written.
>
> you shouldn't change directories between 'set output' and 'plot'
> commands.
Thank you for your explanations. From a technical point of view now I can understand what's going on.
My point is that this should be changed for usability reasons. In my opinion a user changing output via ``set output "foo.tex"'' expects foo.tex and foo.eps to be in the same directory. Do you disagree?
Of course I have no idea how difficult it is to change that and how many things it breaks.
Yours, Micha
> mw-u2 wrote:
> >
> > Hi,
> >
> > when using
> > set terminal epslatex
> > set output "foo.tex"
> > cd ".."
> > plot sin(x)
> >
> > there is a file foo.tex in the subdir and a file foo.eps in the top dir.
> >
> > On the contrast, when using absolut paths:
> > set terminal epslatex
> > set output "~/subdir/foo.tex"
> > cd ".."
> > plot sin(x)
> >
> > both files are inside the subdir.
> >
> > For me as a user, the first behavior is very irritating. I would call it
> a
> > bug. I think that foo.tex and foo.eps should be in the same directory.
> > cd should not have an effect on an already specified output file.
> >
> > Thank you,
> > Micha
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
|