# [NTG-context] gnuplot mode

Hans Hagen pragma at wxs.nl
Mon Feb 20 12:12:08 CET 2006

Mojca Miklavec wrote:
> 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
>
it's normally expanded, but with regards to passing environments, there
is hardly any expansion involved; also, when i set it from within
context, i can use the same mechanisms as with the normal  mp run;
> \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.
>
best put such defs in a separate environment, and then say \input
thatfile ; this avoids the expansion and hash duplication
>
>> 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).
>
Hans

--

-----------------------------------------------------------------