From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33948 Path: news.gmane.org!not-for-mail From: nicola Newsgroups: gmane.comp.tex.context Subject: Relationship among mptopdf, mpost and latex Date: Sun, 25 Mar 2007 17:36:00 +0200 Organization: --- Message-ID: 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: sea.gmane.org 1174837009 31876 80.91.229.12 (25 Mar 2007 15:36:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2007 15:36:49 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 25 17:36:42 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HVUls-0004tG-Sa for gctc-ntg-context-518@m.gmane.org; Sun, 25 Mar 2007 17:36:40 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C40C0200B3; Sun, 25 Mar 2007 17:36:39 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30072-02; Sun, 25 Mar 2007 17:36:33 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 89593200A5; Sun, 25 Mar 2007 17:36:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9FAB6200A5 for ; Sun, 25 Mar 2007 17:36:31 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29115-03 for ; Sun, 25 Mar 2007 17:36:27 +0200 (CEST) Original-Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by ronja.ntg.nl (Postfix) with ESMTP id 774CE200A2 for ; Sun, 25 Mar 2007 17:36:27 +0200 (CEST) Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HVUlV-0002Ao-1M for ntg-context@ntg.nl; Sun, 25 Mar 2007 17:36:17 +0200 Original-Received: from host40-5.pool8175.interbusiness.it ([81.75.5.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Mar 2007 17:36:17 +0200 Original-Received: from vitacolo by host40-5.pool8175.interbusiness.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Mar 2007 17:36:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 66 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: host40-5.pool8175.interbusiness.it User-Agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:33948 Archived-At: Hi, some time ago I needed to include a png file into a MetaPost picture and I did it with the MetaFun macro externalfigure. I compiled the code with mptopdf and the result was fine. Since I had no previous experience with it, my code used LaTeX, not ConTeXt, for the labels. I have recently updated my distributions (TeX Live 2007 and gwTeX on Mac OS X) and the same code does not work any longer in either distribution. A minimal example reproducing the problem is as follows: verbatimtex %&latex \documentclass{article} \begin{document} etex beginfig(0); externalfigure "pic.png" scaled 15mm shifted origin; label.bot(btex $x$ etex, origin); endfig; end; The error mptopdf gives is: ! Undefined control sequence. l.44 \documentclass {article} as if the code were not interpreted as LaTeX code. I have tried the following two variants, but with no positive results: 1) I have used input TEX; TEXPRE("%&latex" & char(10) & "\documentclass{article}\begin{document}"); TEXPOST("\end{document}"); instead of the verbatimtex.. etex block, and label.bot(TEX("x_1"), origin); to draw the label. In this case, mptopdf does not complain, but I see '0' instead of the label in the output. 2) I have added input mp-tool; input mp-spec; to both the original code above and to variant 1) and I have typeset with mpost. The results are original code) the png picture is not shown in the output; variant 1) I get the error: ! Unable to make mpx file. l.3 btex x_1 etex So, I kindly ask someone to help me tidy things up. In particular: a) Is it possible to include the MetaFun macros when using mpost? b) Is it possible to use the %&latex syntax with mptopdf? Nicola