[tex-live] metapost and relative paths (labels fail)

Taco Hoekwater taco at elvenkind.com
Mon Feb 15 17:23:58 CET 2010


Lars Madsen wrote:
> a bit more careful this time
> 
> assume a dir structure:
> 
> t2.mp
> sub/t1.mp
> 
> t2.mp:
> 
> beginfig(1);
> draw fullcircle scaled 3cm;
> label(btex $A$ etex, origin);
> endfig;
> end;
> 
> t1.mp:
> 
> verbatimtex
> %&latex
> \documentclass{article}
> \begin{document}
> etex
> input "../t2.mp"
> end;
> 
> 
> if I go to 'sub' and run
> 
> mpost t1.mp
> 
> I get the following error:
> 
> This is MetaPost, version 1.208 (kpathsea version 5.0.0)
> (./t1.mp (../t2.mp
>  >> t2.mp
>  >> t2.mpx
> ! Unable to make mpx file.
> l.3 label(btex
>                $A$ etex, origin);
> Transcript written on t1.log.
> 
> it seems the labeling feature want to create a mpx file for the included 
> file
> 
> this is a bit contrary to the way TeX handles input.
> 
> Is this a feature or a bug in mpost?
> 
> if t2.mp is moved to
> 
> sub/subsub/t2.mp
> 
> and we include that instead, I get a similar error.
> 
> Any ideas as to what have changed, and how this can be fixed?

A quick test indicated that the search for mp input (and generation of
mpx output) files for labels does not take the specified path into
account.

I'll apply a fix to the next metapost release, but for now probably
the only thing you can do is add '..' to the MPINPUTS search path.

Best wishes,
Taco








More information about the tex-live mailing list