|
From: Thomas S. <t.s...@fz...> - 2007-11-19 16:09:59
|
i wouldn't call it a bug, it's a feature...
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.
mw-u2 wrote:
>=20
> Hi,
>=20
> when using=20
> set terminal epslatex
> set output "foo.tex"
> cd ".."
> plot sin(x)
>=20
> there is a file foo.tex in the subdir and a file foo.eps in the top dir.
>=20
> On the contrast, when using absolut paths:
> set terminal epslatex
> set output "~/subdir/foo.tex"
> cd ".."
> plot sin(x)
>=20
> both files are inside the subdir.
>=20
> 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.
>=20
> Thank you,
> Micha
> --=20
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!=20
> Ideal f=C3=BCr Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>=20
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>=20
>=20
--=20
View this message in context: http://www.nabble.com/epslatex-outputs-into-d=
ifferent-directories-sometimes-tf4836648.html#a13839359
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|