Re: [NTG-context] gnuplot module broken with latest 2020-07-13 16:31

2020-07-13 Thread Adam Reviczky
Many thanks for the quick fix Hans,

I have tried the lmtx inclusions as well, very nice indeed (and added it to
the wiki)!

Kind Regards,
Adam Reviczky

On Mon, Jul 13, 2020 at 10:38 PM Hans Hagen  wrote:

> On 7/13/2020 8:53 PM, Adam Reviczky wrote:
> > Hi,
> >
> > Using the minimal example from the contextgarden for gnuplot
> > (https://wiki.contextgarden.net/Gnuplot) I am getting the following
> > error message:
> >
> > This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
> >   system commands enabled.
> > open source > level 1, order 1, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
> > system  >
> > system  > ConTeXt  ver: 2020.07.13 16:23 MKIV  fmt: 2020.7.13
> >   int: english/english
> > system  >
> > system  > 'cont-new.mkiv' loaded
> > open source > level 2, order 2, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
> > system  > beware: some patches loaded from cont-new.mkiv
> > close source> level 2, order 2, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
> > system  > files > jobname 'mwe', input './mwe', result 'mwe'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name '/tmp/4/mwe.tex'
> > modules > 'gnuplot' is loaded
> > open source > level 3, order 4, name
> > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
> > loading > Gnuplot module
> > open source > level 4, order 5, name
> > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> > close source> level 4, order 5, name
> > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> > close source> level 3, order 5, name
> > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
> >
> > lua error   > lua error on line 4 in file /tmp/4/mwe.tex:
> >
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call
> > a nil value (upvalue 'gettoken')
> > stack traceback:
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue
> 'pickup'
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function
> > 
> > (...tail calls...)
> >
> >   1 \usemodule[gnuplot]
> >   2
> >   3 % write a script for gnuplot
> >   4 >>  \startGNUPLOTscript[sin]
> >   5plot sin(x)
> >   6 \stopGNUPLOTscript
> >   7
> >   8 % include the resulting graphic into the document
> >   9 \useGNUPLOTgraphic[sin]
> > 10
> >
> > mtx-context | fatal error: return code: 256
> >
> > Does the gnuplot module need adjustments?
> No, i messed up something ... will be fixed tomorrow
>
> Do you have lmtx installed? It has nicer gnuplot support:
>
> m-gnuplot-demo.gp :
>
> 
> set format xy "$%g$"
>
> set title  'This is a plot of $y=\\sin(x)$'
> set xlabel 'This is the $x$ axis'
> set ylabel 'This is the $y$ axis'
>
> plot [0:6.28] [0:1] sin(x)
> 
>
> Can be included with:
>
> \starttext
>
>  \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]
>
>  \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]
>
> \stoptext
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot module broken with latest 2020-07-13 16:31

2020-07-13 Thread Hans Hagen

On 7/13/2020 8:53 PM, Adam Reviczky wrote:

Hi,

Using the minimal example from the contextgarden for gnuplot 
(https://wiki.contextgarden.net/Gnuplot) I am getting the following 
error message:


This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
  system commands enabled.
open source     > level 1, order 1, name 
'/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'

system          >
system          > ConTeXt  ver: 2020.07.13 16:23 MKIV  fmt: 2020.7.13 
  int: english/english

system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 
'/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'

system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'

system          > files > jobname 'mwe', input './mwe', result 'mwe'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name '/tmp/4/mwe.tex'
modules         > 'gnuplot' is loaded
open source     > level 3, order 4, name 
'/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'

loading         > Gnuplot module
open source     > level 4, order 5, name 
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 4, order 5, name 
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 3, order 5, name 
'/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'


lua error       > lua error on line 4 in file /tmp/4/mwe.tex:

/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call 
a nil value (upvalue 'gettoken')

stack traceback:
/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue 'pickup'
/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function 


(...tail calls...)

  1     \usemodule[gnuplot]
  2
  3     % write a script for gnuplot
  4 >>  \startGNUPLOTscript[sin]
  5        plot sin(x)
  6     \stopGNUPLOTscript
  7
  8     % include the resulting graphic into the document
  9     \useGNUPLOTgraphic[sin]
10

mtx-context     | fatal error: return code: 256

Does the gnuplot module need adjustments?

No, i messed up something ... will be fixed tomorrow

Do you have lmtx installed? It has nicer gnuplot support:

m-gnuplot-demo.gp :


set format xy "$%g$"

set title  'This is a plot of $y=\\sin(x)$'
set xlabel 'This is the $x$ axis'
set ylabel 'This is the $y$ axis'

plot [0:6.28] [0:1] sin(x)


Can be included with:

\starttext

\externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]

\externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot-module broken under lmtx

2019-04-10 Thread Hans Hagen

On 4/10/2019 4:34 PM, Christian Prim wrote:

Hi

It's little off-topic as there are officially no modules included in 
lmtx. But when I used the modules from a mkiv-installation, there was 
little to no problem. But with the gnuplot-module I can't fix the error 
myself.


not off-topic .. as modules should also work ok in lmtx

fixed in next beta (probably tommorrow an upload)

Hans


MWE:
\usemodule[gnuplot]
\startGNUPLOTscript[sin]
    plot sin(x)
\stopGNUPLOTscript

\starttext
\placefigure[here]{Sine Test}{\useGNUPLOTgraphic[sin]}
\stoptext

Under mkiv everything is fine. mkiv creates a 
file gnuplot-gnuplot-1.plt, sends this file to gnuplot and uses the 
output gnuplot-gnuplot-1-ctx.tex.


Under lmtx only the files gnuplot-gnuplot-1.tmp 
and gnuplot-gnuplot-inclusions.tmp are created. When I copy the correct 
.plt file from a mkiv-run, no gnuplot-gnuplot-1-ctx.tex is generated. If 
I copy the correct -ctx.tex file from a mkiv-run, I still get an error.


Relevant part from the logfile of a working mkiv-run:
modules         > 'gnuplot' is loaded
open source     > level 3, order 4, name 
'/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv'

loading         > Gnuplot module
open source     > level 4, order 5, name 
'/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 4, order 5, name 
'/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 3, order 5, name 
'/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv'

fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
open source     > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex'
close source    > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex'
metapost        > initializing instance 'metafun:1' using format 
'metafun' and method 'default'
metapost        > loading 'metafun' as 
'/home/user/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' 
using method 'default'

metapost        > initializing number mode 'scaled'
floatblocks     > '1' placed (here)

from a lmtx-run (no .plt-file and -ctx.tex given):

modules         > 'gnuplot' is loaded
open source     > level 3, order 4, name 
'/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv'

loading         > Gnuplot module
open source     > level 4, order 5, name 
'/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 4, order 5, name 
'/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 3, order 5, name 
'/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv'

fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
mtxrun          |
mtxrun          | executing: gnuplot gnuplot-gnuplot-1.plt
mtxrun          |
mtxrun          |
/home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call 
a nil value (field 'exec')

aaa             > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt
floatblocks     > no block given
floatblocks     > '1' placed (here)

lmtx with given .plt and -ctx.tex-file:

modules         > 'gnuplot' is loaded
open source     > level 3, order 4, name 
'/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv'

loading         > Gnuplot module
open source     > level 4, order 5, name 
'/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 4, order 5, name 
'/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 3, order 5, name 
'/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv'

fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
mtxrun          |
mtxrun          | executing: gnuplot gnuplot-gnuplot-1.plt
mtxrun          |
mtxrun          |
/home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call 
a nil value (field 'exec')

aaa             > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt
open source     > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex'
close source    > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex'
metapost        > initializing instance 'metafun:1' using format 
'metafun' and method 'default'
metapost        > loading 'metafun' as 
'/home/user/lmtx/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' 
using method 'default'

metapost        > initializing number mode 'scaled'
floatblocks     > '1' placed (here)

tex error       > tex error on line 1 in file gnuplot-gnuplot-1-ctx.tex: 
! Undefined control sequence


 \GNUPLOTfile
              -ctx.tex
\fourthoffivearguments #1#2#3#4#5->#4

 set output "\@@GNUPLOTresult
                              "


Re: [NTG-context] gnuplot module broken

2013-04-19 Thread Mojca Miklavec
Dear Hans,

please consider the following example in MKII:

\setupcolors[state=start]

\starttext

\startMPextensions
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPextensions

\startuseMPgraphic{bla}
fill fullcircle scaled a withcolor b;
\stopuseMPgraphic

\def\abc{3cm}\color[blue]{\useMPgraphic{bla}}

% Nice small black circle
\def\abc{1cm}\useMPgraphic{bla}

\stoptext


I still don't know how to reproduce this in MKIV. I tried with
MPdefinitions as you suggested, but this only works the first time
when it is used. The following example creates two equal circles
instead of two different ones:


\starttext

\startMPdefinitions
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPdefinitions

\startuseMPgraphic{bla}
fill fullcircle scaled a withcolor b;
\stopuseMPgraphic

\def\abc{3cm}\color[blue]{\useMPgraphic{bla}}

% I want a black 1cm circle here
\def\abc{1cm}\useMPgraphic{bla}

\stoptext


Unless MKII is more powerful than MKIV: how can I achieve the same
functionality in MKIV as I did in MKII?

Thank you,
Mojca


On Tue, Feb 19, 2013 at 10:36 AM, Hans Hagen wrote:
 On 2/19/2013 1:37 AM, Mojca Miklavec wrote:

 On Mon, Feb 18, 2013 at 5:40 PM, Marco Patzer wrote:

 Hi Mojca et al.

 todays beta broke the gnuplot module. This is probably due to the
 changes in the MP inclusion mechanism.

 \usemodule [gnuplot]
 \starttext
 \stoptext

 Here's an almost minimal example:

 \def\abc{1cm}

 \startMPextensions
 a := \abc;
 color b;
 b := \MPcolor{currentcolor};
 \stopMPextensions

 \def\abc{3cm}

 \starttext
 \startcolor[blue]
 \startMPcode
 fill fullcircle scaled a withcolor b;
 \stopMPcode
 \stopcolor
 \stoptext

 The old ConTeXt draws a blue circle with diameter 3cm and the new
 ConTeXt draws a black circle with diameter 1cm. Which one is right?
  From a recent message by Hans:

 - add mp functionality (immediate expansion)


 It seems that ConTeXt now parses everything inside MPextensions
 earlier than it did before and I don't have the slightest idea how to
 account for this in the module without a major rewrite. In case that
 Hans wants to keep the new functionality, I either need [quite some]
 help with the module or I'll simply stick to TeX Live 2012 for the
 foreseeable future ;)


 For the (not texlive) module use:

 \defineMPinstance[gnuplot]
   [format=metafun,
extensions=yes,
initializations=yes,
method=double]

 \startMPdefinitions[gnuplot] ...

 and then use the gnuplot instance. This not only isolates the code, but also
 gives you floats. It also means that if someone crashes the gnuplot
 instance, the rest still keeps running.

 Definitions are per instance and are delayed i.e. passed via the tex end
 when they get expanded.

 The reason for extensions being immediate (at least for now) is that it was
 more easy to implement as extensions meant for mp extensions and can be for
 all instances of specific (sets) of instances.

 Sorry for the changes but as we have multiple instances, scale vs double and
 maybe more coming it's probably worth the trouble.

 Hans
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot module broken

2013-04-19 Thread Marco Patzer
On 2013–04–19 Mojca Miklavec wrote:

 Dear Hans,
 
 please consider the following example in MKII:
 
 \setupcolors[state=start]
 
 \starttext
 
 \startMPextensions
 a := \abc;
 color b;
 b := \MPcolor{currentcolor};
 \stopMPextensions
 
 \startuseMPgraphic{bla}
 fill fullcircle scaled a withcolor b;
 \stopuseMPgraphic
 
 \def\abc{3cm}\color[blue]{\useMPgraphic{bla}}
 
 % Nice small black circle
 \def\abc{1cm}\useMPgraphic{bla}
 
 \stoptext
 
 
 I still don't know how to reproduce this in MKIV.

Use \startMPinitializations instead of \startMPextensions, it's
global to all MP instances, though.

Marco


signature.asc
Description: Digital signature
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot module broken

2013-02-19 Thread Hans Hagen

On 2/19/2013 1:37 AM, Mojca Miklavec wrote:

On Mon, Feb 18, 2013 at 5:40 PM, Marco Patzer wrote:

Hi Mojca et al.

todays beta broke the gnuplot module. This is probably due to the
changes in the MP inclusion mechanism.

\usemodule [gnuplot]
\starttext
\stoptext


Here's an almost minimal example:

\def\abc{1cm}

\startMPextensions
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPextensions

\def\abc{3cm}

\starttext
\startcolor[blue]
\startMPcode
fill fullcircle scaled a withcolor b;
\stopMPcode
\stopcolor
\stoptext

The old ConTeXt draws a blue circle with diameter 3cm and the new
ConTeXt draws a black circle with diameter 1cm. Which one is right?
 From a recent message by Hans:


- add mp functionality (immediate expansion)


It seems that ConTeXt now parses everything inside MPextensions
earlier than it did before and I don't have the slightest idea how to
account for this in the module without a major rewrite. In case that
Hans wants to keep the new functionality, I either need [quite some]
help with the module or I'll simply stick to TeX Live 2012 for the
foreseeable future ;)


For the (not texlive) module use:

\defineMPinstance[gnuplot]
  [format=metafun,
   extensions=yes,
   initializations=yes,
   method=double]

\startMPdefinitions[gnuplot] ...

and then use the gnuplot instance. This not only isolates the code, but 
also gives you floats. It also means that if someone crashes the gnuplot 
instance, the rest still keeps running.


Definitions are per instance and are delayed i.e. passed via the tex end 
when they get expanded.


The reason for extensions being immediate (at least for now) is that it 
was more easy to implement as extensions meant for mp extensions and can 
be for all instances of specific (sets) of instances.


Sorry for the changes but as we have multiple instances, scale vs double 
and maybe more coming it's probably worth the trouble.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot module broken

2013-02-18 Thread Mojca Miklavec
On Mon, Feb 18, 2013 at 5:40 PM, Marco Patzer wrote:
 Hi Mojca et al.

 todays beta broke the gnuplot module. This is probably due to the
 changes in the MP inclusion mechanism.

 \usemodule [gnuplot]
 \starttext
 \stoptext

Here's an almost minimal example:

\def\abc{1cm}

\startMPextensions
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPextensions

\def\abc{3cm}

\starttext
\startcolor[blue]
\startMPcode
fill fullcircle scaled a withcolor b;
\stopMPcode
\stopcolor
\stoptext

The old ConTeXt draws a blue circle with diameter 3cm and the new
ConTeXt draws a black circle with diameter 1cm. Which one is right?
From a recent message by Hans:

 - add mp functionality (immediate expansion)

It seems that ConTeXt now parses everything inside MPextensions
earlier than it did before and I don't have the slightest idea how to
account for this in the module without a major rewrite. In case that
Hans wants to keep the new functionality, I either need [quite some]
help with the module or I'll simply stick to TeX Live 2012 for the
foreseeable future ;)

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot with ConTeXt standalone

