All, I've run across an interesting bug that I haven't seen before. In the attached Metpost file, if I delete the last figure (beginfig(8)...endfig), the file compiles. However, with beginfig(8)...endfig, the file gives this error: [1] [2] [3] [4] [5] [6] [7] pen_pickup_->...part.penoffset.left.of.currentpen; pen_bot:=ypart.penoffset.r... <to be read again> ; l.499 pickup pencircle scaled 2pt; ? As the code in beginfig(8)...endfig is a simple copy and paste of the code in beginfig(1)...endfig, this is perplexing to say the least. If in beginfig(8)...endfig, I replace the lines %draw pendulum length pickup pencircle scaled 2pt; draw A--E; pickup defaultpen; with: %draw pendulum length draw A--E withpen pencircle scaled 2pt; Now the file will compile. This is strange indeed! Any ideas?
Hi David, it happens already in figure 6! By writing path left; ... path right; you have redefined internal things "left" and "right". With e. g. %draw spring block left path xleft; xleft:=(2,9)--(3,9)--(3,11)--(2,11)--cycle; xleft:=xleft scaled u; stripe_path_a(withcolor black)(draw) xleft withcolor white; draw (3u,9u)--(3u,11u); %draw spring block right path xright; xright:=(17,9)--(18,9)--(18,11)--(17,11)--cycle; xright:=xright scaled u; stripe_path_a(withcolor black)(draw) xright withcolor white; draw (17u,9u)--(17u,11u); it works. Regards, Hartmut ------------------------------------------------------------------------ Hartmut Henkel, Oftersheim, Germany ------------------------------------------------------------------------
participants (2)
-
David Arnold
-
Hartmut Henkel