From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60378 Path: news.gmane.org!not-for-mail From: Oliver Buerschaper Newsgroups: gmane.comp.tex.context Subject: Re: Passing info from MetaPost to TeX Date: Sat, 24 Jul 2010 20:35:10 +0200 Message-ID: <14EF1920-A946-478D-A0F6-FE67F0E66933@mpq.mpg.de> References: <4C48A86C.7050505@wxs.nl> 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 1279996566 28761 80.91.229.12 (24 Jul 2010 18:36:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Jul 2010 18:36:06 +0000 (UTC) To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sat Jul 24 20:36:03 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 1OcjZn-0006P9-R9 for gctc-ntg-context-518@m.gmane.org; Sat, 24 Jul 2010 20:35:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BB0DAC9AD9; Sat, 24 Jul 2010 20:35:58 +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 Euyr0o4H8-5o; Sat, 24 Jul 2010 20:35:58 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1651C9AB7; Sat, 24 Jul 2010 20:35:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A7053C9AB7 for ; Sat, 24 Jul 2010 20:35:53 +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 drwgAglf950r for ; Sat, 24 Jul 2010 20:35:51 +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 2DA84C9AAF for ; Sat, 24 Jul 2010 20:35:51 +0200 (CEST) Original-Received: from [192.168.0.3] (g229012204.adsl.alicedsl.de [92.229.12.204]) (authenticated bits=0) by post.rzg.mpg.de (8.14.3/8.14.3) with ESMTP id o6OIZAe41437878 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sat, 24 Jul 2010 20:35:50 +0200 Resent-Message-Id: <201007241835.o6OIZAe41437878@post.rzg.mpg.de> Resent-From: Oliver Buerschaper In-Reply-To: <4C48A86C.7050505@wxs.nl> Resent-Date: Sat, 24 Jul 2010 20:35:50 +0200 Resent-To: mailing ConTeXt users list for 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:60378 Archived-At: >> 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 ___________________________________________________________________________________