<div dir="ltr">Dear sir/madam,<br><br>I have found the following bug with the MetaPost "library".<br><br>The TEX.mp "package" is problematic if you're working with an output directory different from the cwd, because it incorrectly looks up the <a href="http://mptextmp.mp">mptextmp.mp</a> file.<br>
<br>To reproduce the problem, perform the following:<br>1. Create two directories: ~/1 and ~/2.<br>2. In ~/1, place the file `<a href="http://1.mp">1.mp</a>', containing:<br> > input TEX;<br> > draw TEX("1");<br>
> end<br><br>With CWD=~/1, invoke the following:<br> ~/1$ mpost -output-directory=../2 1<br><br>On my machine, this generates the error:<br>-----------------<br>! I can't find file `mptextmp'.<br><scantokens> input mptextmp<br>
<br><to be read again><br> endgroup<br><to be read again><br> ;<br>l.2 draw TEX("1");<br><br>Please type another input file name: <br>-------------------<br><br>I am not too familiar with MetaPost's file lookup mechanism, but I found that this can be fixed if, in the file TEX.mp, you change the line:<br>
25 > scantokens "input mptextmp"<br>To:<br>25 > scantokens "input <a href="http://mptextmp.mp">mptextmp.mp</a>"<br><br>Here's the info from 'mpost --version':<br><br>MetaPost 1.005 (Web2C 7.5.7)<br>
kpathsea version 3.5.7<br>Copyright 2008 AT&T Bell Laboratories.<br>Kpathsea is copyright 2008 Karl Berry and Olaf Weber.<br>There is NO warranty. Redistribution of this software is<br>covered by the terms of both the MetaPost copyright and<br>
the Lesser GNU General Public License.<br>For more information about these matters, see the file<br>named COPYING and the MetaPost source.<br>Primary author of MetaPost: John Hobby.<br>Current maintainer of MetaPost: Taco Hoekwater.<br>
Kpathsea written by Karl Berry, Olaf Weber, and others.<br><br>Thank you,<br>Ohad.<br></div>