* Bug with macro tightfunction (Metafun)
@ 2015-02-16 17:00 Fabrice Couvreur
2015-02-16 20:26 ` Pablo Rodriguez
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2015-02-16 17:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1227 bytes --]
Hi,
This code generates an error while it was working fine a month ago.
Best regards,
Fabrice
\definecolor[mycolor][c=.4,m=0,y=0,k=0]
\starttext
\start
\switchtobodyfont[small]
\startMPcode
input hvdm;
input tex;
l:=3mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma);
numeric xmin, xmax, ymin, ymax;
xmin := 0; xmax := 110; ymax :=8000 ;ymin:=0; u := 0.1cm; v:= 0.002cm;
color mycolor; mycolor:=(0.4,0,0);
drawoptions(withpen pencircle scaled 0.3pt withcolor
\MPcolor{mycolor});
draw hlingrid(ymin,ymax,1000,16cm,11cm);
draw vlingrid(xmin,xmax,10,11cm,16cm);
pickup pencircle scaled 1pt ;
arrowline ((xmin,0) -- (xmax,0)) scaled u;
arrowline ((0,ymin) -- (0,ymax)) scaled v;
drawoptions(withpen pencircle scaled 1pt);
draw tightfunction ("x", "x*x-84*x+5000", 0, 100, 0.01) xyscaled (u,v);
for i=0 step 10 until 100:
label.bot(TEX("$"&decimal(i)&"$"),(i*u,0));
endfor;
for i=0 step 1000 until 7000:
label.lft(TEX("$"&decimal(i)&"$"),(0,i*v));
endfor;
label.top("Nombre de lots",(90u,50v));
label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
\stopMPcode
\stop
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 2090 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug with macro tightfunction (Metafun)
2015-02-16 17:00 Bug with macro tightfunction (Metafun) Fabrice Couvreur
@ 2015-02-16 20:26 ` Pablo Rodriguez
2015-02-16 21:18 ` Hans Hagen
2015-02-16 21:20 ` Hans Hagen
2 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez @ 2015-02-16 20:26 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 02/16/2015 06:00 PM, Fabrice Couvreur wrote:
> Hi,
> This code generates an error while it was working fine a month ago.
Hi Fabrice,
MP is too much fun for me ;-)). I mean, this is all Greek to me.
I can only report that I get an empty page with both the latest beta
from 2015.02.03 23:55 and beta from 2014.11.26 21:43.
Just in case it might help,
Pablo
> \definecolor[mycolor][c=.4,m=0,y=0,k=0]
>
> \starttext
> \start
> \switchtobodyfont[small]
> \startMPcode
> input hvdm;
> input tex;
> l:=3mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
> defineDefaultArrow (l, r, alfa, beta, gamma);
> numeric xmin, xmax, ymin, ymax;
> xmin := 0; xmax := 110; ymax :=8000 ;ymin:=0; u := 0.1cm; v:= 0.002cm;
> color mycolor; mycolor:=(0.4,0,0);
> drawoptions(withpen pencircle scaled 0.3pt withcolor
> \MPcolor{mycolor});
> draw hlingrid(ymin,ymax,1000,16cm,11cm);
> draw vlingrid(xmin,xmax,10,11cm,16cm);
> pickup pencircle scaled 1pt ;
> arrowline ((xmin,0) -- (xmax,0)) scaled u;
> arrowline ((0,ymin) -- (0,ymax)) scaled v;
> drawoptions(withpen pencircle scaled 1pt);
> draw tightfunction ("x", "x*x-84*x+5000", 0, 100, 0.01) xyscaled (u,v);
> for i=0 step 10 until 100:
> label.bot(TEX("$"&decimal(i)&"$"),(i*u,0));
> endfor;
> for i=0 step 1000 until 7000:
> label.lft(TEX("$"&decimal(i)&"$"),(0,i*v));
> endfor;
> label.top("Nombre de lots",(90u,50v));
> label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
> \stopMPcode
> \stop
> \stoptext
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug with macro tightfunction (Metafun)
2015-02-16 17:00 Bug with macro tightfunction (Metafun) Fabrice Couvreur
2015-02-16 20:26 ` Pablo Rodriguez
@ 2015-02-16 21:18 ` Hans Hagen
2015-02-16 21:20 ` Hans Hagen
2 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2015-02-16 21:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 2/16/2015 6:00 PM, Fabrice Couvreur wrote:
> Hi,
> This code generates an error while it was working fine a month ago.
> Best regards,
> Fabrice
>
> \definecolor[mycolor][c=.4,m=0,y=0,k=0]
>
> \starttext
> \start
> \switchtobodyfont[small]
> \startMPcode
> input hvdm;
> input tex;
> l:=3mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
> defineDefaultArrow (l, r, alfa, beta, gamma);
> numeric xmin, xmax, ymin, ymax;
> xmin := 0; xmax := 110; ymax :=8000 ;ymin:=0; u := 0..1cm; v:=
> 0.002cm;
> color mycolor; mycolor:=(0.4,0,0);
> drawoptions(withpen pencircle scaled 0.3pt withcolor
> \MPcolor{mycolor});
> draw hlingrid(ymin,ymax,1000,16cm,11cm);
> draw vlingrid(xmin,xmax,10,11cm,16cm);
> pickup pencircle scaled 1pt ;
> arrowline ((xmin,0) -- (xmax,0)) scaled u;
> arrowline ((0,ymin) -- (0,ymax)) scaled v;
> drawoptions(withpen pencircle scaled 1pt);
> draw tightfunction ("x", "x*x-84*x+5000", 0, 100, 0.01) xyscaled
> (u,v);
> for i=0 step 10 until 100:
> label.bot(TEX("$"&decimal(i)&"$"),(i*u,0));
> endfor;
> for i=0 step 1000 until 7000:
> label.lft(TEX("$"&decimal(i)&"$"),(0,i*v));
> endfor;
> label.top("Nombre de lots",(90u,50v));
> label.lrt(btex $f(x)$ (en euros) etex,(0,7800v));
> \stopMPcode
> \stop
> \stoptext
what is:
input hvdm;
input tex;
both names are also candidates for name clashes
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug with macro tightfunction (Metafun)
2015-02-16 17:00 Bug with macro tightfunction (Metafun) Fabrice Couvreur
2015-02-16 20:26 ` Pablo Rodriguez
2015-02-16 21:18 ` Hans Hagen
@ 2015-02-16 21:20 ` Hans Hagen
2 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2015-02-16 21:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 2/16/2015 6:00 PM, Fabrice Couvreur wrote:
> Hi,
> This code generates an error while it was working fine a month ago.
tightfunction was redundant, use curvedfunction instead
(I have been cleaning up all that code as a prelude to an updat efor the
metafun manual)
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-16 21:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 17:00 Bug with macro tightfunction (Metafun) Fabrice Couvreur
2015-02-16 20:26 ` Pablo Rodriguez
2015-02-16 21:18 ` Hans Hagen
2015-02-16 21:20 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).