2012-06-06 Thread Mojca Miklavec
On Tue, Jun 5, 2012 at 5:00 PM, Xiao-Yong Jin wrote:
 Hi,

 I just tried out the ConTeXt standalone and found out it did not work with
 my gnuplot files.  I have been using texlive 2011, which works fine.  With
 the context command from standalone, the following error occurs,

 - Error begins -
 ! Undefined control sequence.

 system           tex  error on line 4 in file 
 /Users/jin/pkgs/ConTeXt/tex/texmf-context/tex/context/base/cont-yes.mkiv: 
 Undefined control sequence ...

  1     %D \module
  2     %D   [       file=cont-yes,
  3     %D        version=2012.06.01,
  4   %D          title=\CONTEXT\ Miscellaneous Macros,
  5     %D       subtitle=Startup Stub,
  6     %D         author=Hans Hagen,
  7     %D           date=\currentdate,
  8     %D      copyright={PRAGMA ADE \ \CONTEXT\ Development Team}]
  9     %C
 10     %C This module is part of the \CONTEXT\ macro||package and is
 11     %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 12     %C details.
 13
 14     % At some point I will reconsider the \starttext .. \stoptext


 \startGNUPLOTpage -\begingroup \obeyMPlines
                                             \dostartGNUPLOTpage
 l.4 \startGNUPLOTpage
 - Error ends -

 I am not really sure which line is the error.  Please excuse me if I pasted 
 too much.
 The version of context from the standalone is

 ConTeXt  ver: 2012.06.05 09:16 MKIV  fmt: 2012.6.5  int: english/english

 As I have mentioned, the same file works fine with context in texlive 2011, 
 which has
 version

 ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2012.4.5  int: english/english

 It looks like only two weeks difference.

If you do your calculations modulo 356 days, yes ;)

I need to wait for a huge macports update to finish (needs
recompilation of many big packages, including octave etc.) before I
will be able to use gnuplot again, but there is a fair chance that
either there is no gnuplot module installed in your standalone ConTeXt
installation (an extra --modules=gnuplot switch needed if I'm not
mistaken) or that something broke with yesterday's massive changes
(that 356 days joke wasn't meant seriously).

Please check if you have

/Users/jin/pkgs/ConTeXt/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.tex
(kpsewhich t-gnuplot.tex)
on your system.

I'll take a look as soon as I have a working gnuplot binary back.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot with ConTeXt standalone

2012-06-06 Thread Hans Hagen

On 5-6-2012 17:00, Xiao-Yong Jin wrote:


\startGNUPLOTpage -\begingroup \obeyMPlines


there is no \obeyMPlines any longer so you probably mix up an new 
context and an old gnuplot module


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot with ConTeXt standalone

2012-06-06 Thread Mojca Miklavec
On Wed, Jun 6, 2012 at 9:49 AM, Hans Hagen wrote:
 On 5-6-2012 17:00, Xiao-Yong Jin wrote:

 \startGNUPLOTpage -\begingroup \obeyMPlines


 there is no \obeyMPlines any longer so you probably mix up an new context
 and an old gnuplot module

Oh, in some other part of the module I have
%\obeyMPlines % - no longer a problem
and it seems that I forgot to remove that for full page plots.

Thank you both for reporting the problem and spotting the solution right away.

I will test later and update the module.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot with ConTeXt standalone

2012-06-06 Thread Mojca Miklavec
On Wed, Jun 6, 2012 at 9:47 AM, Mojca Miklavec wrote:

 Please check if you have
    
 /Users/jin/pkgs/ConTeXt/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.tex
    (kpsewhich t-gnuplot.tex)
 on your system.

Please ignore my previous remarks and please try to remove
\obeyMPlines
from t-gnuplot.tex instead to see if that solves the problem.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot with ConTeXt standalone

2012-06-06 Thread Xiao-Yong Jin
On Jun 6, 2012, at 5:02 PM, Mojca Miklavec wrote:

 Please ignore my previous remarks and please try to remove
\obeyMPlines
 from t-gnuplot.tex instead to see if that solves the problem.

That is exactly the culprit.
Thank you all.  I understand how to read the error output, now.
And reminded myself that this is the year 2012.

Xiaoyong

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot with ConTeXt standalone

2012-06-06 Thread Mojca Miklavec
On Wed, Jun 6, 2012 at 11:30 AM, Xiao-Yong Jin wrote:
 On Jun 6, 2012, at 5:02 PM, Mojca Miklavec wrote:

 Please ignore my previous remarks and please try to remove
    \obeyMPlines
 from t-gnuplot.tex instead to see if that solves the problem.

 That is exactly the culprit.
 Thank you all.  I understand how to read the error output, now.

I didn't read careful enough. I thought that \startGNUPLOTpage was undefined.

Anyway, I updated the module in distribution  in TL (the latter will
be updated in a few hours).

Thanks again to both,
Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot not working

2012-04-12 Thread Mojca Miklavec
On Wed, Apr 11, 2012 at 14:07, Mojca Miklavec wrote:

 Oh, indeed. It seems that a recent change in ConTeXt core broke
 functionality of the module (the version I tested on earlier worked
 fine).

Can you please update and try again?

Wolfgang suggested to replace \setcounter with \newcounter.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot not working

2012-04-12 Thread John Devereux
Mojca Miklavec mojca.miklavec.li...@gmail.com writes:

 On Wed, Apr 11, 2012 at 14:07, Mojca Miklavec wrote:

 Oh, indeed. It seems that a recent change in ConTeXt core broke
 functionality of the module (the version I tested on earlier worked
 fine).

 Can you please update and try again?

 Wolfgang suggested to replace \setcounter with \newcounter.

Hi Mojca,

That seems to work for me - thanks!


-- 

John Devereux
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot not working

2012-04-12 Thread Marco
On 2012-04-12 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote:

  Oh, indeed. It seems that a recent change in ConTeXt core broke
  functionality of the module (the version I tested on earlier worked
  fine).
 
 Can you please update and try again?

Works perfectly. Thanks for the fix.

Marco


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot not working

2012-04-11 Thread Mojca Miklavec
On Wed, Apr 11, 2012 at 11:00, John Devereux wrote:

 Hi all,

 Is there a problem with gnuplot? I get an error with the minimal example
 on the wiki. I think the generated .plt file has an error; it works if I
 manually delete the fontscale 1 bit and run context on
 test-gnuplot-1.tmp.

 Using latest beta, tried with current official gnuplot as well as
 mojca-patched version.

Which version of Gnuplot did you use / how did you compile it / with
which sources? If you used the one from modules.contextgarden.net for
windows, that was a bad idea (and my bad that I forgot to remove it
from there) since I haven't updated it for a while.

I changed textscale to fontscale on gnuplot developers' request in
February 2011.

Gnuplot 4.6.0 already includes the context terminal, so it might be
the best idea to try with official gnuplot binary (or sources).

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot not working

2012-04-11 Thread Marco
On 2012-04-11 John Devereux j...@devereux.me.uk wrote:

 Is there a  problem with gnuplot? I get an  error with the minimal
 example on the wiki.

\usemodule[gnuplot]
\starttext
\startGNUPLOTscript[sin]
   plot sin(x)
\stopGNUPLOTscript
\useGNUPLOTgraphic[sin]
\stoptext

Confirmed with context version: 2012.04.10 19:46
and gnuplot 4.7 patchlevel 0.

Marco


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot not working

2012-04-11 Thread John Devereux
Mojca Miklavec mojca.miklavec.li...@gmail.com writes:

 On Wed, Apr 11, 2012 at 11:00, John Devereux wrote:

 Hi all,

 Is there a problem with gnuplot? I get an error with the minimal example
 on the wiki. I think the generated .plt file has an error; it works if I
 manually delete the fontscale 1 bit and run context on
 test-gnuplot-1.tmp.

 Using latest beta, tried with current official gnuplot as well as
 mojca-patched version.

 Which version of Gnuplot did you use / how did you compile it / with
 which sources? If you used the one from modules.contextgarden.net for
 windows, that was a bad idea (and my bad that I forgot to remove it
 from there) since I haven't updated it for a while.

 I changed textscale to fontscale on gnuplot developers' request in
 February 2011.

 Gnuplot 4.6.0 already includes the context terminal, so it might be
 the best idea to try with official gnuplot binary (or sources).

Hi Mojca,

Sorry, I should have said I am running on linux. I compiled the official
gnuplot 4.6

jd@devereux:~$ gnuplot

G N U P L O T
Version 4.6 patchlevel 0last modified 2012-03-04 
Build System: Linux i686

Copyright (C) 1986-1993, 1998, 2004, 2007-2012
Thomas Williams, Colin Kelley and many others

gnuplot home: http://www.gnuplot.info
faq, bugs, etc:   type help FAQ
immediate help:   type help  (plot window: hit 'h')


It does seem to be running this version. I found the generated tex file:


==

% Written by ConTeXt terminal for GNUPLOT on: 2012-04-11 11:31 BST
% GNUPLOT version: 4.6.0, terminal version: 1.0.0 (2011-11-05)
% See also http://wiki.contextgarden.net/Gnuplot
%
\startGNUPLOTgraphic[1]
string gnuplotversion; gnuplotversion := 4.6;
string termversion;termversion:= 1.0;
% scaling factor, width and height of the figure
a := 1cm; w := 12.700a; h := 7.620a; % (5in, 3in)
% temporary variable for storing the path and images
save p, img, ima; path p; string img, ima;
% -
% Different initialisations
% -
% for additional user-defined settings
gp_setup_before;
% text scaling factor for the whole figure
gp_scale_text := 1;
% pointsize scaling factor
gp_set_pointsize(1);
% linewidth scaling factor for individual lines
gp_set_linewidth(1);
% for additional user-defined settings
gp_setup_after;
% -
gp_set_linetype(-2);
p := (1.345a,0.844a)--(1.468a,0.844a);
gp_draw(p);
p := (12.078a,0.844a)--(11.955a,0.844a);
gp_draw(p);
gp_put_text((1.138a, 0.844a), align(right), \sometxt[gp]{-1});
p := (1.345a,1.480a)--(1.468a,1.480a);
gp_draw(p);
p := (12.078a,1.480a)--(11.955a,1.480a);
gp_draw(p);
gp_put_text((1.138a, 1.480a), align(right), \sometxt[gp]{-0.8});
p := (1.345a,2.116a)--(1.468a,2.116a);
gp_draw(p);
p := (12.078a,2.116a)--(11.955a,2.116a);
gp_draw(p);
gp_put_text((1.138a, 2.116a), align(right), \sometxt[gp]{-0.6});
p := (1.345a,2.752a)--(1.468a,2.752a);
gp_draw(p);
p := (12.078a,2.752a)--(11.955a,2.752a);
gp_draw(p);
gp_put_text((1.138a, 2.752a), align(right), \sometxt[gp]{-0.4});
p := (1.345a,3.388a)--(1.468a,3.388a);
gp_draw(p);
p := (12.078a,3.388a)--(11.955a,3.388a);
gp_draw(p);
gp_put_text((1.138a, 3.388a), align(right), \sometxt[gp]{-0.2});
p := (1.345a,4.024a)--(1.468a,4.024a);
gp_draw(p);
p := (12.078a,4.024a)--(11.955a,4.024a);
gp_draw(p);
gp_put_text((1.138a, 4.024a), align(right), \sometxt[gp]{0});
p := (1.345a,4.661a)--(1.468a,4.661a);
gp_draw(p);
p := (12.078a,4.661a)--(11.955a,4.661a);
gp_draw(p);
gp_put_text((1.138a, 4.661a), align(right), \sometxt[gp]{0.2});
p := (1.345a,5.297a)--(1.468a,5.297a);
gp_draw(p);
p := (12.078a,5.297a)--(11.955a,5.297a);
gp_draw(p);
gp_put_text((1.138a, 5.297a), align(right), \sometxt[gp]{0.4});
p := (1.345a,5.933a)--(1.468a,5.933a);
gp_draw(p);
p := (12.078a,5.933a)--(11.955a,5.933a);
gp_draw(p);
gp_put_text((1.138a, 5.933a), align(right), \sometxt[gp]{0.6});
p := (1.345a,6.569a)--(1.468a,6.569a);
gp_draw(p);
p := (12.078a,6.569a)--(11.955a,6.569a);
gp_draw(p);
gp_put_text((1.138a, 6.569a), align(right), \sometxt[gp]{0.8});
p := (1.345a,7.205a)--(1.468a,7.205a);
gp_draw(p);
p := (12.078a,7.205a)--(11.955a,7.205a);
gp_draw(p);
gp_put_text((1.138a, 7.205a), align(right), \sometxt[gp]{1});
p := (1.345a,0.844a)--(1.345a,0.967a);
gp_draw(p);
p := (1.345a,7.205a)--(1.345a,7.082a);
gp_draw(p);
gp_put_text((1.345a, 0.422a), align(center), \sometxt[gp]{-10});
p := (4.028a,0.844a)--(4.028a,0.967a);
gp_draw(p);
p := (4.028a,7.205a)--(4.028a,7.082a);
gp_draw(p);
gp_put_text((4.028a, 0.422a), align(center), \sometxt[gp]{-5});
p := (6.711a,0.844a)--(6.711a,0.967a);
gp_draw(p);
p := (6.711a,7.205a)--(6.711a,7.082a);
gp_draw(p);
gp_put_text((6.711a, 0.422a), align(center), \sometxt[gp]{0});
p := (9.395a,0.844a)--(9.395a,0.967a);
gp_draw(p);
p := (9.395a,7.205a)--(9.395a,7.082a);
gp_draw(p);
gp_put_text((9.395a, 0.422a), align(center), \sometxt[gp]{5});
p 

Re: [NTG-context] gnuplot not working

2012-04-11 Thread Mojca Miklavec
On Wed, Apr 11, 2012 at 11:00, John Devereux wrote:

 Hi all,

 Is there a problem with gnuplot? I get an error with the minimal example
 on the wiki.

 text.tex:

 \usemodule[gnuplot]

 % write a script for gnuplot
 \startGNUPLOTscript[sin]
   plot sin(x)
 \stopGNUPLOTscript

 % include the resulting graphic into the document
 \useGNUPLOTgraphic[sin]

 ==

 ! Missing number, treated as zero.

 system           tex  error on line 0 in file : Missing number, treated as 
 zero ...

 empty file

 to be read again
                   \let
 \doprocessGNUPLOTfile ...OTnumber \zerocount \let
                                                  \normalstarttikzpicture =\...
 argument ...NUPLOTfile [sin][\@@GNUPLOTresult ]}
                                                  \doif {\@@GNUPLOTterminal ...
 \firstofoneargument #1-#1

 argument ...}\writeandprocessGNUPLOTscript {sin}
                                                  \doifelse {\@@GNUPLOTtermi...
 \firstoftwoarguments #1#2-#1

 ...
 * ./test.tex \stoptext

 ?

Oh, indeed. It seems that a recent change in ConTeXt core broke
functionality of the module (the version I tested on earlier worked
fine).

I'm not sure if I know where to start digging for the problem. There
are some more experienced developers here, but I can try. (Though I
take all the blame on me for not adapting the module to MKIV yet.)

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot not working

2012-04-11 Thread Wolfgang Schuster

Am 11.04.2012 um 14:07 schrieb Mojca Miklavec:

 On Wed, Apr 11, 2012 at 11:00, John Devereux wrote:
 
 Hi all,
 
 Is there a problem with gnuplot? I get an error with the minimal example
 on the wiki.
 
 text.tex:
 
 \usemodule[gnuplot]
 
 % write a script for gnuplot
 \startGNUPLOTscript[sin]
   plot sin(x)
 \stopGNUPLOTscript
 
 % include the resulting graphic into the document
 \useGNUPLOTgraphic[sin]
 
 ==
 
 ! Missing number, treated as zero.
 
 system   tex  error on line 0 in file : Missing number, treated as 
 zero ...
 
 empty file
 
 to be read again
   \let
 \doprocessGNUPLOTfile ...OTnumber \zerocount \let
  \normalstarttikzpicture 
 =\...
 argument ...NUPLOTfile [sin][\@@GNUPLOTresult ]}
  \doif {\@@GNUPLOTterminal 
 ...
 \firstofoneargument #1-#1
 
 argument ...}\writeandprocessGNUPLOTscript {sin}
  \doifelse 
 {\@@GNUPLOTtermi...
 \firstoftwoarguments #1#2-#1
 
 ...
 * ./test.tex \stoptext
 
 ?
 
 Oh, indeed. It seems that a recent change in ConTeXt core broke
 functionality of the module (the version I tested on earlier worked
 fine).
 
 I'm not sure if I know where to start digging for the problem. There
 are some more experienced developers here, but I can try. (Though I
 take all the blame on me for not adapting the module to MKIV yet.)


You’re mixing counter mechanism in the module.

You define a new counter with

  \newcounter\tikzGNUPLOTnumber

and later you reset it with

  \setcounter\tikzGNUPLOTnumber\zerocount

Both commands are from different mechanism where the \setcounter is from 
\makecounter is was removed in MkIV because the internal commands for 
\definenumber have changed to \definecounter, \incrementcounter, \setcounter 
etc.

To reset a \newcounter command you can write \newcounter\… (or 
\doglobal\newcounter\…).

Wolfgang
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot and the dollar sign

2012-01-28 Thread Mojca Miklavec
On Sat, Jan 28, 2012 at 09:16, Janne Junnila wrote:
 Hi!

 I'm having trouble while trying to make the following work:

 \usemodule[gnuplot]

 \startGNUPLOTscript[distr_simple_1]

 plot 2_simple_1.out using
 (0.01*floor($1/0.01)):(0.870456/10/0.01) smooth frequency with
 boxes, (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x)
 \stopGNUPLOTscript

 \useGNUPLOTgraphic[distr_simple_1]

 The problem seems to be that the single dollar sign gets interpreted
 as the start of a math environment.

On one hand that is the intended default behaviour. It is very handy
to be able to use

plot (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) title '$\left(\cos(2x)
\cdot \sin(0.5x)\right+1) e^{-0.4x}$'

