[metapost] Request: Filename extension for MetaPost output

Brooks Moses bmoses at stanford.edu
Wed May 18 22:00:26 CEST 2005


I'm not sure if this feature request has been brought up before or not, but 
a recent post on comp.text.tex reminded me of it, and I don't see anything 
similar in the list archives.  So:

A common gripe with MetaPost is that it produces output files that end in 
.1, .2, and so forth.  This causes no end of annoyances with systems that 
use the filename's extension to determine a file type; in particular, it 
causes problems with the \includegraphic system.

I suggest that this situation be remedied; that an option be added to 
MetaPost to produce output files with a fixed extension that indicates the 
type of the output.

I further suggest that this should be implemented in a flexible, 
user-defined way; some people prefer to have their MetaPost output in .eps 
files, some as .mps, and some may prefer other things.

The interface to this could be implemented in a couple of ways.  First, it 
could be implemented via a command-line option:

   mpost --extension=mps

Second, it could be implemented via a keyword accessable within MetaPost, 
such as the various prologues options.  For instance:

   filenameextension := "mps"

There is also the question of how to format the names of the files then 
generated, since they do still need to have the numbers included.  I would 
suggest "filename-1.mps", "filename-2.mps", and so on, although 
"filename.1.mps" is nearly as attractive.

- Brooks

More information about the metapost mailing list