From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71164 Path: news.gmane.org!not-for-mail From: Nicola Newsgroups: gmane.comp.tex.context Subject: Re: "externalfigure" vs. "draw externalfigure" in metafun Date: Sat, 17 Sep 2011 11:11:48 +0200 Organization: --- Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1316250747 8152 80.91.229.12 (17 Sep 2011 09:12:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 17 Sep 2011 09:12:27 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 17 11:12:23 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4qwf-0004wV-HH for gctc-ntg-context-518@m.gmane.org; Sat, 17 Sep 2011 11:12:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1DF9DCAFA0; Sat, 17 Sep 2011 11:12:21 +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 NmBUoblvoRtb; Sat, 17 Sep 2011 11:12:18 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DF5B3CAF9D; Sat, 17 Sep 2011 11:12:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 18159CAF9D for ; Sat, 17 Sep 2011 11:12:16 +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 7wf6XsA0m9fW for ; Sat, 17 Sep 2011 11:12:04 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 85DD8CAF9C for ; Sat, 17 Sep 2011 11:12:04 +0200 (CEST) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p8H9C2FK009127 for ; Sat, 17 Sep 2011 11:12:04 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R4qwK-0004qb-Aw for ntg-context@ntg.nl; Sat, 17 Sep 2011 11:12:00 +0200 Original-Received: from 93.37.247.197 ([93.37.247.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 17 Sep 2011 11:12:00 +0200 Original-Received: from nvitacolonna by 93.37.247.197 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 17 Sep 2011 11:12:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 93.37.247.197 User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.12; country=NO; latitude=62.0000; longitude=10.0000; http://maps.google.com/maps?q=62.0000,10.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cFxJc2Eu - ab707a3d94a4 - 20110917 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:71164 Archived-At: In article , Mojca Miklavec wrote: > Dear Hans, > > I have problems with externalfigure inside metapost. > > In MKII, only > externalfigure "something.png"; > works, while in MKIV only > draw externalfigure "something.png"; > is accepted. > > Is there any chance to accept one of the syntaxes in both flavours? > > Thank you, > Mojca > > Minimal example: > > \starttext > \startMPpage > % only good for MKII > externalfigure "abc.png" xyscaled (5cm,8cm); > % only good for MKIV > % draw externalfigure "abc.png" xyscaled (5cm,8cm); > \stopMPpage > \stoptext Does the following workaround work for you? def mydraw text t = def f = begingroup t endgroup enddef; if picture f : draw f ; fi enddef; mydraw externalfigure "abc.png" xyscaled (5cm,8cm); Nicola ___________________________________________________________________________________ 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 ___________________________________________________________________________________