to get nice result. On the other hand I'm not exactly sure how to
reliably print whatever gets passed to ConTeXt. The only option that
comes to my mind is some modification of
\sometxt{\starttyping floor($1/0.01) \stoptyping}
where \starttyping would generate a single line. But one would need a
special option for that. (The command \type{...} would not be reliable
enough: in MKII it stops working at the second underscore and it is a
problem if one has curly braces in text.)

 I tried to look through the source
 code to see how I could tell context to bypass checking for certain
 characters, but I couldn't figure it out.

Currently the only option is to provide an explicit title. But if
there's a request to support literal output and if somebody can help
me figure out how exactly I should output the given text into
metapost, so that it will be reliably printed out literally.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot and the dollar sign

2012-01-28 Thread Janne Junnila
Thank you for your reply!

I was actually able to find a workaround for my problem at least in
this case. Digging through the gnuplot documentation revealed that
instead of using $n to refer to the column n in a data file one can
also use column(n). The ConTeXt parser accepts this of course.

Janne Junnila

On Sat, Jan 28, 2012 at 12:23 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Sat, Jan 28, 2012 at 09:16, Janne Junnila wrote:
 Hi!

 I'm having trouble while trying to make the following work:

 \usemodule[gnuplot]

 \startGNUPLOTscript[distr_simple_1]

 plot 2_simple_1.out using
 (0.01*floor($1/0.01)):(0.870456/10/0.01) smooth frequency with
 boxes, (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x)
 \stopGNUPLOTscript

 \useGNUPLOTgraphic[distr_simple_1]

 The problem seems to be that the single dollar sign gets interpreted
 as the start of a math environment.

 On one hand that is the intended default behaviour. It is very handy
 to be able to use

 plot (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) title '$\left(\cos(2x)
 \cdot \sin(0.5x)\right+1) e^{-0.4x}$'

 to get nice result. On the other hand I'm not exactly sure how to
 reliably print whatever gets passed to ConTeXt. The only option that
 comes to my mind is some modification of
    \sometxt{\starttyping floor($1/0.01) \stoptyping}
 where \starttyping would generate a single line. But one would need a
 special option for that. (The command \type{...} would not be reliable
 enough: in MKII it stops working at the second underscore and it is a
 problem if one has curly braces in text.)

 I tried to look through the source
 code to see how I could tell context to bypass checking for certain
 characters, but I couldn't figure it out.

 Currently the only option is to provide an explicit title. But if
 there's a request to support literal output and if somebody can help
 me figure out how exactly I should output the given text into
 metapost, so that it will be reliably printed out literally.

 Mojca
 ___
 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  : http://foundry.supelec.fr/projects/contextrev/
 wiki     : http://contextgarden.net
 ___
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot module does not work

2012-01-13 Thread Mojca Miklavec
On Fri, Jan 13, 2012 at 14:35, zs wrote:
 Hello,

 it seem like gnuplot module does not work with recent ConTeXt Standalone.

Thank you very much for the report.

 --- error message 

 ! Undefined control sequence.

 system           tex  error on line 110 in file pokus_min.tex: Undefined 
 control sequence ...


 l.110 \runMPgraphicstrue

This one seems easy to fix - just comment out \runMPgraphicstrue in
t-gnuplot.tex. But I have other problems with buffers after trying
that. (See the topic buffer broken? from two days ago.)

I'm using 2012.01.12 15:48 and it bails out in the same way:

! Extra }, or forgotten \endgroup.

system   tex  error on line 14 in file gptest.tex: Extra },
or forgotten  ...

 4
 5  \startGNUPLOTscript[aaa]
 6  plot [0:5] -
 7  0   1
 8  1   2
 9  2   5
10  3   10
11  4   17
12  5   26
13  e
14\stopGNUPLOTscript
15
16  \useGNUPLOTgraphic[aaa]
17
18  \stoptext
19


\stopGNUPLOTscript -\egroup
 \ifx \savebuffer \undefined \else \savebuffer [...
\buff_finish ...oup \buff_stop {stopGNUPLOTscript}
  \endgroup
l.14  \stopGNUPLOTscript

?

Mojca


 --- example -

 \usemodule[gnuplot]

 \starttext

 \startGNUPLOTscript[aaa]
 plot [0:5] -
 0       1
 1       2
 2       5
 3       10
 4       17
 5       26
 e
 \stopGNUPLOTscript

 \useGNUPLOTgraphic[aaa]

 \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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot module does not work

2012-01-13 Thread Hans Hagen

On 13-1-2012 17:10, Mojca Miklavec wrote:


This one seems easy to fix - just comment out \runMPgraphicstrue in
t-gnuplot.tex. But I have other problems with buffers after trying
that. (See the topic buffer broken? from two days ago.)

I'm using 2012.01.12 15:48 and it bails out in the same way:

! Extra }, or forgotten \endgroup.


buffers are fixed in the next beta (not yet uploaded)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot module: `option=monochrome` does not work.

2011-12-13 Thread Mojca Miklavec
On Tue, Dec 13, 2011 at 18:03, Paul Menzel wrote:
 Dear ConTeXt folks,


 I want to create monochrome plots, but `option=monochrome` is ignored.

(Ashamed.) Yes, you are right.

        \usemodule[gnuplot]

        \setupGNUPLOT[terminal=context,option=monochrome]

This passes the option to terminal if no better way is available. This
would only help you in case of png, pdf or metapost terminal. For
ConTeXt terminal in input mode it wouldn't help you since the option
color/dashed/etc. are completely ignored. This means that gnuplot will
only consider options fontscale=, points=metapost|tex, width= and
height= since that influences the output. Colors and dashed/solid
lines can be turned on and off on the fly, same for line widths (you
can redraw the same graph with dash turned on and off, using the same
gnuplot output).

First of all, I should fix documentation on that (using it that way is
slightly deprecated and should only be used if the option is not). But
second of all .. I just realized that, for example, standalone mode
writes out

\setupGNUPLOTterminal
   [context]
   [linejoin=mitered, % *mitered* | rounded | beveled
linecap=butt, % *butt* | rounded | squared
dashed=yes, % *yes* | no
dashlength=1, % scaling factor for dash lengths
linewidth=1, % scaling factor for line widths (1.0 means 0.5bp)
%fontscale=1, % scaling factor for text labels
points=metapost, % *metapost* | tex (Should points be drawn with
MetaPost or TeX?)
images=inline] % *inline* | external (inline only works in MKIV,
external requires png support in gnuplot)

but I completely forgot about monochrome option!!! Or rather ... I see
that I print out \setupcolors[state=start] if and only if color is
switched on, but that won't really help you in standalone mode. Ouch!
I'm sorry. You don't need to recompile the terminal for that, but I
need to fix t-gnuplot.tex and mp-gnuplot.mp. Does, according to what
you see above, color=yes|no make sense? (I will also have to change
the terminal for standalone mode, but that won't affect your plots.)

However, the main reason why I didn't do it better before is because I
have no idea what to do with monochrome. That is: should I use
different shades of gray? Should I simply make all the colors solid
black? And then the user should use color=no,dashed=yes? I'm
particularly confused about the choice between different shades of
gray and black.

And yes - I'll fix the wiki page.

Here's a quick workaround:

\startMPextensions
gp_color_lt[0] := black;
gp_color_lt[1] := black;
gp_color_lt[2] := black;
gp_color_lt[3] := black;
gp_color_lt[4] := black;
gp_color_lt[5] := black;
gp_color_lt[6] := black;
gp_color_lt[7] := black;
gp_color_lt[8] := black;
\stopMPextensions

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot module: `option=monochrome` does not work.

2011-12-13 Thread Mojca Miklavec
Dear Paul,

Just a few more thoughts:

- If your whole document is black-and-white (if you switch colors off
globally), the plot will turn out black-and-white anyway (actually it
will be different shades of gray).

- You can always use something like
plot pi lt 1 lc 0, 2*pi lt 2 lc 0
or
lc rgb black (if I'm not mistaken about the syntax)
or
set style line 1 lt 1 lc 0
set style line 2 lt 2 lc 0
plot sin(x) ls 1, cos(x) ls 2, ...

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot: `! Undefined control sequence.` with format specifier %

2011-12-11 Thread Mojca Miklavec
On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote:
 Dear Mojca and ConTeXt folks,


 I compiled gnuplot 4.5 from source (master) and got everything running.
 Mojca, thank you so much!

 Trying the example from the gnuplot page in the Wiki [1]

        \usemodule[gnuplot]

        \setupGNUPLOT[terminal=mp,option=color]

        % general settings for the whole document
        \startGNUPLOTinclusions

           # you may use TeX commands to format the titles and axes
           set title '\bf Trigonometry'
           set xlabel '$x$'
           set ylabel '$y$'
           set format y '\%.1f'

This should have been without the backslash.

In beginning the text was processed with TeX, not it is taken
literally (% doesn't start the comment any more), so maybe it's a
leftover from the very early days. I will check the wiki.

 Actually I hope that it is since then upgrading would fix my issue. ;-)

... however I still have some problems. For some reason ConTeXt only
generates dvi files from metapost code which has never been the case
before. I need to figure out what is going on.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot: `! Undefined control sequence.` with format specifier %

2011-12-11 Thread Mojca Miklavec
On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote:
 Dear Mojca and ConTeXt folks,


 I compiled gnuplot 4.5 from source (master) and got everything running.
 Mojca, thank you so much!

 Trying the example from the gnuplot page in the Wiki [1]

        \usemodule[gnuplot]

        \setupGNUPLOT[terminal=mp,option=color]

But one question. Why do you say that you compile the latest source of
gnuplot (which finally has context terminal built in, after 5 or 6
years), and yet you use the mp terminal instead of the default
context (or at least tikz)? The mp terminal has been there
forever, and hardly ever improved. It also doesn't integrate too well
(if you change the typeface, that won't be reflected in you plots).

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot: `! Undefined control sequence.` with format specifier %

2011-12-11 Thread Paul Menzel
Am Montag, den 12.12.2011, 01:02 +0100 schrieb Mojca Miklavec:
 On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote:

  I compiled gnuplot 4.5 from source (master) and got everything running.
  Mojca, thank you so much!
 
  Trying the example from the gnuplot page in the Wiki [1]
 
 \usemodule[gnuplot]
 
 \setupGNUPLOT[terminal=mp,option=color]
 
 % general settings for the whole document
 \startGNUPLOTinclusions
 
# you may use TeX commands to format the titles and axes
set title '\bf Trigonometry'
set xlabel '$x$'
set ylabel '$y$'
set format y '\%.1f'
 
 This should have been without the backslash.

 In beginning the text was processed with TeX, not it is taken
 literally (% doesn't start the comment any more), so maybe it's a
 leftover from the very early days. I will check the wiki.

I see. Thank you. It does not complain anymore.

  Actually I hope that it is since then upgrading would fix my issue. ;-)
 
 ... however I still have some problems. For some reason ConTeXt only
 generates dvi files from metapost code which has never been the case
 before. I need to figure out what is going on.

I am also getting other errors now and even moving the ConTeXt file to a
new directory I keep getting this error from `mpost`.

fonts   : using map file: original-ams-euler
[1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1]
[1.1] [1.1] [1.1] [1.1]
systems : end file gnup-gnuplot-1-mp-temp at line 130
(/srv/filme/context/tex/texmf-context/tex/context/base/cont-err.mkii
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
) )
Output written on gnup-gnuplot-1-mp-temp.dvi (16 pages, 1360 bytes).
Transcript written on gnup-gnuplot-1-mp-temp.log.
TeXExec | runtime: 0.244803

This is MetaPost, version 1.504 (kpathsea version 6.0.0)

mpost: Not writing to .log (openout_any = p).
! I can't write on file `.log'.
Please type another transcript file name:


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot: `! Undefined control sequence.` with format specifier %

2011-12-11 Thread Mojca Miklavec
On Mon, Dec 12, 2011 at 01:20, Paul Menzel wrote:
 Am Montag, den 12.12.2011, 01:02 +0100 schrieb Mojca Miklavec:

 ... however I still have some problems. For some reason ConTeXt only
 generates dvi files from metapost code which has never been the case
 before. I need to figure out what is going on.

 I am also getting other errors now and even moving the ConTeXt file to a
 new directory I keep getting this error from `mpost`.

        fonts           : using map file: original-ams-euler
        [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1]
        [1.1] [1.1] [1.1] [1.1]
        systems         : end file gnup-gnuplot-1-mp-temp at line 130
        (/srv/filme/context/tex/texmf-context/tex/context/base/cont-err.mkii
        systems         : no file 'cont-sys.tex', using 'cont-sys.rme' instead
        ) )
        Output written on gnup-gnuplot-1-mp-temp.dvi (16 pages, 1360 bytes).
        Transcript written on gnup-gnuplot-1-mp-temp.log.
        TeXExec | runtime: 0.244803

        This is MetaPost, version 1.504 (kpathsea version 6.0.0)

        mpost: Not writing to .log (openout_any = p).
        ! I can't write on file `.log'.
        Please type another transcript file name:

Wow! I have never seen this one (metapost unable to write the log file :) :) :)

