[metapost] mpost does not work

Reinhard Kotucha reinhard.kotucha at web.de
Sat Nov 8 02:04:14 CET 2008

Karl Berry writes:
 >       $ kpsewhich mpost.mem
 > Sadly, kpsewhich mpost.mem does not return anything in my installation,
 > where mpost works fine and mpost.mem is present in the right place
 > (/usr/local/texlive/2008/texmf-var/web2c/metapost/mpost.mem in my case).
 > The same for kpsewhich tex.fmt, et al.  I'll look into that.

Hi Karl,
what works perfectly for me is "kpsewhich -format=mem mpost.mem".

There is a problem with kpsewhich -help.  The help message does not
describe what -progname or -format are actually doing.  There are many
examples for -format but it is quite unclear what happens if -format
is not specified on the command line. 

I suppose that -progname restricts kpsewhich to search in
texmf*/<progname> only.  If it's true, it would be nice if it's
explained in the help message.

The -format switch is more problematic.  I suppose that it has
something to do with filename extensions.  But instead of describing
how it works, the help message provides a list.  Most of the entries
are trivial, like

  gf: gf
  pk: pk 
  tfm: .tfm
  afm: .afm
  base: .base
  bib: .bib
  bst: .bst
but there are exceptions like

  other text files:

In many cases you don't have to specify -format at all but it's
unclear in advance whether it's required or not.

Using kpsewchich always requires trial-and-error strategies because
the underlying algorithm is not explained.  There is only a list of
formats, containing, for instance:

   cnf: .cnf

But what about .cfg files?  They are not mentioned in the help
message though they seem to be supported somehow.

I started a discussion about kpsewhich -help a few years ago but it
died quite abruptly after Paul Vojta said that everything is
perfectly documented in detail in the kpathsea sources.

But I had, and still have, the help message in mind, not the kpathsea
source code.

 > As a big hammer, you might consider installing the original MacTeX
 > from http://tug.org/mactex.  But hopefully the above will suffice.

The first thing I would do is to run fmtutil (not fmtutil-sys) and try

If this works, try something like

  find $HOME -name mpost.mem

and delete this file.

The most simple test which can be done is to try to run mpost '\end'
as root.  This should work because mpost.mem had been created
successfully by fmtutil-sys.

The most likely reason which explains the problem is that there is a
stale mpost.mem in $HOME.  


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the metapost mailing list