|
From: Mojca M. <moj...@gm...> - 2008-12-18 19:52:40
|
On Thu, Dec 18, 2008 at 5:59 PM, Ethan A Merritt wrote:
> On Thursday 18 December 2008, Mojca Miklavec wrote:
>
>> > - ./configure currently installs gnuplot-lua-tikz.sty to
>> > /usr/local/share/gnuplot/<version>/ but of course TeX doesn't know to look
>> > for it there. Where is the proper place to install this style file?
>>
>> There is no proper place. (I have four TeX installations on my
>> computer and it's neary impossible to figure out where this file
>> belongs. Out of those 4 installations, one can install into HOME, into
>> texmf-local, into the main tree etc.)
>
> I think multiple TeX installations are not typical.
> Is there a uniform mechanism to add a directory to TeX's search path?
Yes. One can modify texmf.cnf on unix (or create a new file where
configuration takes precedence.
On MikTeX it's usually done with GUI.
I would not advise you to choose that way.
> Instead of guessing where are the existing directories, we could
> simply add our own to the list as part of the installation process.
> Isn't that what the kpathsea package is for?
>
>> My proposal to Peter was to create that file by default in every
>> folder where one wants to use it. It might make sense to install it
>> globally, but since the terminal changes over time, it might be more
>> safe to have a copy of the style wherever we are creating the plot,
>> else older plots are likely to get broken when one would use a
>> different sty file.
>
> Ugh. That's a problem. Are you saying that if you have older and
> newer plots in the same directory, they will conflict with each other?
The style file should change in some incompatible ways in the near
future if TikZ terminal would be modified to support ConTeXt. But this
would change only once.
I have no idea what plans Peter (the author) has with the terminal,
but my estimate would be that lifetime of compatible changes should be
around one or two years for example. Note that gnuplot syntax changes
as well, so one needs to adapt the scripts as well.
If one has a few ancient and a few newer plots in the same folder -
yes, it might be a problem, but one doesn't update gnuplot on a daily
basis and usually a new project goes into a new folder.
If files of all ages really need to coexist in the same folder, one
can just as well regenerate the old plots. I'll stop with phylosophy
now.
In short: in my opinion it's much better to create the style in every
folder. Not only because the style file *might* change (usually it
should not), but also because one can transfer the files and they will
still work on any computer without having gnuplot & that particular
style file installed.
> If so, then I think we must provide a versioning mechanism:
> \usepackage{gnuplot-tikz-01}
> Either that, or we must be clever enough to get it right the first
> time and not introduce incompatible changes later on.
Trying to be clever enough in the first try makes sense in either case.
>> It probably makes no sense to put that file anywhere. TeX does not
>> find it under /usr/local/share/gnuplot and I would not find it either.
>> Since the terminal is able to generate that file on the fly, I would
>> not bother about trying to install it anywhere.
>
> Sorry, that doesn't follow. If you save the plots for later use with
> a TeX document, you still need to have TeX able to find the appropriate
> *.sty file even if gnuplot and the original lua code is no longer around.
> They might be on a different machine or a different version.
Yes, but I would store the sty file in the same folder as the
resulting plot. That basically only means creating two files (one for
header and one for plot) instead of a single file with header + plot.
If one installs the style file in some weird place and then reinstalls
the whole system & forgets to install that file & loses the gnuplot
binary that's a much bigger chance for problems than having two files
generated by incompatible binaries in the same folder.
You can try
set term lua createstyle size 10cm,7cm
set output 'sin.tex'
plot sin(x)
and it will generate two files: the actual plot and the style file. My
idea was to "createstyle" by default.
Mojca
|