It seems that there are some problems with mptopdf converter.

But in any way - can you please try to remove
\setupGNUPLOT[terminal=...] command?

I just realized that I forgot to update a whole lot of information on
that wiki page (in particular there is no single mention that the
terminal has been included into official CVS). I also assume that the
windows builds from Tatsuro should contain the terminal, but I have
never really tested them.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot: `! Undefined control sequence.` with format specifier %

2011-12-11 Thread Paul Menzel
Am Montag, den 12.12.2011, 01:13 +0100 schrieb Mojca Miklavec:
 On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote:

  I compiled gnuplot 4.5 from source (master) and got everything running.
  Mojca, thank you so much!
 
  Trying the example from the gnuplot page in the Wiki [1]
 
 \usemodule[gnuplot]
 
 \setupGNUPLOT[terminal=mp,option=color]
 
 But one question. Why do you say that you compile the latest source of
 gnuplot (which finally has context terminal built in, after 5 or 6
 years), and yet you use the mp terminal instead of the default
 context (or at least tikz)? The mp terminal has been there
 forever, and hardly ever improved. It also doesn't integrate too well
 (if you change the typeface, that won't be reflected in you plots).

Thank you for the follow up. I just blindly copied the example from the
Wiki and did not pay any attention. In my thesis, I of course use the
ConTeXt terminal.


Thanks,

Paul


PS: Do you have a BibTeX entry for your gnuplot module?


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot module

2011-12-11 Thread Paul Menzel
Am Montag, den 12.12.2011, 01:40 +0100 schrieb Mojca Miklavec:
 (was: gnuplot: `! Undefined control sequence.` with format specifier %)
 (sorry, but it was too long to keep it all in title :)
 
 On Mon, Dec 12, 2011 at 01:30, Paul Menzel wrote:
 
  Thank you for the follow up. I just blindly copied the example from the
  Wiki and did not pay any attention. In my thesis, I of course use the
  ConTeXt terminal.
 
 What is the thesis going to be about?

The topic is how long integrated random walks stay positiv. Not being
able to prove that formally for double-integrated(?) random walk, I am
doing some simulations.

 (I just noticed that mptopdf complains about missing bibtex files. :)

It seems to work for me.

  PS: Do you have a BibTeX entry for your gnuplot module?
 
 Do you suggest me to publish an article about the terminal in arXiv,
 to get at least some citations by the time when I need to submit my
 thesis? :P

That is an idea. ;-)

 But no, I don't have it. I could try to create one though, but I'm not
 even sure what the webpage should be. Many scientific programs just
 ask to cite their first article in some scientific journal if one uses
 the software, but I neither have an article nor homepage apart from
 that (still outdated) wiki page.
 
 There is some additional documentation on
 https://github.com/mojca/context-gnuplot/tree/master/texmf/doc/context/third/gnuplot
 (possibly also in minimals, but I'm not sure when I last synced the
 version), but even that is outdated now since they required from me to
 strip down terminal options parsing code.

I thought asking does not hurt. ;-) So I guess I will just reference
ConTeXt and gnuplot then.


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [gnuplot-context] context terminal now in gnuplot's CVS

2011-11-06 Thread Vedran Miletić
Congratulations!

Vedran

2011/11/6 Mojca Miklavec mojca.miklavec.li...@gmail.com:
 Hello,

 After 5 years (actually almost 6 - the first t-gnuplot.tex code has
 been sent to me by Peter Münster on 2nd January 2006) gnuplot
 developers finally included context terminal into their CVS repository
 today.

 (temporary link, but probably slightly more clear than linking to CVS
 repository)
    
 https://github.com/gnuplot/gnuplot-new/commit/62737451bb138f0e679b5a57e0042b42e06f0a5c

 The release of gnuplot 4.4.4 was initially planned for around October,
 which means that it should probably be out sometime soon.

 Documentation:
     
 https://github.com/mojca/context-gnuplot/tree/master/texmf/doc/context/third/gnuplot

 Mojca

 PS: There are still three pending issues in the area that is rarely used 
 anyway:
 - I need to fix font switching (I'm currently using
 \sometxt[gp][iwona,20]{some label} which doesn't work in MKIV and is
 an ugly hack in MKII)
 - there are some problems with (draw) externalfigure inside metapost
 drawings; I might create an abstract layer around that
 - transparent inline bitmap images don't work and they don't work in
 MKII at all (partially due to limitations in metapost)

 --
 http://wiki.contextgarden.net/Gnuplot
 http://groups.google.com/group/gnuplot-context

 To post here: gnuplot-cont...@googlegroups.com
 To unsubscribe: gnuplot-context-unsubscr...@googlegroups.com
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] gnuplot

2011-08-19 Thread Xenia
Am 18.08.2011 23:31, schrieb Mojca Miklavec:
 On Thu, Aug 18, 2011 at 22:39, Xenia wrote:
 Hi list,

 I'm having some problems with gnuplot.

 I tried the minimal example from http://wiki.contextgarden.net/Gnuplot ,
 but I recieve just a .plt-file.

 I hope some of you do also use gnuplot and can help me easily.
 
 Dear Xenia,
 
 1.) What operating system are you using?

debian-wheezy (testing)

 2.) Did you compile gnuplot from https://github.com/mojca/gnuplot or
 did you use the default gnuplot as shipped with your system? (I should
 check again, but there is some slight chance that it also works with
 TikZ terminal; however I doubt that the latest version of TikZ
 terminal has been released, so that might not necessary help you.)

I tried following this instruction:
http://wiki.contextgarden.net/Gnuplot#Unix_or_Mac

But then I got:
-
$ ./prepare

./prepare: 47: aclocal: not found

Some part of the preparation process failed.
Please refer to INSTALL for details.
-

And in INSTALL and INSTALL.gnu the first step is to do
$ ./configure
but I only have a configure.in and configure.vms -file.
I'm quite confused.
So I installed it from the debian-repositories (for sure without any
context-implementation), but you could just tell me, how I can make your
version work. :-)

 3.) You need to make sure that if you run gnuplot, selecting
 set term context
 works. After then you could also check if
 gnuplot your-document-gnuplot-1.plt
 will generate a tex file.
 
 I suspect that your gnuplot doesn't know about ConTeXt terminal. In
 that case you may complain to the gnuplot mailing list :) :) :)

You're right and I did. :-)

Thanks

Xenia
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot

2011-08-19 Thread George N. White III
On Fri, Aug 19, 2011 at 4:47 AM, Xenia yor...@googlemail.com wrote:
[...]
 I tried following this instruction:
 http://wiki.contextgarden.net/Gnuplot#Unix_or_Mac

 But then I got:
 -
 $ ./prepare

 ./prepare: 47: aclocal: not found

 Some part of the preparation process failed.
 Please refer to INSTALL for details.
 -

 And in INSTALL and INSTALL.gnu the first step is to do
 $ ./configure
 but I only have a configure.in and configure.vms -file.
 I'm quite confused.

Most likely you are missing some of the build tools.   Look
for a package called build-essential.  You may need to add
some -dev packages for various libraries needed by gnuplot.
You might check the dependencies for debian gnuplot and
make sure you have the -dev versions of all the libraries.

-- 
George N. White III aa...@chebucto.ns.ca
Head of St. Margarets Bay, Nova Scotia
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot

2011-08-19 Thread Mojca Miklavec
On Fri, Aug 19, 2011 at 09:47, Xenia wrote:

 But then I got:
 -
 $ ./prepare

 ./prepare: 47: aclocal: not found

I guess that a package autotools/autoconf or something similar is missing.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot

2011-08-18 Thread Mojca Miklavec
On Thu, Aug 18, 2011 at 22:39, Xenia wrote:
 Hi list,

 I'm having some problems with gnuplot.

 I tried the minimal example from http://wiki.contextgarden.net/Gnuplot ,
 but I recieve just a .plt-file.

 I hope some of you do also use gnuplot and can help me easily.

Dear Xenia,

1.) What operating system are you using?
2.) Did you compile gnuplot from https://github.com/mojca/gnuplot or
did you use the default gnuplot as shipped with your system? (I should
check again, but there is some slight chance that it also works with
TikZ terminal; however I doubt that the latest version of TikZ
terminal has been released, so that might not necessary help you.)
3.) You need to make sure that if you run gnuplot, selecting
set term context
works. After then you could also check if
gnuplot your-document-gnuplot-1.plt
will generate a tex file.

I suspect that your gnuplot doesn't know about ConTeXt terminal. In
that case you may complain to the gnuplot mailing list :) :) :)

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2011-01-10 Thread jeroen . muskee
I have tried

texexec --make --all 

and changing line 484 from

\getfiguredimensions[\@@GNUPLOTresult]

into

\getfiguredimensions[\@@GNUPLOTfinalresult]

but neither is giving me any luck. Now also 

install-setup.bat --extras=t-gnuplot

is not working anymore. Not sure what the issue is.

Jeroen

--
This message was sent on behalf of jeroen.mus...@hotmail.com at 
openSubscriber.com
http://www.opensubscriber.com/message/ntg-context@ntg.nl/14992530.html
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2011-01-09 Thread jeroen . muskee
In the past I was using this instruction set to install GnuPlot in Windows 
Context Mkiv minimals but it does not work anymore. Is there a bug in t-gnuplot 
version 2009-07-21?

Create folder c:\context\gnuplot
Download from http://dl.contextgarden.net/modules/gnuplot-win.zip the gnuplot 
file gnuplot-win.zip and unzip in folder c:\context so you have folders 
c:\context\gnuplot\bin and c:\context\gnuplot\term
Create a batch file c:\context\gnuplot\bin\gnuplot.bat with content 
c:\context\gnuplot\bin\wgnuplot.exe %*
STARTRUNCMD ENTER
SET PATH=%PATH%;c:\context\gnuplot\bin ENTER
Test GNUPLOT by entering gnuplot in the CLI console and give in gnuplot the 
command plot sin(x) ENTER
Create folder c:\context\tex\texmf\tex\context\third\gnuplot
Download 
http://theory.uwinnipeg.ca/scripts/CTAN/macros/context/contrib/context-gnuplot.zip
 or http://dl.contextgarden.net/modules/t-gnuplot-2009.07.21.zip module and 
unzip and put in folder c:\context\tex\texmf\tex\context\third\gnuplot and 
c:\context\text\texmf\metapost\base\ so you have 
c:\context\tex\texmf\tex\context\third\gnuplot\t-gnuplot.tex and 
c:\context\text\texmf\metapost\base\mp-gnuplot.mp
Startruncmdc: ENTER cd \context\tex\texmf-mswin\bin ENTER context – 
-generate ENTER
(For MkII users use the following command mktexlsr)
Enter the following data to test GNUPLOT

\usemodule[gnuplot]
\enableregime[utf]
\setupGNUPLOT[terminal=mp]

\startGNUPLOTscript[mysinplot]
set xlabel “time”
set ylabel “value”
plot sin(x)
\stopGNUPLOTscript

\starttext
text before picture
\useGNUPLOTgraphic[mysinplot]
text after picture
\stoptext


--
This message was sent on behalf of jeroen.mus...@hotmail.com at 
openSubscriber.com
http://www.opensubscriber.com/message/ntg-context@ntg.nl/14815843.html
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2011-01-09 Thread Mojca Miklavec
On Sun, Jan 9, 2011 at 22:50,  jeroen.mus...@hotmail.com wrote:
 In the past I was using this instruction set to install GnuPlot in Windows 
 Context Mkiv minimals but it does not work anymore. Is there a bug in 
 t-gnuplot version 2009-07-21?

Thanks a lot for the bug report. I can confirm that it fails here as well.

I rarely use any other terminal but the native ConTeXt one, so I
didn't notice the problem with metapost terminal.

I'll take a look into it. I get the following error and will try to
investigate further:

This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009)
 \write18 enabled.
---! /context/tex/texmf-osx-64/web2c/pdftex/mptopdf.fmt doesn't match
pdftex.pool
(Fatal format file error; I'm stymied)

MPtoPDF 1.4.0 : error while processing tex file

Mojca

PS: I have to admit that I have no idea when I last compiled the
windows binary for gnuplot. I would need to learn again how to do it.
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2011-01-09 Thread Aditya Mahajan

On Sun, 9 Jan 2011, Mojca Miklavec wrote:


On Sun, Jan 9, 2011 at 22:50,  jeroen.mus...@hotmail.com wrote:

In the past I was using this instruction set to install GnuPlot in Windows 
Context Mkiv minimals but it does not work anymore. Is there a bug in t-gnuplot 
version 2009-07-21?


Thanks a lot for the bug report. I can confirm that it fails here as well.

I rarely use any other terminal but the native ConTeXt one, so I
didn't notice the problem with metapost terminal.

I'll take a look into it. I get the following error and will try to
investigate further:

This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009)
\write18 enabled.
---! /context/tex/texmf-osx-64/web2c/pdftex/mptopdf.fmt doesn't match
pdftex.pool
(Fatal format file error; I'm stymied)

MPtoPDF 1.4.0 : error while processing tex file


texexec --make --all

should regenerate mptopdf format.

Aditya
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2011-01-09 Thread Mojca Miklavec
On Sun, Jan 9, 2011 at 19:54, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Sun, Jan 9, 2011 at 22:50,  jeroen.mus...@hotmail.com wrote:
 In the past I was using this instruction set to install GnuPlot in Windows 
 Context Mkiv minimals but it does not work anymore. Is there a bug in 
 t-gnuplot version 2009-07-21?

 Thanks a lot for the bug report. I can confirm that it fails here as well.

 I rarely use any other terminal but the native ConTeXt one, so I
 didn't notice the problem with metapost terminal.

 I'll take a look into it.

Does it help if you change
\getfiguredimensions[\@@GNUPLOTresult]
into
\getfiguredimensions[\@@GNUPLOTfinalresult]
in line 484?

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Fri, Nov 19, 2010 at 00:38, Florian Wobbe wrote:

 Thanks, I just updated the CVS version of gnuplot with your files and gave it 
 a try: It works with minimals!

 [...]

 Feedback and patches welcome!

 No patches I'm afraid. But feedback goes here:

 1) The label text of the following key element takes the color of the 
 preceding key symbol. Minimal example:

  set terminal lua tikz fulldoc size 15cm,7cm context
  set output 'plot.tex'
  set xrange [ 0 : 13 ]
  f1(x)=sqrt(x)
  f2(x)=sqrt(x*0.8)-3
  plot f1(x) lc rgb 'blue', f2(x)

