I don't know if this is still relevant or not but I've been reading
the mailing list and there was a comment there about difficulties with
the help facility, especially on newer versions of Windows. The
problem seemed to be that the help documentation is available in pdf
or html format but there is no way to open them automatically from
gnuplot.
It happens that Windows does have a facility to do such a thing.
Executing "start WHATEVER.FILE" at the command line will open
WHATEVER.FILE with the default application assigned to that file type.
For example, "start help.pdf" will open the default pdf viewer
(probably A***e Acrobat for most people), while "start help.html"
will start the default browser. Opening web sites is also possible but
you may need to repeat the address (that is, write it twice).
This capability can also be exploited programmatically, at least I did
exploit it in one of my perl programs:
if ($settings{auto_launch_pdf}) {
if ($^O =~ /MSWin/) {
system("perl -e \"exec qq(start ".$id.".pdf)\"");
} else {
system("perl -e 'exec qq(evince $id.pdf)'");
}
}
( Looks ugly, braindead etc. but this is a working way of displaying a
document from a GUI application in a non-blocking way.)
If you can reach out to the shell and use it to run a process from C,
then you can use this trick too.
I hope that this helps:
Péter Juhász
> Dear gnuplot developers,
>
> I don't know if this is still relevant or not but I've been reading
> the mailing list and there was a comment there about difficulties with
> the help facility, especially on newer versions of Windows. The
> problem seemed to be that the help documentation is available in pdf
> or html format but there is no way to open them automatically from
> gnuplot.
>
> It happens that Windows does have a facility to do such a thing.
> Executing "start WHATEVER.FILE" at the command line will open
> WHATEVER.FILE with the default application assigned to that file type.
> For example, "start help.pdf" will open the default pdf viewer
> (probably A***e Acrobat for most people), while "start help.html"
> will start the default browser. Opening web sites is also possible but
> you may need to repeat the address (that is, write it twice).
Can you embed a specific hyperlink target in the request, so that the
pdf file opens up pointing to the appropriate section of text?
I don't know that. (AAARGH)
And I can't test now as I don't have a windows machine nearby, but I
suspect it's not possible with this method.
But even if there was a way to open a pdf at an arbitrary
(hyperlinked) position, it would be different for every pdf viewer the
user may or may not have. And it is the very point of this method is
that you use the existing windows file associations to open the file
instead of making assumptions about the pdf viewer.
On the other hand, it seems possible to include hyperlink targets in a
html url.
Gnuplot documentation exists also in html form, doesn't it? And you
can assume that every user has at least one browser on their computer
- which may not be true for pdf viewers.
So invoking an external browser to view html help may seem like a
cheap solution, but it works and it doesn't need much effort to
implement.
Péter Juhász