From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83675 Path: news.gmane.org!not-for-mail From: Sanjoy Mahajan Newsgroups: gmane.comp.tex.context Subject: \externalfigure doesn't find mps file in subdirectory Date: Sun, 4 Aug 2013 09:04:52 -0400 Message-ID: <87k3k138uj.fsf@approx.mit.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1375621510 17382 80.91.229.3 (4 Aug 2013 13:05:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Aug 2013 13:05:10 +0000 (UTC) To: Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 04 15:05:13 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V5xzk-0001hK-Ed for gctc-ntg-context-518@m.gmane.org; Sun, 04 Aug 2013 15:05:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6FB9C1020D; Sun, 4 Aug 2013 15:04:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LlTqIKC15Vpb; Sun, 4 Aug 2013 15:04:32 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id AD8DF101EE; Sun, 4 Aug 2013 15:04:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9B56D101EE for ; Sun, 4 Aug 2013 15:04:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zbai4TF2Da4r for ; Sun, 4 Aug 2013 15:04:21 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id DA2D2101EA for ; Sun, 4 Aug 2013 15:04:21 +0200 (CEST) Original-Received: from EXCAS02.olin.edu (excas02.olin.edu [208.91.55.40]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r74D4ulG004864 for ; Sun, 4 Aug 2013 15:04:57 +0200 Original-Received: from approx.mit.edu (72.93.171.152) by EXCAS02.olin.edu (10.1.15.27) with Microsoft SMTP Server (TLS) id 8.3.298.1; Sun, 4 Aug 2013 09:04:55 -0400 Original-Received: from sanjoy by approx.mit.edu with local (Exim 4.80) (envelope-from ) id 1V5xzQ-0008Mx-Gd for ntg-context@ntg.nl; Sun, 04 Aug 2013 09:04:52 -0400 User-Agent: Notmuch/0.15.2 (http://notmuchmail.org) Emacs/24.3.1 (i486-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=208.91.55.40; country=US; region=MA; city=Needham; postalcode=02492; latitude=42.2793; longitude=-71.2450; metrocode=506; areacode=781; http://maps.google.com/maps?q=42.2793,-71.2450&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QK8B4VMj - 346a0509142f - 20130804 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:83675 Archived-At: \externalfigure won't find a metapost eps file in a subdirectory, if the mps has the numerical (.1) extension. Here's a minimal example (test.tex): \setupexternalfigures[directory={fig}] \starttext \externalfigure[simple.1] \stoptext where fig/simple.1 is from a simple .mp file that fills a 1-cm box (see below). The resulting test.pdf shows the gray box name : simple.1 file : simple.1 state: unknown Only this combination of circumstances triggers the problem. Giving the full path ("\externalfigure[fig/simple.1]") works fine, as does renaming the file to simple.mps (within the fig/ directory), as does using instead simple-1.pdf (made with mptopdf). Thus, I have several workarounds, but it might be useful to figure out what is not working. I've noticed this problem on and off for a while now, but only now made a minimal example. (Is the path-searching code trying to append extensions and directory prefixes at the same time, and thus not finding the file?) This is with MkIV 2013.05.28 from vanilla TL2013. For completeness, here's simple.1, although any file will show the problem equally well: %!PS %%BoundingBox: 0 0 29 29 %%HiResBoundingBox: 0 0 28.34645 28.34645 %%Creator: MetaPost 1.803 %%CreationDate: 2013.08.04:0841 %%Pages: 1 %%BeginProlog %%EndProlog %%Page: 1 1 0 0 0 setrgbcolor newpath 0 0 moveto 28.34645 0 lineto 28.34645 28.34645 lineto 0 28.34645 lineto closepath fill showpage %%EOF -Sanjoy ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________