[NTG-Context] Problem with \usemodule[graph] and El Capitan (mac OS)
Dear all, I have updated my OS to El Capitan, and all my scripts including MPgraph functions such as gdata do not work anymore (script without such functions are working without any trouble). Would someone know how to get rid of this issue? I thank you very much. a short code sample: x:=u*1cm; a1:=6; a2:=5; hauteury:=a1*y; echelleMEP:=1/10*hauteury/a2; gdata("explexpl.d",s, y1:= scantokens(s1); y2:= scantokens(s2); draw (7.5*x, y1*echelleMEP)--(8.5*x, y2*echelleMEP) withcolor 0.6 white; ); Cheers! Louis-Solal
On 9/1/2016 10:11 AM, Louis-solal Giboin wrote:
Dear all, I have updated my OS to El Capitan, and all my scripts including MPgraph functions such as gdata do not work anymore (script without such functions are working without any trouble). Would someone know how to get rid of this issue? I thank you very much.
a short code sample:
x:=u*1cm;
a1:=6;
a2:=5;
hauteury:=a1*y;
echelleMEP:=1/10*hauteury/a2;
gdata("explexpl.d",s,
y1:= scantokens(s1);
y2:= scantokens(s2);
draw (7.5*x, y1*echelleMEP)--(8.5*x, y2*echelleMEP) withcolor 0.6 white;
);
incomplete ... how is this called ... what is explexl.d ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Sorry for this.
Here is the according file. Just 2 column of numbers to plot.
16.93429581 17.08794271
39.91477806 11.5140781
25.84303601 15.29926581
29.02100495 22.51433344
44.2082181 20.02069787
17.44431352 6.71762636
4.597520054 2.320767331
19.03839935 18.60809407
34.21582138 29.65482603
I have then enclosed everything related to this figure.
Please excuse my poor coding skills.
Cheers,
Louis-Solal
2016-09-01 10:50 GMT+02:00 Hans Hagen
On 9/1/2016 10:11 AM, Louis-solal Giboin wrote:
Dear all, I have updated my OS to El Capitan, and all my scripts including MPgraph functions such as gdata do not work anymore (script without such functions are working without any trouble). Would someone know how to get rid of this issue? I thank you very much.
a short code sample:
x:=u*1cm;
a1:=6;
a2:=5;
hauteury:=a1*y;
echelleMEP:=1/10*hauteury/a2;
gdata("explexpl.d",s,
y1:= scantokens(s1);
y2:= scantokens(s2);
draw (7.5*x, y1*echelleMEP)--(8.5*x, y2*echelleMEP) withcolor 0.6 white;
);
incomplete ... how is this called ... what is explexl.d
----------------------------------------------------------------- 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/list info/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ____________________________________________________________ _______________________
Hi, I am on El Capitan as well (10.11.6). ConTeXt ver: 2016.08.29 22:53 MKIV beta Attached is an altered input file that works for me. No idea how much of the problem is actually related to El Capitan, but: * \usemodule[graph] defines a special MP instance called ‘graph’. You need to use that because otherwise the metapost graph macros will not load (that is why I added the “graph::” prefix twice) * Something is wrong with the file closing, so I added an extra definition for 'graph_close_file' (no idea why it does not work out of the box. Sorry to you and Hans). Best wishes, Taco
Dear Taco,
I thank you very much for your time.
It works perfectly and I will emulate these modifications in my other
figures. I have no ideas about the problem, I just figured out that it came
from El Capitan because I updated the OS yesterday, however I also had to
reinstall MacTex, so it may also come from a different version of ConText?
Dear Hans,
I would like to thank you for all your work on Metafun, as it is the tool I
use now exclusively for all my scientific figures.
Best regards,
Louis-Solal
2016-09-01 11:43 GMT+02:00 Taco Hoekwater
Hi,
I am on El Capitan as well (10.11.6).
ConTeXt ver: 2016.08.29 22:53 MKIV beta
Attached is an altered input file that works for me. No idea how much of the problem is actually related to El Capitan, but:
* \usemodule[graph] defines a special MP instance called ‘graph’. You need to use that because otherwise the metapost graph macros will not load (that is why I added the “graph::” prefix twice)
* Something is wrong with the file closing, so I added an extra definition for 'graph_close_file' (no idea why it does not work out of the box. Sorry to you and Hans).
Best wishes, Taco
____________________________________________________________ _______________________ 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 ____________________________________________________________ _______________________
On 9/1/2016 11:43 AM, Taco Hoekwater wrote:
Hi,
I am on El Capitan as well (10.11.6).
ConTeXt ver: 2016.08.29 22:53 MKIV beta
Attached is an altered input file that works for me. No idea how much of the problem is actually related to El Capitan, but:
* \usemodule[graph] defines a special MP instance called ‘graph’. You need to use that because otherwise the metapost graph macros will not load (that is why I added the “graph::” prefix twice)
* Something is wrong with the file closing, so I added an extra definition for 'graph_close_file' (no idea why it does not work out of the box. Sorry to you and Hans).
there are save's in mp-grap ... i'll remove them
Best wishes, Taco
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
No, this is a feature, not a bug! According to the original graph macros, the data files are kept open, and thus subsequent reads will pick up successive data sets in a single file. This is explicitly stated in the documentation. A consequence for us in ConTeXt mkiv, where the metapost code is called in multiple passes, is that one must explicitly close the data file if one does not want this feature. This, too, I documented. So don't break John Hobby's code by removing the saved. Alan
On Sep 1, 2016, at 04:28, Hans Hagen
wrote: On 9/1/2016 11:43 AM, Taco Hoekwater wrote:
Hi,
I am on El Capitan as well (10.11.6).
ConTeXt ver: 2016.08.29 22:53 MKIV beta
Attached is an altered input file that works for me. No idea how much of the problem is actually related to El Capitan, but:
* \usemodule[graph] defines a special MP instance called ‘graph’. You need to use that because otherwise the metapost graph macros will not load (that is why I added the “graph::” prefix twice)
* Something is wrong with the file closing, so I added an extra definition for 'graph_close_file' (no idea why it does not work out of the box. Sorry to you and Hans).
there are save's in mp-grap ... i'll remove them
participants (4)
-
Alan Braslau
-
Hans Hagen
-
Louis-solal Giboin
-
Taco Hoekwater