Confirmed. I had the problems with that in my terminal as well, but I
think that it was a buglet in metapost back then; oh, good old
memories ... :) :) :) I didn't check the details about this one.

 2) Negative axis labels are set with hyphen instead of proper minus sign, 
 which should be longer (see example above).

I'm not sure if this should really be fixed automatically or not. In
order to fix this one would have to patch gnuplot core.

I forgot the details how to do it (I can find it out), but you can
configure the layout of labels. In particular you may enclose the
number into math delimiters ($). Maybe something like
set format y $%.1f$
would work (you might want to change the size of left margin then).
Doing any other kind of magic would be a bit dangerous. Keep in mind
that
plot 'x.dat' u 1:(2*$2)
will also fail since TeX will interpret $ as math delimiter. But
changing that behaviour would have other undesirable effects.

 3) First I thought luatex hangs but then I noticed TikZ is awfully slow when 
 drawing plots with large amounts of data points (the tikzpicture had about 
 3000 lines). I can speed this up by reducing the size by invoking plot with:

  plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]

 I wonder if there is a smarter way to do this in gnuplot.

Using bitmap terminals. A while back I was dreaming about having
mixed-mode with one terminal creating text labels and the other one
(png for example) drawing the plot. But this needs some extra
programming effort.

You would stumble against the same problem when using PS or PDF
terminal, maybe only at a slightly bigger number of points.

What I did for my theory of chaos reports and the million-of-points
plots in my thesis was to create an empty plot with ConTeXt terminal,
create a borderless plot with PNG and then manually insert PNG into
the generated ConTeXt output, which you could do with TikZ output as
well. It requires more effort, but there is no other way to speed up
vector graphics. They are simply not suitable for drawing millions of
points on the same plot.

(Gnuplot also has a keyword 'every' to reduce the number of points,
but in my case I wanted to plot all of them.)

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Florian Wobbe
On Nov 22, 2010, at 16:01 , Mojca Miklavec wrote:

 [...]
 
 2) Negative axis labels are set with hyphen instead of proper minus sign, 
 which should be longer (see example above).
 
 I'm not sure if this should really be fixed automatically or not. In
 order to fix this one would have to patch gnuplot core.
 
 I forgot the details how to do it (I can find it out), but you can
 configure the layout of labels. In particular you may enclose the
 number into math delimiters ($). Maybe something like
set format y $%.1f$
 would work (you might want to change the size of left margin then).

Hej Mojca, thank you for your answer! Well, that was surprisingly easy - I 
should have checked the manual first (I was just about to write an ugly hack 
into your context terminal driver :). Actually
 set format $%g$
gives the default label format (only enclosed in $) for all axes.

 Doing any other kind of magic would be a bit dangerous. Keep in mind
 that
plot 'x.dat' u 1:(2*$2)
 will also fail since TeX will interpret $ as math delimiter. But
 changing that behaviour would have other undesirable effects.
 
 3) First I thought luatex hangs but then I noticed TikZ is awfully slow when 
 drawing plots with large amounts of data points (the tikzpicture had about 
 3000 lines). I can speed this up by reducing the size by invoking plot with:
 
  plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]
 
 I wonder if there is a smarter way to do this in gnuplot.
 
 [...]
 What I did for my theory of chaos reports and the million-of-points
 plots in my thesis was to create an empty plot with ConTeXt terminal,
 create a borderless plot with PNG and then manually insert PNG into
 the generated ConTeXt output, which you could do with TikZ output as
 well. It requires more effort, but there is no other way to speed up
 vector graphics. They are simply not suitable for drawing millions of
 points on the same plot.

I'd probably do the same in that case. But unlike you I have a lot less points 
- 5000 points instead of millions. Loot at this example, which is the slightly 
modified random demo script taken from the gnuplot page:

 set terminal context size 15.0cm,10.5cm standalone
 set output 'randomCtx.tex'

 set dummy t,y
 unset key
 set parametric
 set samples 5000, 5000
 set style function dots
 set title Lattice test for random numbers 
 set xlabel rand(n) - 
 set xrange [ 0.0 : 1.0 ] noreverse nowriteback
 set ylabel rand(n + 1) - 
 set yrange [ 0.0 : 1.0 ] noreverse nowriteback
 set zlabel rand(n + 2) - 
 set zrange [ 0.0 : 1.0 ] noreverse nowriteback
 plot rand(0), rand(0)

 set terminal lua tikz context size 15.0cm,10.5cm fulldoc
 set output 'randomLua.tex'

 replot

Now look at the timing of processing the output files with context (final run 
only):

context randomCtx.tex - 3.150 seconds.
context randomLua.tex - 23.658 seconds.

Further increasing the number of points to 15000 results in 8.978 vs. 62.878 
seconds. Quite a big difference in processing time!

 (Gnuplot also has a keyword 'every' to reduce the number of points,
 but in my case I wanted to plot all of them.)

True, but suppose you don't have evenly spaced data points. Then you don't want 
every other line but one point every 5 kilometres or something the like.

Especially for line drawings it would be beneficial not to place every single 
point. Instead consecutive points should be skipped if they are close to each 
other (with regard to plot units) - it makes no sense to include points which 
you won't see anyway. This could be done by defining a grid with a certain 
(user defined) resolution and rounding the coordinates (plot units) of a line 
point to the nearest grid node. All consecutive line points falling on the same 
grid node should not be passed on to terminal drivers. The psxy utility of GMT 
(http://gmt.soest.hawaii.edu/) does this for instance. I am not aware of such a 
functionality within gnuplot but it would be a nice feature.

Best wishes,
Florian

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 20:15, Florian Wobbe wrote:

 Especially for line drawings it would be beneficial not to place every single 
 point. Instead consecutive points should be skipped if they are close to each 
 other (with regard to plot units) - it makes no sense to include points which 
 you won't see anyway. This could be done by defining a grid with a certain 
 (user defined) resolution and rounding the coordinates (plot units) of a line 
 point to the nearest grid node. All consecutive line points falling on the 
 same grid node should not be passed on to terminal drivers. The psxy utility 
 of GMT (http://gmt.soest.hawaii.edu/) does this for instance. I am not aware 
 of such a functionality within gnuplot but it would be a nice feature.

But this is an issue of Gnuplot, not something that a terminal writer
is supposed to think of.

One thing that I did implement in ConTeXt was that if I get instructions
   move_to(10,3)
   line_to(11,8)
   line_to(11,8)
   line_to(11,9)
then one line_to(11,8) will be ignored (resolution is hard-coded in
the terminal, but you could draw a smaller plot and then magnify it
which would seemingly decrease resolution). But in most cases that
wouldn't really help.

About the timing difference between set term context and set term
lua context: it is quite possible that metapost library is much
faster than TikZ which uses TeX-based macros. TeX might be slower in
calculations than metapost (which uses C for low level calculations)
and TikZ is not optimized for drawing ten-thousand segments. And Hans
really tried hard to optimize the code. Processing the output with
ConTeXt is also at least ten times slower that outputting straight to
PS or PDF and if you try ConTeXt MKII it is about two times slower
than MKIV.

You probably didn't have a chance to try the first implementations of
ConTeXt terminal for gnuplot. It needed 10 minutes for 13 ordinary
plots and it ran out of memory if I tried to plot 14 of them!!! (The
reason was the usage of btex text etex constructs which lead to
ConTeXt runs inside metapost runs inside ConTeXt runs, all doubled,
maybe the labels were compile even four times, usually with a separate
instance of ConTeXt for each plot.) Now compare that speed difference
and the enormous optimization that Hans implemented back in 2006 ...

The slow speed of TikZ is not something that you could do much about.
There might be some tiny room for optimization in
gnuplot-lua-tikz-common.tex, but hardly any. LuaTeX-based TikZ could
be reimplemented and that would bring most benefits, but since Till
almost-quit the project and since it works out-of-the-box with pdfTeX
macros it is highly unlikely to happen.

But yes, it would be nice if also ConTeXt terminal would be included.
It still doesn't support raw images, but most other features are
present.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Aditya Mahajan

On Mon, 22 Nov 2010, Mojca Miklavec wrote:


The slow speed of TikZ is not something that you could do much about.


Rewrite the pgf backend code in metapost.

Aditya
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 22:19, Aditya Mahajan wrote:
 On Mon, 22 Nov 2010, Mojca Miklavec wrote:

 The slow speed of TikZ is not something that you could do much about.

 Rewrite the pgf backend code in metapost.

But that requires Till (maybe Hans) or some other genius to work on it
for some non-trivial amount time. And that is not likely to happen any
time soon.

Peter as the author of TikZ terminal for gnuplot is certanly not the
one that could be adressed to speed up his terminal.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Florian Wobbe
On Nov 22, 2010, at 22:03 , Mojca Miklavec wrote:

 On Mon, Nov 22, 2010 at 20:15, Florian Wobbe wrote:
 
 Especially for line drawings it would be beneficial not to place every 
 single point. Instead consecutive points should be skipped if they are close 
 to each other (with regard to plot units) - it makes no sense to include 
 points which you won't see anyway. This could be done by defining a grid 
 with a certain (user defined) resolution and rounding the coordinates (plot 
 units) of a line point to the nearest grid node. All consecutive line points 
 falling on the same grid node should not be passed on to terminal drivers. 
 The psxy utility of GMT (http://gmt.soest.hawaii.edu/) does this for 
 instance. I am not aware of such a functionality within gnuplot but it would 
 be a nice feature.
 
 But this is an issue of Gnuplot, not something that a terminal writer
 is supposed to think of.

Indeed, this was my point in the first place. It should be handled by gnuplot 
prior to handing the data over to the terminal driver.

 But yes, it would be nice if also ConTeXt terminal would be included.
 It still doesn't support raw images, but most other features are
 present.

Right, this might help increase the awareness among academics. Also not 
everyone has the ability to build gnuplot from sources.

Florian

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 22:44, Florian Wobbe wrote:
 On Nov 22, 2010, at 22:03 , Mojca Miklavec wrote:
 On Mon, Nov 22, 2010 at 20:15, Florian Wobbe wrote:

 Especially for line drawings it would be beneficial not to place every 
 single point. Instead consecutive points should be skipped if they are 
 close to each other (with regard to plot units) - it makes no sense to 
 include points which you won't see anyway. This could be done by defining a 
 grid with a certain (user defined) resolution and rounding the coordinates 
 (plot units) of a line point to the nearest grid node. All consecutive line 
 points falling on the same grid node should not be passed on to terminal 
 drivers. The psxy utility of GMT (http://gmt.soest.hawaii.edu/) does this 
 for instance. I am not aware of such a functionality within gnuplot but it 
 would be a nice feature.

 But this is an issue of Gnuplot, not something that a terminal writer
 is supposed to think of.

 Indeed, this was my point in the first place. It should be handled by gnuplot 
 prior to handing the data over to the terminal driver.

However you need to write to gnuplot-dev then. This mailing list
cannot help you.

 But yes, it would be nice if also ConTeXt terminal would be included.
 It still doesn't support raw images, but most other features are
 present.

 Right, this might help increase the awareness among academics. Also not 
 everyone has the ability to build gnuplot from sources.

But as I said ... there have to be others writing on gnuplot-dev to
show interest to other gnuplot developers. I will continue to work
with Peter to improve TikZ output and to include support into
t-gnuplot.tex, but comparison such as the speed test demonstrated with
those random points (sent to dev-gnuplot) may help.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Alan BRASLAU
On Monday 22 November 2010 22:19:40 Aditya Mahajan wrote:
 On Mon, 22 Nov 2010, Mojca Miklavec wrote:
  The slow speed of TikZ is not something that you could do much about.
 
 Rewrite the pgf backend code in metapost.
 

Or use metapost: \usemodule [graph]

Alan
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Ethan Merritt
On Monday, November 22, 2010 07:01:07 am Mojca Miklavec wrote:
 On Fri, Nov 19, 2010 at 00:38, Florian Wobbe wrote:
 
  Thanks, I just updated the CVS version of gnuplot with your files and gave 
  it a try: It works with minimals!
 
  [...]
 
  Feedback and patches welcome!
 
  No patches I'm afraid. But feedback goes here:
 
  1) The label text of the following key element takes the color of the 
  preceding key symbol. Minimal example:
 
   set terminal lua tikz fulldoc size 15cm,7cm context
   set output 'plot.tex'
   set xrange [ 0 : 13 ]
   f1(x)=sqrt(x)
   f2(x)=sqrt(x*0.8)-3
   plot f1(x) lc rgb 'blue', f2(x)
 
 Confirmed. I had the problems with that in my terminal as well, but I
 think that it was a buglet in metapost back then; oh, good old
 memories ... :) :) :) I didn't check the details about this one.
 
  2) Negative axis labels are set with hyphen instead of proper minus sign, 
  which should be longer (see example above).
 
 I'm not sure if this should really be fixed automatically or not. In
 order to fix this one would have to patch gnuplot core.
 
 I forgot the details how to do it (I can find it out), but you can
 configure the layout of labels. In particular you may enclose the
 number into math delimiters ($). Maybe something like
 set format y $%.1f$
 would work (you might want to change the size of left margin then).
 Doing any other kind of magic would be a bit dangerous. Keep in mind
 that
 plot 'x.dat' u 1:(2*$2)
 will also fail since TeX will interpret $ as math delimiter. But
 changing that behaviour would have other undesirable effects.
 
  3) First I thought luatex hangs but then I noticed TikZ is awfully slow 
  when drawing plots with large amounts of data points (the tikzpicture had 
  about 3000 lines). I can speed this up by reducing the size by invoking 
  plot with:
 
   plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]
 
  I wonder if there is a smarter way to do this in gnuplot.
 
 Using bitmap terminals. A while back I was dreaming about having
 mixed-mode with one terminal creating text labels and the other one
 (png for example) drawing the plot. But this needs some extra
 programming effort.

As I recall, I posted a patch the last time this discussion came up.
It turns off text output from the png terminal without affecting any
other graphical elements.  My though was that it could be the basis
of a pdflatex terminal class that works the same way as the current
epslatex terminals.  I can post it again, or upload it to SourceForge
if it isn't there already.

Ethan


 
 You would stumble against the same problem when using PS or PDF
 terminal, maybe only at a slightly bigger number of points.
 
 What I did for my theory of chaos reports and the million-of-points
 plots in my thesis was to create an empty plot with ConTeXt terminal,
 create a borderless plot with PNG and then manually insert PNG into
 the generated ConTeXt output, which you could do with TikZ output as
 well. It requires more effort, but there is no other way to speed up
 vector graphics. They are simply not suitable for drawing millions of
 points on the same plot.
 
 (Gnuplot also has a keyword 'every' to reduce the number of points,
 but in my case I wanted to plot all of them.)
 
 Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-18 Thread Paul Menzel
