[metapost] mptopdf corrupts source file

Hans Hagen pragma at wxs.nl
Fri Jan 15 11:44:00 CET 2010

On 15-1-2010 10:08, Oliver Buerschaper wrote:
> Dear all,
> 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.


mptopdf --pdf --latex yourfile.mp


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the metapost mailing list