# [NTG-context] gnuplot mode

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sun Feb 19 14:08:59 CET 2006

On 2/18/06, Hans Hagen wrote:
> Mojca Miklavec wrote:
> > It's very easy to fix gnuplot, so that it will be able to place
> > additional commands inside "verbatimtex" section. If anyone needs
> > that, I can add it and submit it to patches, but I can only provide
> > you windows binaries after that. (I tried to compile it on three linux
> > boxes without success, although it should be trivial.)
> >
> that option would make it possibel to pass the mp environment to
> gnuplot/tex and solve the lucida problems mentioned; it means that one
> can have her/his text in sycn with the graphic

Hmmm ... I tried to copy the implementation from epslatex terminal, so
that one was already able to say
but I figured out that after it was run five or ten times, it crashed.
After that I realized that the epslatex terminal crashes too, but I
didn't figure out yet how to debug gnuplot.
If anyone has more experince with allocs, feel free to fix my source.

The problem with verbatim ... etex is that you somehow "preprocess it"
or I don't know what you do with it. So if one writes
\def\GnuplotPoint#1{...} into verbatimtex it results in something like
\def \GnuplotPoint ##1 {}, of you write \let\GnuplotPoint\relax, it
results in \let \relax. \input works because it has some luck that it
doesn't get modified during preprocessing.

> set terminal mp       verbatimtex   "..."
> set terminal context environment "..."

I already did that, but as I mentioned above - it crashed ...

But in any case: global metapost environment works perfectly!!!
(header would still be useful, but for graphics for inclusion the
setting can be done in the main document and for standalone graphics
one can temporary edit it manually, but I'll try to fix).

Mojca