[metapost] mptopdf and outputtemplate don't get along well

Franck Pastor franck.pastor at skynet.be
Mon Feb 15 22:41:01 CET 2010

Hello list,

Recently I discover  the new template mechanism  in MetaPost which  
makes use of the variable "outputtemplate". Since I always wanted to  
get rid of these strange "foo.1", "foo.2" file names, I heartily  
welcomed this new feature. However, it appears that the mptopdf script  
doesn't like it. For example, suppose I want to run a "foo.mp"  
metapost file, like this:

outputtemplate := "%j-%c.mps";
	draw unitsquare scaled 1cm;

then I observe this:

1) If I enter "mptopdf foo.mp", no pdf version of the picture is  
produced at all, only foo-1.mps.

2) If I enter now "mptopdf foo-1.mps", it works, but the pdf has got a  
somewhat ugly name: "foo-1-mps.pdf" (I expected "foo-1.pdf", as it is  
the case without outputtemplate setting).

Are these problems bugs, or features? I use MetaPost 1.208 and mptopdf  
1.3.3, from TeX Live 2009 (MacTeX).

Franck Pastor

More information about the metapost mailing list