Am Montag, den 15.11.2010, 12:29 +0100 schrieb Mojca Miklavec:
 On Sun, Nov 14, 2010 at 23:04, Paul Menzel wrote:

  I read about the Gnuplot module [1] and I am wondering whether patching
  the Gnuplot binary is still necessary.
 
 Yes.
 
 Can you please send the same message to the gnuplot mailing list?

I will.

 I have sent the patch upstream once in 2006,

Could you please tell me subject line or even better provide a link to
the archive. I could not find your post to the archive.

 but they had two arguments against including the patch:

[…]


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-18 Thread Florian Wobbe
On Nov 17, 2010, at 11:47 , Mojca Miklavec wrote:

 [...]

 Here is a brief list of changes to the gnuplot CVS version:
 
 * support for ConTeXt and plain TeX
 
 Hurray! Thanks a lot.
 
 * removed dependencies for LaTeX packages other than TikZ
 * needs TikZ Version = 2.0
 * better support for saving terminal options with gnuplot 'save' command
 * fixed overflow on negative coordinates that are outside of the crop box
 * merged all recent patched from murphy-md and Ethan
 
 Unfortunately it is the Context output that does not compile with the most
 recent Context version I installed from TeXLive 2010 and the
 http://tlcontrib.metatex.org/2010/ repository. But I remember it working
 with an older version so I hope this can be fixed easily ...

Thanks, I just updated the CVS version of gnuplot with your files and gave it a 
try: It works with minimals!

 [...]
 
 Feedback and patches welcome!

No patches I'm afraid. But feedback goes here:

1) The label text of the following key element takes the color of the preceding 
key symbol. Minimal example:

 set terminal lua tikz fulldoc size 15cm,7cm context
 set output 'plot.tex'
 set xrange [ 0 : 13 ]
 f1(x)=sqrt(x)
 f2(x)=sqrt(x*0.8)-3
 plot f1(x) lc rgb 'blue', f2(x) 

2) Negative axis labels are set with hyphen instead of proper minus sign, which 
should be longer (see example above).

3) First I thought luatex hangs but then I noticed TikZ is awfully slow when 
drawing plots with large amounts of data points (the tikzpicture had about 3000 
lines). I can speed this up by reducing the size by invoking plot with:

 plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]

I wonder if there is a smarter way to do this in gnuplot.

4) Is there a possibility to get rid of the vertical artifacts in filledcurves? 
Note: the artifacts are only visible when plotting from data files.

 set terminal lua tikz fulldoc size 15cm,7cm context 
 set output 'plot.tex'
 plot  gawk 'BEGIN {for (i = 1; i = 100; i++) {print i, 0.7*i, 0.8*i+50}}' 
using 1:2:3 with filledcurve lc rgb 'black' t 'filled curve'
 set xrange [ 0 : 13 ]
 plot abs(x) with filledcurve xy=2,5

Best wishes,
Florian

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-17 Thread Jonas Stein

 2.) they assumed that I was the only user

That might be true until its implemented and public known.
I suppose thousands will like that function. Students will love it.

Kind regards,

-- 
Jonas Stein n...@jonasstein.de

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-15 Thread Mojca Miklavec
On Sun, Nov 14, 2010 at 23:04, Paul Menzel wrote:
 Dear ConTeXt folks,


 I read about the Gnuplot module [1] and I am wondering whether patching
 the Gnuplot binary is still necessary.

Yes.

Can you please send the same message to the gnuplot mailing list?

I have sent the patch upstream once in 2006, but they had two
arguments against including the patch:

1.) nobody from the development team was willing to install anything
else but tetex to try it out (and the module doesn't work under tetex)

2.) they assumed that I was the only user

The first point should hopefully be resolved by now (module should
work under MikTeX or TeX Live out-of-the-box and hopefully TeX Live is
enough widespread by now), but if anyone wants to have the module
included, somebody else but me needs to write to the gnuplot mailing
list and ask the developers if they are willing to include the patch.
(By pointing them to
https://github.com/mojca/gnuplot/blob/master/term/context.trm first.)

I'm willing to upload the patch, but it makes no sense for me to
regularly upload new patches to their
feature-requests-and-bug-tracking system if they ignore them for ages
...
I admit that the number of ConTeXt/Gnuplot users might be small, alone
for the fact that the number of ConTeXt users (several thousand?) is
much smaller than the number of LaTeX addicts, but I would be glad to
see 20 users of metafont terminal when not even the output of metapost
terminal is satisfactory (it could be improved considerably).


Apart from that ... I was working with Peter Hedwig on the ConTeXt
part of his lua/TikZ terminal (that has already been included in
gnuplot). We got it running, with some issues like general font
loading scheme, but the work was never polished to the end (stalled at
some point). We could revive that thread as well.

 Github is currently down and

It works here, but the main gnuplot code is located on fontforge (in
CVS). Github only includes a patched version of gnuplot that contains
context support.

Mojca

 therefore cannot check if the code is included. But judging from

        gnuplot help terminal
        […]
        Subtopics available for terminal:
            canvas            cgm               corel             dpu414
            dumb              dxf               eepic             emf
            emtex             epslatex          epson_180dpi      epson_60dpi
            epson_lx800       fig               gif               gpic
            hp2623a           hp2648            hp500c            hpdj
            hpgl              hpljii            hppj              imagen
            jpeg              latex             mf                mif
            mp                nec_cp6           okidata           pbm
            pcl5              pdfcairo          png               pngcairo
            pop               postscript        pslatex           pstex
            pstricks          push              qms               regis
            starc             svg               tandy_60dpi       tek40xx
            tek410x           texdraw           tgif              tkcanvas
            tpic              vttek             wxt               x11
            xlib              xterm

        $ gnuplot --version
        gnuplot 4.4 patchlevel 0

 it appears it is still required. Did some send this patch already
 upstream for inclusion?


 Thanks,

 Paul

 [1] http://wiki.contextgarden.net/Gnuplot
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot in mkiv

2010-02-17 Thread Peter Münster
On Wed, Feb 17 2010, Martin 'golodhrim' Scholz wrote:
 
 is a direct usage of gnuplot in ConTeXt MKIV possible

Yes.

Example:

\usemodule[gnuplot]
\setupGNUPLOT[terminal=png]
\startGNUPLOTscript[sin]
plot sin(x)
\stopGNUPLOTscript
\starttext
\useGNUPLOTgraphic[sin]
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] gnuplot in mkiv

2010-02-17 Thread Mojca Miklavec
On Wed, Feb 17, 2010 at 20:19, Peter Münster wrote:
 On Wed, Feb 17 2010, Martin 'golodhrim' Scholz wrote:

 is a direct usage of gnuplot in ConTeXt MKIV possible

 Yes.

 Example:

 \usemodule[gnuplot]
 \setupGNUPLOT[terminal=png]
 \startGNUPLOTscript[sin]
    plot sin(x)
 \stopGNUPLOTscript
 \starttext
 \useGNUPLOTgraphic[sin]
 \stoptext

The context terminal should also work (that is: you may leave out the
\setupGNUPLOT[terminal=png] or replace png with context that's
default anyway), but you need some special effort to compile the
terminal:

git clone git://github.com/mojca/gnuplot.git
./prepare
./configure
make

If you would like to keep using that, you can do yourself and others
the favor and write a request to gnuplot-b...@lists.sourceforge.net to
include the terminal in gnuplot's CVS (they say that not enough people
have tested and/or requested its inclusion).

An alternative is to use the lua-tikz terminal. Peter has an
almost-working version that should produce almost-valid (not yet
optimized and maybe not completely future-proof yet) ConTeXt output,
but is not included in official gnuplot version yet (and also the
gnuplot module in ConTeXt needs to be polished a bit in that respect).
Using tikz is not ready yet, but is doable if you have some patience.

You may use [just-in-time or precompiled] PDF/PS/PNG terminals of
course, but you won't be able to add TeX labels and use native
document fonts.

Mojca
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Gnuplot should now work on MKIV

2008-12-03 Thread Hans Hagen
Mojca Miklavec wrote:
 Hello,
 
 since Aditya was asking yesterday: I finally patched the gnuplot
 module to work with mkiv.
 
 There are still some parts for which I'm almost sure that they don't
 work (I didn't test, but at least an average gnuplot run should not
 need those features):
 
 1.) colored labels
 
  Because withcolor doesn't work; but now that I intercept textext,
 maybe I can do some dirty tricks there.

why dirty ... i made you:

textext(\\colored[r=.5,g=.3]{your text}

 2.) drawing points with TeX
 \setupGNUPLOTterminal[context][points=tex]
 \defineconversion[gnuplot:pointset][x,+,$\circ$]
 
  Because I first need to rewrite some code that used some dirty
 tricks with \startTeXtexts.
 
 3.) changing font with gnuplot commands
 set title Nice Title font iwona,20

textext(\\definedfont[iwona at 20pt]{your text})

 PS: despite switching to mkiv, reports still don't get written by
 themselves :) :) :)

will happen in mkmm (mark mojca miklavec, to be written in 2048)

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Gnuplot should now work on MKIV

2008-12-03 Thread Mojca Miklavec
On Wed, Dec 3, 2008 at 7:00 PM, Hans Hagen wrote:
 Mojca Miklavec wrote:
 Hello,

 since Aditya was asking yesterday: I finally patched the gnuplot
 module to work with mkiv.

 There are still some parts for which I'm almost sure that they don't
 work (I didn't test, but at least an average gnuplot run should not
 need those features):

 1.) colored labels

  Because withcolor doesn't work; but now that I intercept textext,
 maybe I can do some dirty tricks there.

 why dirty ... i made you:

 textext(\\colored[r=.5,g=.3]{your text}

The main problem was that one had to intercept the string (the
terminal gives the same output for all marks). The hint that you
gave me an hour ago lead me to the following solution that seems to
work OK:

vardef [EMAIL PROTECTED](expr txt) =
let,=@;

save r, g, b;
r = redpart   gp_color_current;
g = greenpart gp_color_current;
b = bluepart  gp_color_current;

rawtextext(\colored[r=  decimal(r)  ,g=  decimal(g)  ,b= 
decimal(b)  ]{  txt  })
enddef ;

Writing the string \colored[...] directly would need heavy
modifications in the terminal. Now this hack works really nice.

 3.) changing font with gnuplot commands
 set title Nice Title font iwona,20

 textext(\\definedfont[iwona at 20pt]{your text})

But that requires modifications to terminal again  incompatibility
with output between engines. I'll try to figure out how to do
something similar as above. I would like to write this as
\sometxt[gp][iwona,20pt]{The Title}. I just need to redefine the
meaning of \sometxt somehow.

 PS: despite switching to mkiv, reports still don't get written by
 themselves :) :) :)

 will happen in mkmm (mark mojca miklavec, to be written in 2048)

I thought that was planned for 2068? (At least that was what Ton said,
or rather sang.)

Mojca
___
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
___


Re: [NTG-context] Gnuplot should now work on MKIV

2008-12-03 Thread Mojca Miklavec
On Wed, Dec 3, 2008 at 7:58 PM, Hans Hagen wrote:
 Mojca Miklavec wrote:
 On Wed, Dec 3, 2008 at 7:00 PM, Hans Hagen wrote:

 3.) changing font with gnuplot commands
 set title Nice Title font iwona,20
 textext(\\definedfont[iwona at 20pt]{your text})

 But that requires modifications to terminal again  incompatibility
 with output between engines. I'll try to figure out how to do
 something similar as above. I would like to write this as
 \sometxt[gp][iwona,20pt]{The Title}. I just need to redefine the
 meaning of \sometxt somehow.

 in any case ... you need to save and restore the meaning of textext
 because we have one session of mp;

 begingroup ;
 save textext ;

Thanks. That's a good point. I'll add it.

 vardef ... ;
 plotting like a gnu ... ;
 endgroup ;

 alternatively we can use a dedicated mp instance; since you only use
 textext that would be just the plain format plus mp-gnup.mp or something
 like that; next time we meet we should sit down and do that

Thanks :)

(But be careful with promisses ... The Czech Republic is [almost] our
neighbour.)



One more question ... When checking for luatex inside metapost (to be
able to branch code depending on engine) - what's the best thing to
ask for?

a) if known context_mlib: ...
b) \startLUATEX\startMPextensions mark := 4; \stopMPextensions\stopLUATEX
if mark = 4: ...
c) something else

Thanks,
Mojca
___
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
___


Re: [NTG-context] Gnuplot should now work on MKIV

2008-12-03 Thread Henning Hraban Ramm
Am 2008-12-03 um 19:27 schrieb Mojca Miklavec:
 PS: despite switching to mkiv, reports still don't get written by
 themselves :) :) :)

 will happen in mkmm (mark mojca miklavec, to be written in 2048)

 I thought that was planned for 2068? (At least that was what Ton said,
 or rather sang.)


Hm, with MkII and MkIV numbered roman, MkMM would mean Mark 2000 -  
and since it needed some years to get from Mark 2 to Mark 4, it could  
last even longer than 2068, don't you think?
;-)


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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
___


Re: [NTG-context] gnuplot module

2008-04-17 Thread Mojca Miklavec
On Wed, Apr 16, 2008 at 9:24 PM, John Devereux wrote:
 Mojca Miklavec writes:

  I really like gnuplot and the gnuplot module. It is great to be able
  to include the data inline with the document. And it would be nice to
  see it part of the distribution. I am using a stock debian gnuplot, so
  I don't know the implications of the context and TikZ terminals.

No major difference. But it would (should, at least) be compatible
with all the three: LaTeX/plain/ConTeXt.

  Does
  it mean I would not end up with so many  *-gnuplot-* files? :)

When I have developed the terminal with enormous Hans's and Taco's
help, I have asked him to implement some functionality to delete the
files with ctxtools --purge. He has implemented some functionality
(\registertempfile or something - need to check), but it deletes the
files automatically at the end of run, so one either needs to:
- delete the files
- leave the files
- no option to delete files with ctxtools
The problem with deleting the files immediately is that if you make a
trivial mistake in the gnuplot script, gnuplot won't create any
output, and it's rather difficult to spot the error in the long bunch
of ConTeXt messages. You just get no graphic, any you wonder why.

Do you have any suggestions about how to reduce the number of files in
some sensible way?

Mojca
___
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
___


Re: [NTG-context] gnuplot module

2008-04-17 Thread Mojca Miklavec
On Thu, Apr 17, 2008 at 4:27 PM, John Devereux wrote:
 Mojca Miklavec writes:

   Do you have any suggestions about how to reduce the number of files in
   some sensible way?

  The ideal would be an option when processing the source file, to turn
  off file deletion. Like

  texexec document.tex --keep-temporaries

  So by default the source directory would be kept clean, but when
  debugging the intermediate files would be available.

  Or perhaps some option passed to \startGNUPLOTscript (or
  \useGNUPLOTgraphic) if that is possible?

   \startGNUPLOTscript[example][keeptemporaryfile=yes]

This sounds fine (having a --debug-like option), but one more question
- what about caching existing results? (If all files are deleted, then
it's not possible to ask for --ifchanged, so gnuplot needs to be run
each time.)

  That might be better otherwise debugging a big document could result
  it hundreds of files.

  Another possibility would be to put the files in /tmp.

That's not too practical.

Mojca
___
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
___


Re: [NTG-context] gnuplot module

2008-04-17 Thread John Devereux
Mojca Miklavec [EMAIL PROTECTED] writes:

 On Thu, Apr 17, 2008 at 4:27 PM, John Devereux wrote:
 Mojca Miklavec writes:

   Do you have any suggestions about how to reduce the number of files in
   some sensible way?

  The ideal would be an option when processing the source file, to turn
  off file deletion. Like

  texexec document.tex --keep-temporaries

  So by default the source directory would be kept clean, but when
  debugging the intermediate files would be available.

  Or perhaps some option passed to \startGNUPLOTscript (or
  \useGNUPLOTgraphic) if that is possible?

   \startGNUPLOTscript[example][keeptemporaryfile=yes]

 This sounds fine (having a --debug-like option), but one more question
 - what about caching existing results? (If all files are deleted, then
 it's not possible to ask for --ifchanged, so gnuplot needs to be run
 each time.)

Actually the configurable temp dir would be OK too.

  texexec document.tex --tempdir=./temporaries

Regarding cacheing, this would be nice but I don't know if it can be
done. I think you still need to run gnuplot in case the data has
changed.

  That might be better otherwise debugging a big document could result
  it hundreds of files.

  Another possibility would be to put the files in /tmp.

 That's not too practical.



-- 

John Devereux
___
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
___


Re: [NTG-context] gnuplot ConTeXt

2007-03-01 Thread Peter Münster
On Wed, 28 Feb 2007, Aditya Mahajan wrote:

 m-gnuplot is found before t-gnuplot on my system. I know that 
 m-gnuplot has been removed from the core packages, but I (and I guess 
 most people) update using ctxtools --update, which will not delete the 
 existing m-gnuplot.

