[metapost] mptopdf corrupts source file - Engines.tar.bz2 (1/1)

Franck Pastor franck.pastor at mac.com
Fri Jan 22 20:39:36 CET 2010

Le 17 janv. 10 à 15:12, Nicola a écrit :

> Let me clarify a bit. I have written two scripts:
> (1) metapost.engine: runs your source file through 'mpost'.
> (2) metafun.engine: runs your source file through 'mpost -mem=metafun'
> and then processes the output with 'mptopdf'. This shouldn't be any
> different from processing the source files directly with mptopdf (the
> main reason why the script doesn't do that is because mptopdf doesn't
> understand filenametemplate).
> So, you should use (2) whenever you need features from MetaFun/ 
> ConTeXt.
> Unfortunately, the script that is run when you choose 'mptopdf' in
> TeXShop preferences is (1), not (2) - which is certainly confusing. I
> will ask Richard Koch to fix that.

  If I understand well, (2) is fit for ConTeXt users, but not for  
LaTeX users (such as myself). Hence, in my opinion it is better to  
keep things as they are organised in TeXShop. What should be done is  
that your new version of (1) replaces the old one for the "mptopdf"  
option of TeXShop's preferences, since it produces PDF versions of  
each pictures, contrary to the old one.

> That said, (1) generates a preview document using LaTeX and (2)
> generates a preview document using ConTeXt (texexec). As you point  
> out,
> the preview document is not meant to be included in other documents.
> But, (2) *does* output a pdf for each figure (with mptopdf). And (1)
> does it in the updated version attached below (when the variable
> $CONVERTPDF is set to 1). In every case, the conversion to pdf is
> handled by mptopdf, so the bounding boxes should have the correct  
> size.

Did you send the new version of (1) to Richard Koch? This version, as  
I said, would make much more sense for the "mptopdf" option of  
TeXShop. I've already used this new version many times, and up to now  
I have not noticed anything wrong.

Many thanks for your very useful scripts!

Franck Pastor

More information about the metapost mailing list