From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24487 Path: news.gmane.org!not-for-mail From: "John R. Culleton" Newsgroups: gmane.comp.tex.context Subject: Re: Offtopic: TeX in MetaPost? Date: Mon, 19 Dec 2005 10:06:56 -0500 Organization: WexfordPress Message-ID: <200512191006.56700.john@wexfordpress.com> References: <43A6D1A5.9010902@econ.muni.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135008774 24141 80.91.229.2 (19 Dec 2005 16:12:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2005 16:12:54 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 19 17:12:51 2005 Return-path: 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 1EoNZT-0003o3-7c for gctc-ntg-context-518@m.gmane.org; Mon, 19 Dec 2005 17:09:07 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C97E812830; Mon, 19 Dec 2005 17:09:05 +0100 (CET) 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 21741-01; Mon, 19 Dec 2005 17:09:00 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B6167127EC; Mon, 19 Dec 2005 17:09:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E25C7127EC for ; Mon, 19 Dec 2005 17:08:58 +0100 (CET) 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 16123-08 for ; Mon, 19 Dec 2005 17:08:57 +0100 (CET) Original-Received: from mta13.adelphia.net (mta13.mail.adelphia.net [68.168.78.44]) by ronja.ntg.nl (Postfix) with ESMTP id 5FFAA127DD for ; Mon, 19 Dec 2005 17:08:56 +0100 (CET) Original-Received: from 69-168-15-53.chvlva.adelphia.net ([69.168.15.53]) by mta13.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051219160851.HIMC26442.mta13.adelphia.net@69-168-15-53.chvlva.adelphia.net>; Mon, 19 Dec 2005 11:08:51 -0500 Original-To: ntg-context@ntg.nl, quasar@econ.muni.cz User-Agent: KMail/1.7.2 In-Reply-To: <43A6D1A5.9010902@econ.muni.cz> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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:24487 Archived-At: On Monday 19 December 2005 10:28 am, Michal Kvasni?ka wrote: > Good evening. > > I apologize that I dare to post here such offtopic, but I feel this is > the right place to get an answer. > I try to write some general-purpose MetaPost macros for me with > ConTeXt-like interface. For instance, I'd like something like this: > label(point, "label=$A$, xlabel=$x_A$, ylabel=$y_A$, > ylabelshift=left, lines=no, dotstyle=bigdot, ..."); > I've done a lot of work and it almost works, but ... I failed to notice > that TeX sequences are in normal cases included between btex ... etex > and are preprocessed. In other words, they cannot be typeset as a > string. I could use TEX macro, but it slows the process down in a > horrible way. > > I think the best way is this: In the first run of MetaPost to flush out > all TeX codes, then process it with TeX (texexec), and then to include > it in the second MetaPost run. But I don't know how to do it? Can you > help me or at least hint where I could find an answer? And BTW, is this > a good idea at all? Isn't there a better/faster way? > > Many thanks for you kind help. > Michal Kvasnicka I presume you are familiar with Metafun which already provides a Metapost facility in Context. Before you reinvent round objects called wheels please look over the additional facilities provided by Pstricks, which can be run using Context and the approproiate module.m-pstric.tex. Instructions are embedded in the module. It may well be that the kind of diagrams you are seeking to create in Metapost are already available via Pstricks. There is a very readable Pstricks manual and a supplement. How do Pstricks and Metapost differ? Well Pstricks is a higher level language, aimed at creating specific things like x/y charts, tree diagrams and so on. Matrapost is a lower level, more generalized facility. Most tasks can be done in either. Common cases will be more easily handled in Pstricks. More unusual situations will require the more general power of Metapost. John Culleton