Hello Aditya,
for this reason I wrote updateConTeXt.sh
( http://pmrb.free.fr/work/OS/ConTeXt/updateConTeXt.sh ).
If you want to use it, you need to have your local files in a different
texmf tree (texmf-local for example and the ConTeXt tree in texmf-context).
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot ConTeXt

2007-02-28 Thread Aditya Mahajan
On Wed, 28 Feb 2007, Mojca Miklavec wrote:

 Hello,

 I've put the gnuplot binary for windows on
 http://modules.contextgarden.net/gnuplot-win, just in case that anyone
 is interested (Firefox has problems displaying that page, but I didn't
 figure out whether the problem lies in the garden, firefox or on my
 computer).

 Some functionality and documentation is still missing, but the
 interface should be stable now. If anyone would like to suggest what
 the default settings for some options should be, feel free to comment.
 I'm not sure if the current settings are all sensinble and there might
 still be time to change some.

I downloaded the gnuplot and a couple of tests. Few comments:

m-gnuplot is found before t-gnuplot on my system. I know that 
m-gnuplot has been removed from the core packages, but I (and I guess 
most people) update using ctxtools --update, which will not delete the 
existing m-gnuplot. So, to ensure that the new module is loaded, you 
must use

\usemodule[t][gnuplot]

I do not understand the need to create a batch file in Windows. I 
understand the naming mess in gnuplot, but can't you follow the same 
strategy as the bib module. That is allow the user to name the 
command, something like

\setupgnuplot[program=wgnuplot|pgnuplot|whatever]


 Gnuplot 4.2 will probably be released very soon. The context terminal
 might have chances to be included in the patchset 1, but the
 developers are reluctant to include it without any feedback from other
 users.


Please also include a demo file with the gnuplot module. If I 
were seriously considering using gnuplot, a demo file will help a lot. 
That will also allow you to find the syntax mistake in the 
examples at the end. You should hae

\startGNUPLOTscript[exp] instead of
\startGNUPLOTscript{exp} (square brackets, instead of braces)


 Even a few comments like it works for me on
 http://sourceforge.net/tracker/index.php?func=detailaid=1654807group_id=2055atid=302055
 or on the mailing list would probably help.

I will test it a bit more and then leave some feedback there also.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot ConTeXt

2007-02-28 Thread Mojca Miklavec
On 3/1/07, Aditya Mahajan wrote:
 On Wed, 28 Feb 2007, Mojca Miklavec wrote:

  Hello,
 
  I've put the gnuplot binary for windows on
  http://modules.contextgarden.net/gnuplot-win, just in case that anyone
  is interested (Firefox has problems displaying that page, but I didn't
  figure out whether the problem lies in the garden, firefox or on my
  computer).
 
  Some functionality and documentation is still missing, but the
  interface should be stable now. If anyone would like to suggest what
  the default settings for some options should be, feel free to comment.
  I'm not sure if the current settings are all sensinble and there might
  still be time to change some.

 I downloaded the gnuplot and a couple of tests. Few comments:

 m-gnuplot is found before t-gnuplot on my system. I know that
 m-gnuplot has been removed from the core packages, but I (and I guess
 most people) update using ctxtools --update, which will not delete the
 existing m-gnuplot. So, to ensure that the new module is loaded, you
 must use

 \usemodule[t][gnuplot]

But that is more ugly. I prefer to say explicitely to delete
m-gnuplot.tex rather than having to keep using [t] for ages. m-gnuplot
is/was a great starting point, but now obsolete anyway.

 I do not understand the need to create a batch file in Windows. I
 understand the naming mess in gnuplot, but can't you follow the same
 strategy as the bib module. That is allow the user to name the
 command, something like

 \setupgnuplot[program=wgnuplot|pgnuplot|whatever]

Thanks for the suggestion. The problem under windows is that gnuplot
usually doesn't reside in PATH anyway (in contrast to unix). Adding
such a setting in file would mean incompatibility when compiling the
same file on linux, but of course one could add
\setupgnuplot[program=wgnuplot] to cont-usr.tex. I just thought that
creating a batch file would be less problematic than hardcoding the
path in the module. But such an option can always be added.

  Gnuplot 4.2 will probably be released very soon. The context terminal
  might have chances to be included in the patchset 1, but the
  developers are reluctant to include it without any feedback from other
  users.


 Please also include a demo file with the gnuplot module. If I
 were seriously considering using gnuplot, a demo file will help a lot.
 That will also allow you to find the syntax mistake in the
 examples at the end. You should have

 \startGNUPLOTscript[exp] instead of
 \startGNUPLOTscript{exp} (square brackets, instead of braces)

Braces were used at the beginning (as in \startuseMPgraphic{name}),
but since \useGNUPLOTgraphic[name][1,3][width=4cm] needed optional
parameters, it was a bit inconsistent to have braces in one place and
brackets on the other.

Both should work. Well, at least they were supposed to work (or at
least I think that I remember them working). Apparently it doesn't.
I spent quite some time trying to support both brackets and braces,
but I didn't manage to make \useGNUPLOTgraphic{name} work.
\startGNUPLOTsript{name} doesn't complain, but doesn't seem to work
either. Never mind, it's not that important. I'll change the demos,
but I also need to improve them and write some general documentation.

Thanks a lot for suggestions  comments,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot in ConTeXt

2006-07-27 Thread Renaud AUBIN




Hi,

The ConTeXt term is now in development.
You have at least two or three alternatives (with one prefered
but in dev):
- use postscript term and include the resulting graphics with
externalfigure
- use mp term and process the MP buffer with metafun
- last but not least, use directly the context terminal...

For this one, you have to:
- compile and install gnuplot from source by adding context.trm in
gnuplot/term/ and adding context.trm to term.h (if you are on linux,
else on windows you can use the wiki's patched binary gnuplot
http://pub.mojca.org/gnuplot/bin/)
- get mp-gnuplot.mp and t-gnuplot.tex and copy these two files into
your current document directory
- use \usemodule[t-gnuplot] to bypass the gnuplot module distributed
with the ConTeXt release

Then, you can try:
\usemodule[t-gnuplot]

\starttext
\startGNUPLOTscript{abc}
plot sin(x)
\stopGNUPLOTscript

\useGNUPLOTgraphic[abc]
\useGNUPLOTgraphic[abc][width=\textwidth]
\stoptext

If you have any questions...

Cheers,

Renaud

Dalyoung Jeong a crit:

  Dear all,

I have installed gnuplot and others(aqua term, x11).
I tested the minimal sample file in ConTeXt Wiki.
In the wiki page, there is a command like

\startGNUPLOTgraphics{sin}
plot sin(x)
\stopGNUPLOTgraphics

but there is an error message like

l.6 \startGNUPLOTgraphics
  {sin}
? x

If I changed \startGNUPLOTgraphics{sin} to \startGNUPLOTgraphic{sin},  
then the error is disappeared but the output showed only texts but  
not graph. Only a grey box is appeared.

Would you please show me an example in detail?

Thank you for reading.

Dalyoung 
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


  




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-20 Thread Hans Hagen
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;  
let's worry about that later
 \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

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Gnuplot - suggestions wanted

2006-02-20 Thread Aditya Mahajan
--- On Feb 20, Mojca Miklavec wrote ---

 I've put some preliminary version of context terminal for gnuplot on
 http://pub.mojca.org/gnuplot/.

Looks really interesting.

 I've also uploaded a windows binary, but I don't give any warranty 
 for it (I'll upload a slightly fixed version soon).

I downloaded all the files from the bin directory to my gnuplot/bin 
directory. I get an error wgnuplot.exe - Unableto Locate Component
This application has failed to start because pdflib.dll was not found. 
Re-installing the application may fix this problem.

(Windows XP professional + cygwin + Miktex + stand alone context)

Installing using the source will have to wait for sometime for me.

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-19 Thread Mojca Miklavec
On 2/15/06, Renaud AUBIN wrote:
  Ok it is \setupGNUPLOT[method=mp,option=hlhr8r] but now
 how to deal with math like $\vec{x}$ ?

I don't have lucida, but how about this:
http://pub.mojca.org/gnuplot/sample/document.pdf?

(You can play with the source and files in other dicerctories as well,
but use at your own risk as long as it's experimental only.)

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-18 Thread Hans Hagen
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
 All I need to know is the keyword that you want to use and that would
 make sense. Epslatex uses the following syntax for example:
 set terminal epslatex header \usepackage{something}
 (Would anyone need that at all?)
   
two variants:

set terminal mp   verbatimtex   ...
set terminal context environment ...

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-17 Thread Mojca Miklavec
On 2/16/06, Renaud AUBIN wrote:

  Hi all,

  This time, I eventually use LaTeX with \usepackage{lucidabr} and set term
 pst to produce .ps, then use ps2epsi to obtain an .eps with a correct
 bounding box and to finish psttopdf. I include the resulting .pdf with the
 standard method... It is not the easy way !

I just noticed that epslatex terminal was improved considerably in
the new gnuplot version (4.1, you can download testing binaries for
windows).

Take a look.

On 2/16/06, Hans Hagen wrote:
 Mojca Miklavec wrote:
  It depends on terminal. With PostScript terminal you can't do math.
  With Metapost you can do math, but don't ask me how to change fonts to
  lucida (try read help terminal mp if it helps you). Anyway I'm
  affraid that you won't get lucida for math that way.
 
 if with mp you can do math, then you need to extend gnuplot with the
 option to configure verbatimtex ... etex so that one can instruct tex to
 load other fonts there.

If you process the files manually it's no problem to edit the
verbatimtex part of the resulting metapost output. However, this
cannot be done if the file is generated and included with the gnuplot
module.

I'll first finish the ConTeXt terminal and perhaps fix/improve mp
terminal on the basis of ConTeXt terminal later (or during writing
it).

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.)

All I need to know is the keyword that you want to use and that would
make sense. Epslatex uses the following syntax for example:
set terminal epslatex header \usepackage{something}
(Would anyone need that at all?)


My next question is going to be: how should I handle fonts in context
terminal? (But probably for another thread or for off-list discussions
only.)

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-16 Thread Renaud AUBIN





Hi all,

This time, I eventually use LaTeX with \usepackage{lucidabr} and "set
term pst" to produce .ps, then use ps2epsi to obtain an .eps with a
correct bounding box and to finish psttopdf. I include the resulting
.pdf with the standard method... It is not the easy way !

Now, considering the gnuplot module: I have seen that in the resulting
.gpd, there is a lot of ";" . Since all my .gp scripts are empty of ";"
at the end of lines, I'm asking if this is correct ?

Renaud

Renaud AUBIN a crit:

  
  
  
  
what is this hlhr8r? a font filename? 
  
  
hlhr8r -
/usr/local/texlive/2005/texmf-dist/fonts/tfm/bh/lucida/hlhr8r.tfm
It sets the metapost's defaultfont but maybe there is another method
than give a .tfm file I don't know.
  
()when installing lbr using texfont, did you (manually) move the math pfb files and tfm files? 

(maybe i should distribute the lbr math tfm files) 
  
  
I have the lbr math tfm files and they work fine in my document.
  
  

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
  




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-16 Thread Hans Hagen
Adam Lindsay wrote:
 Hans Hagen wrote:

   
 what is this hlhr8r? a font filename? 
 

 Yes, one of the Lucida ones.

   
 ()when installing lbr using texfont, did you (manually) move the math pfb 
 files and tfm files? 

 (maybe i should distribute the lbr math tfm files) 
 

 Or, maybe I should finish that type-dis typescript to adapt the current 
 ConTeXt internal names to the TUG-distributed lucida font names. Which 
 would you prefer? _In this case_, I would likely trust the hand-tuned 
 TFMs a bit more than texfont-generated ones.
   
for math i always use the ones supplied by yandy (i don't use the funny names) 

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-16 Thread Adam Lindsay
Hans Hagen wrote:
 Adam Lindsay wrote:
 Hans Hagen wrote:

   
 what is this hlhr8r? a font filename? 
 
 Yes, one of the Lucida ones.

   
 ()when installing lbr using texfont, did you (manually) move the math pfb 
 files and tfm files? 

 (maybe i should distribute the lbr math tfm files) 
 
 Or, maybe I should finish that type-dis typescript to adapt the current 
 ConTeXt internal names to the TUG-distributed lucida font names. Which 
 would you prefer? _In this case_, I would likely trust the hand-tuned 
 TFMs a bit more than texfont-generated ones.
   
 for math i always use the ones supplied by yandy (i don't use the funny 
 names) 

And for the text versions? That's what I was offering, to do a lot of:

\starttypescript [serif] [lucida] [texnansi]
   \definefontsynonym [texnansi-lbr]   [hlhr8y]  [encoding=texnansi]
etc.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
  Lancaster University, InfoLab21+44(0)1524/510.514
  Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-16 Thread Mojca Miklavec
On 2/15/06, Renaud AUBIN wrote:

  I'm trying to use the gnuplot mode (texlive+ ConTeXt 2006.02.03) and the
 command texexec --pdf --mode=demo m-gnuplot results in a m-gnuplot.pdf where
 only the png is correctly displayed... All the m-gnuplot-gnuplot-*.pdf are
 unknown...

  I assume I have missed something... But what ?

Not necessary. Gnuplot module might be a bit stubborn. I had many
problems, but they might have different reasons since many sifferent
pieces of software are sticked together:
- mp wanted to use cmr10, but that font was missing on standalone ConTeXt distr.
- texmfstart missing under windows
- gnuplot terminal compiled without pdf terminal
- missing TEXSYSTEM=miktex on windows box (or (p)gnuplot not present in path)
- on my personal I failed to compile gnuplot properly in order to produce PNGs
- serious problems with mptopdf under windows (CRITICAL!!!)

 Moreover, I use lucida fonts in my document. How to use lucida with this
 method ?

It depends on terminal. With PostScript terminal you can't do math.
With Metapost you can do math, but don't ask me how to change fonts to
lucida (try read help terminal mp if it helps you). Anyway I'm
affraid that you won't get lucida for math that way.

(I'll try to improve the metapost terminal a bit, but I have no idea
what to do with fonts.)

Perhaps you could use LaTeX (or any other LaTeX-related terminal like
PSTricks for that), but this is not supported by the module yet.

However, read my other mail(s) that I'll send today about set
terminal context. (I don't find any of the existing terminals good
enough, so I would like to make a superior one.)

  I have a working example with
 \setupGNUPLOT[method=mp,option=hlhr8r] but the math gives
 CM... Moreover, how to deals $\vec{x}$ or \Milli \Meter for example ?

Forget about ConTeXt commands with method=mp. This makes plain
metapost files and labes are processed with plain TeX, which doesn't
have any idea about the fonts you use in the document.

If you manage to make lucida work with plain TeX, the only option I
currently see is something like
set title '{\input my-defs \bf Title}'
where you store your definitions in a separate file or
set title '{\font\a=hlhr8r sa 2 \a Title}'
(just guessing, I don't know the exact syntax).

But you probably don't want to do that.

  This time, I eventually use LaTeX with \usepackage{lucidabr} and set term
 pst to produce .ps, then use ps2epsi to obtain an .eps with a correct
 bounding box and to finish psttopdf. I include the resulting .pdf with the
 standard method... It is not the easy way !

That's what I was talking about a bit earlier.

Hans, would it be possible to support pst terminal as well (PSTricks I
suppose)? This one needs more than one command to get the resulting
pdf I suppose. (I won't need it, but if there are other users who
could make use of it ...)

  Now, considering the gnuplot module: I have seen that in the resulting
 .gpd, there is a lot of ; . Since all my .gp scripts are empty of ; at
 the end of lines, I'm asking if this is correct ?

Ask Hans. I don't know why he likes them so much (I would remove
them), but they should be harmless. They're there because of
\def\obeyedline{;\systemendofline}%

---

And a final word: I finally installed something to compile gnuplot
with yesterday. I have the first pre-alpha ;) set terminal context
working and I will need both Hans and Taco's hand as well as
gnuplot/metafun users to help me with
suggestions/requests/brainstorming about how to implement certain
parts, so that the output will remain highly configurable regarding
fonts, colors  styles, but more about that in another mail.

(Some serious problems with mptopdf on windows disturb me a lot, but I
hope I'll find a way out. I can't make textext work, so I'm using the
standalone ConTeXt in the moment, but this has to be fixed for other
MikTeX users as well.)

Mojca


On 2/16/06, Adam Lindsay wrote:
 And for the text versions? That's what I was offering, to do a lot of:

 \starttypescript [serif] [lucida] [texnansi]
\definefontsynonym [texnansi-lbr]   [hlhr8y]  [encoding=texnansi]
 etc.

Has nothing to do with Gnuplot, but I agree with Adam.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-16 Thread Hans Hagen
Mojca Miklavec wrote:
 It depends on terminal. With PostScript terminal you can't do math.
 With Metapost you can do math, but don't ask me how to change fonts to
 lucida (try read help terminal mp if it helps you). Anyway I'm
 affraid that you won't get lucida for math that way.
   
if with mp you can do math, then you need to extend gnuplot with the 
option to configure verbatimtex ... etex so that one can instruct tex to 
load other fonts there

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Taco Hoekwater
Renaud AUBIN wrote:
 
 Hi all,
 
 I'm trying to use the gnuplot mode (texlive+ ConTeXt 2006.02.03) and the 
 command texexec --pdf --mode=demo m-gnuplot results in a m-gnuplot.pdf 
 where only the png is correctly displayed... All the 
 m-gnuplot-gnuplot-*.pdf are unknown...
 
 I assume I have missed something... But what ?

The conversion of the gnuplot output from postscript to pdf fails. It
attempts to execute this commandline:

   texmfstart newpstopdf --method=raw \GNUPLOTfile.ps

where \GNUPLOTfile is e.g. m-gnuplot-gnuplot-0

You can try the command on the commandline to see where it goes wrong.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Renaud AUBIN

Hi Taco, happy to read you again :-) !

I don't have texmfstart. It is a win script, isn't it ? I have a debian 
box. Maybe I have to do some hacks in m-gnuplot.
I have try ruby 
/usr/local/texlive/2005/texmf-dist/scripts/context/ruby/newpstopdf.rb 
--method=raw m-gnuplot-gnuplot-1.ps and it works...
If I use a .gp file as input, do I have to use the same method ?
Moreover, I use lucida fonts in my document. How to use lucida with this 
method ?

Cheers,

Renaud

The conversion of the gnuplot output from postscript to pdf fails. It
attempts to execute this commandline:

   texmfstart newpstopdf --method=raw \GNUPLOTfile.ps

where \GNUPLOTfile is e.g. m-gnuplot-gnuplot-0

You can try the command on the commandline to see where it goes wrong.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


  


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Hans Hagen
Renaud AUBIN wrote:
 Hi Taco, happy to read you again :-) !

 I don't have texmfstart. It is a win script, isn't it ? I have a debian 
 box. Maybe I have to do some hacks in m-gnuplot.
 I have try ruby 
 /usr/local/texlive/2005/texmf-dist/scripts/context/ruby/newpstopdf.rb 
 --method=raw m-gnuplot-gnuplot-1.ps and it works...
   
texmfstart is a ruby script (in scritps/context/ruby);  Normally there 
should be a copy without suffix in some bin path
 If I use a .gp file as input, do I have to use the same method ?
 Moreover, I use lucida fonts in my document. How to use lucida with this 
 method ?
   
depends on how you installed the lucidas's 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Renaud AUBIN




Hi Hans,


  texmfstart is a ruby script (in scritps/context/ruby);  Normally there 
should be a copy without suffix in some bin path
  

No... I have put a copy in /usr/local/bin and texexec --pdf --mode=demo
m-gnuplot works now.

  depends on how you installed the lucidas's 
  

texfont --en=ec --ve=bh
--co=lucida --in --ma

Renaud


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Renaud AUBIN






  
depends on how you installed the lucidas's 
  
  
  texfont --en=ec --ve=bh
--co=lucida --in --ma

Ok it is \setupGNUPLOT[method=mp,option="hlhr8r"] but now how to deal
with math like $\vec{x}$ ?


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Hans Hagen
Renaud AUBIN wrote:
 Hi Hans,

 texmfstart is a ruby script (in scritps/context/ruby);  Normally there 
 should be a copy without suffix in some bin path
   
 No... I have put a copy in /usr/local/bin and texexec --pdf 
 --mode=demo m-gnuplot works now.
 depends on how you installed the lucidas's 
   
 texfont --en=ec --ve=bh --co=lucida --in --ma
could you process the produced texnansi-bh-lucida file? if so, lucida should 
work ok 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Renaud AUBIN






  could you process the produced texnansi-bh-lucida file? if so, lucida should work ok 

  


Do you mean \loadmapfile[texansi-bh-lucida.map] ? If so, I already use
\loadmapfile[ec-bh-lucida.map] (Lucida works well for my document) and
according to http://wiki.contextgarden.net/Gnuplot section "More
complex example with MetaPost" I have "to play with set terminal
mp {fontname}" !?

I have a working example with \setupGNUPLOT[method=mp,option="hlhr8r"]
but the math gives CM... Moreover, how to deals $\vec{x}$ or \Milli
\Meter for example ?

Renaud


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Hans Hagen
Renaud AUBIN wrote:

 could you process the produced texnansi-bh-lucida file? if so, lucida should 
 work ok 

   

 Do you mean \loadmapfile[texansi-bh-lucida.map] ? If so, I already use 
 \loadmapfile[ec-bh-lucida.map] (Lucida works well for my document) and 
 according to http://wiki.contextgarden.net/Gnuplot section More 
 complex example with MetaPost I have to play with |set terminal mp 
 {fontname}| !?

 I have a working example with \setupGNUPLOT[method=mp,option=hlhr8r] 
 but the math gives CM... Moreover, how to deals $\vec{x}$ or \Milli 
 \Meter for example ?
what is this hlhr8r? a font filename? 

()when installing lbr using texfont, did you (manually) move the math pfb files 
and tfm files? 

(maybe i should distribute the lbr math tfm files) 

Hans 
 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Renaud AUBIN






  what is this hlhr8r? a font filename? 
  

hlhr8r -
/usr/local/texlive/2005/texmf-dist/fonts/tfm/bh/lucida/hlhr8r.tfm
It sets the metapost's defaultfont but maybe there is another method
than give a .tfm file I don't know.

  
()when installing lbr using texfont, did you (manually) move the math pfb files and tfm files? 

(maybe i should distribute the lbr math tfm files) 
  

I have the lbr math tfm files and they work fine in my document.



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot mode

2006-02-15 Thread Adam Lindsay
Hans Hagen wrote:

 what is this hlhr8r? a font filename? 

Yes, one of the Lucida ones.

 ()when installing lbr using texfont, did you (manually) move the math pfb 
 files and tfm files? 
 
 (maybe i should distribute the lbr math tfm files) 

Or, maybe I should finish that type-dis typescript to adapt the current 
ConTeXt internal names to the TUG-distributed lucida font names. Which 
would you prefer? _In this case_, I would likely trust the hand-tuned 
TFMs a bit more than texfont-generated ones.

adam
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
  Lancaster University, InfoLab21+44(0)1524/510.514
  Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot for Mojca

2006-01-03 Thread Mojca Miklavec
On 1/2/06, Peter Münster wrote:
 Hi Mojca,
 if you're still looking for a gnuplot module, here is one:

Yes, I'm still looking for it.

 http://pmrb.free.fr/work/OS/ConTeXt/t-gnuplot.tex

Thanks a lot. I've learnt a lot from the example, it's only that in
the way it's written now it's not compatible with windows.

I've made a gnuplot.bat. It can be called with
gnuplot somescript
epstopdf somescript
where somescript is something like
set terminal postscript eps # should be added automatically
set output someuniquename # should be added automatically
plot sin(x) # between \startGnuplot ... \stopGnuplot

My question is: how can I put this into the same buffer (file) without
using OS-specific commands? (piping didn't work)

The rewritten version of the module works if I add the first two lines
manually between \startGnuplot ... \stopGnuplot, but that should be
done automatically by the module itself.

I looked into metafun code, but it's still too complicated for me to
understand it and use it for gnuplot.

Gnuplot would also need some kind of \startGnuplotinclusions for stuff like
set nokey
set xlabel time
plus the lines for setting the terminal which would automatically be added.

(I don't like the postscript terminal itself, but that module s a good start.)

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot for Mojca

2006-01-03 Thread Peter Münster
On Tue, 3 Jan 2006, Mojca Miklavec wrote:

 Thanks a lot. I've learnt a lot from the example, it's only that in
 the way it's written now it's not compatible with windows.

Hello Mojca,
if you are using Windows, you can install MinGW, it's free and bash is
included.

 Gnuplot would also need some kind of \startGnuplotinclusions for stuff like
 set nokey
 set xlabel time
 plus the lines for setting the terminal which would automatically be added.

or something like \setupGnuplot with keys=vals!

 (I don't like the postscript terminal itself, but that module s a good start.)

At least, it's not bitmap. But there is a white border around the plot. It
would be nice to have a clipping-option in \externalfigure.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot for Mojca

2006-01-03 Thread Mojca Miklavec
On 1/3/06, Peter Münster wrote:
 On Tue, 3 Jan 2006, Mojca Miklavec wrote:

  Thanks a lot. I've learnt a lot from the example, it's only that in
  the way it's written now it's not compatible with windows.

 Hello Mojca,
 if you are using Windows, you can install MinGW, it's free and bash is
 included.

OK, that could be file for me and maybe for two others, but this can't
be a general solution. (Beginners wouldn't install it and the skilled
ones have linux anyway.)

So my question for gurus remains: how to write a macro, so that

\startGnuplotinclusions
set title trigonometry
\stopGnuplotinclusions
\startGnuplot
plot sin(x)
\stopGnuplot
\startGnuplot
plot cos(x)
\stopGnuplot

would result in one file with

set terminal postscript
set output filename1
set title trigonometry
plot sin(x)

and the other one with

set terminal postscript
set output filename2 # If too complicated, the filename may remain the same
set title trigonometry
plot cos(x)

Out of curiosity: does metafun check if the buffers were changed, so
that compiling again the same file is skipped next time?
(For a little module as this one it's too little gain for too much anyway.)

  Gnuplot would also need some kind of \startGnuplotinclusions for stuff like
  set nokey
  set xlabel time
  plus the lines for setting the terminal which would automatically be added.

 or something like \setupGnuplot with keys=vals!

Well, ... yes. That also, of course. Those could be use to set engine
to postscript/eps/metapost/png/... or even LaTeX. (But for the
beginning, I would be greatful for even the dummiest possible
solution.)

If ConTeXt terminal would be written, maybe this could be used also
for setting symbols, default colors, ... etc.

  (I don't like the postscript terminal itself, but that module s a good 
  start.)

 At least, it's not bitmap.

I use LaTeX as the terminal otherwise (but your module can be
modoified to use LaTeX terminal and convert into PDF as well).

If I will find some time and additional motivation (sorry, less
motivation for other things), I would like to modify the
metapost.trm. It's only 1000 lines (postscript is a bit longer), but
very well structured code and much better understandable than TeX
which is still cryptography for me. (Even in that case I would still
need a lot of help from the ConTeXt side.)

 But there is a white border around the plot. It
 would be nice to have a clipping-option in \externalfigure.

I would prefer to leave the border in this case as the default
behaviour (for example if you have two graphs with different labels,
you want the graphs to have the same size, not cropped because of
slightly different name for the y axis), but I vote for that feature
too. (Hans?)

Some time ago Hans mentioned that texexec can crop, but I didn't
manage to make it work (it was converting from PDF to PS and back, but
it didn't crop anything). There's a nice working script on CTAN
(http://www.ctan.org/tex-archive/support/pdfcrop/) for cropping. I
guess that texexec could do that as well, but some half year ago as I
tried it, I had no luck.

Thanks again for all that,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] gnuplot for Mojca

2006-01-03 Thread Hans Hagen

Mojca Miklavec wrote:


Some time ago Hans mentioned that texexec can crop, but I didn't
manage to make it work (it was converting from PDF to PS and back, but
it didn't crop anything). There's a nice working script on CTAN
(http://www.ctan.org/tex-archive/support/pdfcrop/) for cropping. I
guess that texexec could do that as well, but some half year ago as I
tried it, I had no luck.

 


(new)pstopdf can crop (bound)

long ago i made a perl script called cropcrap which will be in the 
next distribution under the name pdftrimwhite (the more decent name as 
suggested by karl berry); however, this script works on pdf files


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context