From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31044 Path: news.gmane.org!not-for-mail From: Sanjoy Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \sometxt in staticMPfigure Date: Wed, 27 Sep 2006 00:29:27 -0400 Message-ID: References: <4519898F.4070903@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1159333339 1119 80.91.229.2 (27 Sep 2006 05:02:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Sep 2006 05:02:19 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 27 07:02:13 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1GSRYg-0002KV-0k for gctc-ntg-context-518@m.gmane.org; Wed, 27 Sep 2006 07:02:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B8EAF1FE58; Wed, 27 Sep 2006 07:02:08 +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 22004-01-4; Wed, 27 Sep 2006 07:02:03 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D45DB1FE64; Wed, 27 Sep 2006 07:01:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A8A4C1FE5F for ; Wed, 27 Sep 2006 07:01:48 +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 22004-01-2 for ; Wed, 27 Sep 2006 07:01:39 +0200 (CEST) Original-Received: from elasmtp-banded.atl.sa.earthlink.net (elasmtp-banded.atl.sa.earthlink.net [209.86.89.70]) by ronja.ntg.nl (Postfix) with SMTP id A5AE41FE1F for ; Wed, 27 Sep 2006 07:01:34 +0200 (CEST) Original-Received: from [24.41.6.91] (helo=approximate.corpus.cam.ac.uk) by elasmtp-banded.atl.sa.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1GSRXv-0006uM-8v; Wed, 27 Sep 2006 01:01:23 -0400 Original-Received: from sanjoy by approximate.corpus.cam.ac.uk with local (Exim 4.60) (envelope-from ) id 1GSR31-0001z6-NM; Wed, 27 Sep 2006 00:29:27 -0400 Original-To: mailing list for ConTeXt users In-Reply-To: Your message of "Tue, 26 Sep 2006 22:11:59 +0200." <4519898F.4070903@wxs.nl> X-Mailer: MH-E 7.85; nmh 1.1; GNU Emacs 21.4.1 X-ELNK-Trace: dcd19350f30646cc26f3bd1b5f75c9f474bf435c0eb9d4786a166ed818d7c747670bb1a1f2997b791be488c35cdd54eb350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.41.6.91 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:31044 Archived-At: Hans Hagen wrote: the problem (if you look into the mp file) is that there is *no* beginfig; this is because we now use a more stupid (stripped down) variant of saving the graphic. Right, I looked into the mp file and saw the new plan. \startstaticMPfigure{fig} beginfig(1); boxit.h(btex h etex); drawboxed(h); endfig; \stopstaticMPfigure i'll add the b/e to the main macro. I briefly thought about adding the beginfig..endfig by hand, but I figured it would fail because texexec would wrap another beginfig..endfig around it -- since it didn't know that some parts of the file needed to go outside the beginfig..endfig. However, a simple experiment trumps a fine theory: I added the beginfig..endfig and it worked. But the theory wasn't all wrong. Here's a snippet of texexec-mpgraph.mp ============================================== beginfig(1); verbatimtex \global \loadfontfileoncetrue etex; input boxes beginfig(1) boxit.h(btex h etex ); drawboxed(h); endfig; ; endfig; ============================================== Not sure how metapost managed to deal with the nested beginfig's, but it did. Here's what the log said: 2 output files written: texexec-mpgraph.1 .. texexec-mpgraph.1 It looks like a fragile method. Instead the beginfig..endfig should be put in explicitly into the mp file (just as you said) and the inclusions should go outside the beginfig..endfig. -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal