What determines where MetaPost searches for a .mpx file?
karl at freefriends.org
Sat Jul 6 01:06:05 CEST 2019
I believe the mpx filename is the input name with .mp replaced by .mpx.
>From this line:
Preloading the plain mem file, version 1.005) ) (./gr/mp/ch1.mp
I guess that latexmk is running mpost on ./gr/mp/ch1.mp.
Therefore I'd expect the mpx to be ./gr/mp/ch1.mpx.
Your path says:
ensure_path( 'MPINPUTS', './mp//' );
.. and that does not include ./gr/mp. I'd try making MPINPUTS be .// also.
As for this:
ensure_path( 'MPSUPPORT', './/' );
MPSUPPORT is about troff, so don't bother :).
$ MPINPUTS="../../mp//:$MPINPUTS" TEXINPUTS="../../sty:$TEXINPUTS" mpost ch1
If problems persist, my next suggestion is to take latexmk out of the
loop. Run mpost by hand, the way it is running it, from the top level,
giving a relative path as the input. Also, setting the envvar
KPATHSEA_DEBUG=-1 and redirecting stderr to a file will report lots of
stuff about the file opening, though I admit I don't know offhand if it
I agree it is difficult to discern what mpost is doing/expecting. If no
joy, let me know and we can get there eventually. --best, karl.
More information about the texhax