[metapost] mptopdf corrupts source file
oliver.buerschaper at mpq.mpg.de
Fri Jan 15 10:08:40 CET 2010
I'm experiencing some issues with mptopdf in different scenarios...
Suppose there are no errors in the MetaPost source file. Then the mptopdf program included in (a fresh) TeXLive 2009 seems to rename "file.mp" to "file" and then create "file.mp" again during compilation. The result: front ends like TeXShop track the original file and one ends up with the source "file" rather than "file.mp" opened in the editor window. After editing you can only typeset again if you "Save as" before. Quite annoying. In TeXLive 2008 the problem doesn't occur.
Now assume that the MetaPost source file does contain an error. Then it's copied to "file.mp.copy" by mptopdf. This file is what the front end keeps opened. Hence correcting the error in the editor window and recompiling again needs a "Save as" beforehand which is rather time-consuming. This bug occurs both in TeXLive 2008 and 2009.
Also in some cases mptopdf appears to append empty lines to the source file. Still investigating though.
More information about the metapost