On Tue, Mar 25, 2008 at 3:28 PM, Morgan Brassel wrote:
> Hi everyone, Hi Mojca,
>
>  I finally compiled gnuplot with support for the context terminal. It was
>  really easy in the end, I should not have been afraid...
>
>  I have two questions however (see example below):
>
>  * Does the option 'solid' work with the context terminal? I still get
>  dashed lines here...

Ok, that's part of lack of documentation on my part :)

help term context says:

----
 In non-standalone (`input`) graphic only parameters `size` to select
graphic size,
 `textscale` to scale all the labels for a factor <scale>
 and `pointswithtex`/`pointswithmetapost` make sense, the rest is
silently ignored
 and should be configured in the .tex file which inputs the graphic.
----

You can use

\setupGNUPLOTterminal
  [context]
  [dashed=no,
   textscale=0.9]

or similar. The reason why I have implemented it that way is:
- you can reuse the same graphics by only turning that option on and
off in the terminal, you don't need to rerun gnuplot
- it's clumsy to provide explicit options to the terminal anyway,
using an interface is easier
- the option solid is only respected when you say 'standalone'

>  * ' and " quotes do not give the same result when UTF-8 character are
>  involved. Is it wanted?

No. It's the same problem that I have mentioned last time. If you take a look at
   filename-gnuplot-1.plt
you will see:

set ylabel "h\dochar {233}llo"
set xlabel 'h\dochar {233}llo'

The second case gets literally to the output file, but then ConTeXt
interprets it OK again. In the first case backslash is lost, and you
get nonsense. This can be solved by using \detokenize as descriibed
last time, but then again - it would be best if Taco or Hans or
someone else had an idea of how to prevent that weird expansion inside
\startGNUPLOTscript. I always use simple quotes for no particular
reason (or maybe because I sometimes want to use \bf or other commands
with backslash).

Mojca


>  \enableregime[utf]
>  \usemodule[gnuplot]
>  \setupcolors[state=start]
>  \setupGNUPLOT[options=color solid]
>
>  \startGNUPLOTscript[sin]
>  set ylabel "héllo"
>  set xlabel 'héllo'
>  plot sin(x), sin(2*x)
>
>
> \stopGNUPLOTscript
>
>  \starttext
>  \useGNUPLOTgraphic[sin]
>  \stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to