From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60523 Path: news.gmane.org!not-for-mail From: Oliver Buerschaper Newsgroups: gmane.comp.tex.context Subject: Re: Passing info from MetaPost to TeX Date: Fri, 30 Jul 2010 08:20:23 +0200 Message-ID: References: <4C48A86C.7050505@wxs.nl> <14EF1920-A946-478D-A0F6-FE67F0E66933@mpq.mpg.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280470836 18309 80.91.229.12 (30 Jul 2010 06:20:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Jul 2010 06:20:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 30 08:20:34 2010 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 1OeixN-0000uw-Pp for gctc-ntg-context-518@m.gmane.org; Fri, 30 Jul 2010 08:20:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13912C9D5B; Fri, 30 Jul 2010 08:20:33 +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 Dl2MpWH0ExcA; Fri, 30 Jul 2010 08:20:29 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 260A0C9CB1; Fri, 30 Jul 2010 08:20:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5409C9CB1 for ; Fri, 30 Jul 2010 08:20:27 +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 5NMIT3qWXUke for ; Fri, 30 Jul 2010 08:20:24 +0200 (CEST) Original-Received: from post.rzg.mpg.de (post.rzg.mpg.de [130.183.30.42]) by balder.ntg.nl (Postfix) with ESMTP id CF4BAC9B88 for ; Fri, 30 Jul 2010 08:20:24 +0200 (CEST) Original-Received: from [192.168.0.2] (g224207238.adsl.alicedsl.de [92.224.207.238]) (authenticated bits=0) by post.rzg.mpg.de (8.14.3/8.14.3) with ESMTP id o6U6KN4g1786046 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 30 Jul 2010 08:20:24 +0200 In-Reply-To: <14EF1920-A946-478D-A0F6-FE67F0E66933@mpq.mpg.de> X-Mailer: Apple Mail (2.1081) 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:60523 Archived-At: No answer :-( Does that mean it's impossible with current technology? Oliver >>> is it possible to pass data from MetaPost back to TeX? This would be similar in spirit to, say, the MetaPost variable BodyFontSize that contains data from the TeX surrounding. Just the other way round. >> >> maybe future mlib versions will provide something like that (writing something from mp to a lua table); currently you have to use a file or interpret the log (use show to print out values). > > OK. What I have in mind is to vertically align a diagram with the math axis... something like: > > --- > \startuseMPgraphic{diagram} > u := StrutHeight; > draw origin--(2u,0)--(u,sqrt(3)*u)--cycle; > % MathAxis at y-coordinate sqrt(3)*u/3 > \stopuseMPgraphic > > > \starttext > > \startformula > A\useMPgraphic{diagram} > =B > \stopformula > > \stoptext > --- > > It would be great if the comment could be turned into a processing instruction for ConTeXt such that the triangle's center of mass ends up on the math axis of the formula. > > What's the best way to achieve this? > > Many thanks, > Oliver ___________________________________________________________________________________ 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 ___________________________________________________________________________________