From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31104 Path: news.gmane.org!not-for-mail From: Sanjoy Mahajan Newsgroups: gmane.comp.tex.context Subject: MPenvironment ignored for btex..etex (or should I use sometxt)? Date: Fri, 29 Sep 2006 01:21:45 -0400 Message-ID: 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 1159507343 2276 80.91.229.2 (29 Sep 2006 05:22:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Sep 2006 05:22:23 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 29 07:22:20 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 1GTApH-00032l-JM for gctc-ntg-context-518@m.gmane.org; Fri, 29 Sep 2006 07:22:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B21441FECE; Fri, 29 Sep 2006 07:22:18 +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 12854-02-2; Fri, 29 Sep 2006 07:22:11 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E93571FF6C; Fri, 29 Sep 2006 07:22:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1FDB71FECE for ; Fri, 29 Sep 2006 07:22:07 +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 12854-02 for ; Fri, 29 Sep 2006 07:22:00 +0200 (CEST) Original-Received: from elasmtp-galgo.atl.sa.earthlink.net (elasmtp-galgo.atl.sa.earthlink.net [209.86.89.61]) by ronja.ntg.nl (Postfix) with SMTP id 0F7211FF6C for ; Fri, 29 Sep 2006 07:21:58 +0200 (CEST) Original-Received: from [24.41.6.91] (helo=approximate.corpus.cam.ac.uk) by elasmtp-galgo.atl.sa.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1GTAos-0007dK-IV; Fri, 29 Sep 2006 01:21:54 -0400 Original-Received: from sanjoy by approximate.corpus.cam.ac.uk with local (Exim 4.60) (envelope-from ) id 1GTAoj-00059B-Rg; Fri, 29 Sep 2006 01:21:45 -0400 Original-To: ntg-context@ntg.nl X-Mailer: MH-E 7.85; nmh 1.1; GNU Emacs 21.4.1 X-ELNK-Trace: dcd19350f30646cc26f3bd1b5f75c9f474bf435c0eb9d4786a166ed818d7c747dd83d17d02e3d70031f86f9c4464ea92350badd9bab72f9c350badd9bab72f9c 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:31104 Archived-At: I'm not sure what's going on here, but this file fails (2006.09.28 beta): [well I have a better idea now after writing out the whole email, see the end...] =================== 3.tex ================= \starttext \startMPenvironment \def\2{hello} \stopMPenvironment \startreusableMPgraphic{fig} label(btex \2 etex, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext ========================================= The error is (from 3.log): ============== error snippet =============== systems : begin file 3 at line 1 color : currentcolor (def) is not defined \openout7 = `3-mpgraph.mp'. ! Undefined control sequence. label(btex \2 etex, origin); \writecheckedMPgraphic ...icfalse \edef \ascii {#1 }\convertcommand \ascii \t... \startMPgraphic ...hic \writecheckedMPgraphic {#1} \stopwritingMPgraphic \handlereusableMPgraphic ...phic #3\stopMPgraphic \doifobjectssupportedelse ... \douseMPgraphic ...s [#1][#2]\getvalue {\@@MPG #1} {}\elabelgroup l.10 \reuseMPgraphic{fig} ? R etc. ============== error snippet =============== But 3-mpgraph.mp (produced after giving 'R' to enter nonstopmode) looks fine: =============== 3-mpgraph.mp ================ beginfig(1); verbatimtex \global \loadfontfileoncetrue \def \2{hello} etex; label(btex \2 etex , origin); ; endfig; let end=mprunend; end. =============== 3-mpgraph.mp ================ It processes by hand fine: $ mpost -mem=metafun 3-mpgraph ... 1 output file written: 3-mpgraph.1 (or by using the system(texmfstart ...) command in 3.log) Oh, wait, if metapost is fine with the file but ConTeXt isn't, then the error above must be from ConTeXt parsing the metapost code and seeing the \2, then complaining. So am I supposed to use the global option to \startMPenvironment? If it's needed in this case, I think it would be needed in every case (ConTeXt would see all the metapost uses of the definition). Or is btex deprecated and I should use \sometxt (except in loops)? Or am I just confused?! -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal