[metapost] Bug report on metapost from texlive-2013

Michael D. Godfrey michaeldgodfrey at gmail.com
Mon Jan 27 04:50:05 CET 2014


I have found a failure in the mpost which is installed with texlive-2013
and with 2012. The last correct mpost appears to be from texlive_2010.
Attached are:

1. The mpost script to be processed by mpost and mptopdf in figs-2.mp
     Note that this requires -numbersystem=double

2. The correct output in figs-2.pdf

3. The incorrect output in figs-2-2013.pdf

The problem is that the tapered sin and cos functions disappear.
I tried a number of changes to the code, but could not make it work.

I will try the latest tar file and tell you if it works or not.

Michael





-------------- next part --------------
A non-text attachment was scrubbed...
Name: figs-2_2013.pdf
Type: application/pdf
Size: 74874 bytes
Desc: not available
URL: <http://tug.org/pipermail/metapost/attachments/20140126/25db3504/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figs-2.pdf
Type: application/pdf
Size: 208991 bytes
Desc: not available
URL: <http://tug.org/pipermail/metapost/attachments/20140126/25db3504/attachment-0003.pdf>
-------------- next part --------------
beginfig(2);
path p, pa, pb, pc, pd, pe;
numeric ix, ixl, ixr, iya, iyb, iyd, mu, sigma, tshft;
pi   := 3.14159;
dr   := 3.14159/180;
rd   := 1/dr;
ixl  := -6*pi;
ixr  := 6*pi;
mu   := 0;
sigma  := 6;
xscale := 8;
yscale := 34;
yshft  := 100;
p    := (0,0);
pa   := (0,0);
pb   := (0,0);
pc   := (0,yshft);
pd   := (0,yshft);
pe   := (0,yshft);
for ix = ixl step 0.01 until ixr:
  iya := (1/(sigma*sqrt(2*pi)))**(-(ix-mu)**2/(2*sigma**2));
  iz  := ix - ixl;
  iya := yscale*iya;
  iz  := xscale*iz;
  p   := p--(iz, iya);
  pc  := pc--(iz, iya+yshft);
  pb  := pb--(iz,-iya);
  pd  := pd--(iz, (-iya+yshft));
  iyb := sind(rd*ix)*iya;
  pa  := pa--(iz, iyb);
  iye := cosd(rd*ix)*(iya);
  pe  := pe--(iz, iye+yshft);
endfor;
draw p dashed evenly;
draw pa;
draw pb dashed evenly;
draw pc dashed evenly;
draw pd dashed evenly;
draw pe;
draw (9*xscale*pi, -yscale-36)--(9*xscale*pi,yscale) dashed evenly;
draw (6*xscale*pi, -yscale)--(6*xscale*pi,yscale) dashed evenly;
draw (3*xscale*pi, -yscale-36)--(3*xscale*pi,yscale) dashed evenly;
draw (9*xscale*pi, -yscale+yshft)--(9*xscale*pi,yscale+yshft) dashed evenly;
draw (6*xscale*pi, -yscale+yshft)--(6*xscale*pi,yscale+yshft) dashed evenly;
draw (3*xscale*pi, -yscale+yshft)--(3*xscale*pi,yscale+yshft) dashed evenly;
label.bot(btex Sine type etex, (6*xscale*pi, -10-yscale));
label.bot(btex Cosine type etex, (6*xscale*pi, -10-yscale+yshft));
label.bot(btex $\Delta t$ etex, (6*xscale*pi, -yscale-24));
drawarrow (6*xscale*pi-10,-yscale-30)--(3*xscale*pi,-yscale-30);
drawarrow (6*xscale*pi+10,-yscale-30)--(9*xscale*pi,-yscale-30);

endfig;
end


More information about the metapost mailing list