MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`
Dear ConTeXt folks, looking for graphics example and therefore searching the list I found the answer from David Arnold in the ntg-context list thread »OT: looking for metapost/fun examples« [1]. It is for plain MetaPost and works fine with `mpost` after making sure to remove the line breaks inserted by the mail program. I then copied it into `\{start,stop}useMPgraphic`, removed the `end ;` and `{begin,end}fig` and replaced `{e,b}tex` by `textext()` but still get the following error. ! terminal: ! Redundant equation. <to be read again> ; <*> ...500; dt:=(tstop-tstart)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)-... ! Redundant equation. <to be read again> ; <*> ...start)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)--(b,c)--(b,d)--(a... . system > tex > error on line 39 in file arnold-2005.tex: terminal: ! Redundant equation. <to be read again> ; <*> ...500; dt:=(tstop-tstart)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)-... ! Redundant equation. <to be read again> ; <*> ...start)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)--(b,c)--(b,d)--(a... Does someone have an idea why this fails and how to fix it? Thanks, Paul [1] http://www.ntg.nl/pipermail/ntg-context/2005/009928.html
On 2011-12-11 Paul Menzel
[…]
I then copied it into `\{start,stop}useMPgraphic`, removed the `end ;` and `{begin,end}fig` and replaced `{e,b}tex` by `textext()` but still get the following error.
I didn't check you code (try to make a minimal example next time), but the problem seems to be the combination of equations and labels. When labels are present, the file is processed twice and the equations are also read twice (in MkIV). It hasn't been fixed for ages, that probably means it will stay. One workaround is to substitute the equations with assignments or to “save” the values beforehand. See also: http://archive.contextgarden.net/message/20101205.035356.1b7bfb72.en.html Marco
participants (2)
-
Marco
-
Paul Menzel