From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31107 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \sometxt bodyfontsize in staticMPfigure (2006.09.27 beta) Date: Fri, 29 Sep 2006 09:12:39 +0200 Message-ID: <451CC767.60808@wxs.nl> References: 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 1159513982 18489 80.91.229.2 (29 Sep 2006 07:13:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Sep 2006 07:13:02 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 29 09:13:00 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 1GTCYH-0008GA-Om for gctc-ntg-context-518@m.gmane.org; Fri, 29 Sep 2006 09:12:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6EFB61FF5A; Fri, 29 Sep 2006 09:12:53 +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 24514-02-3; Fri, 29 Sep 2006 09:12:46 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 41D941FFA5; Fri, 29 Sep 2006 09:12:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9611B1FFA5 for ; Fri, 29 Sep 2006 09:12:43 +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 24514-02-2 for ; Fri, 29 Sep 2006 09:12:37 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id 0C6D61FF5A for ; Fri, 29 Sep 2006 09:12:36 +0200 (CEST) Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 10585 for ; Fri, 29 Sep 2006 09:12:36 +0200 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 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:31107 Archived-At: Sanjoy Mahajan wrote: > Hans Hagen wrote: > > this is runtime tex into passed to the graphic ... imagine that we > flush this to the mp file ... it can contain info that is not known in > that session (like overlay info) which willbreak the mp run > > the issue here is that a static graphic is processed in another, > independent run, that's the whole idea behind static graphics (quick > hack for independent graphics) > > That makes sense. So should I use reusableMPgraphic instead of > staticMPfigure? My figures started as standalone mpost figures that I > incorporate chapter by chapter into the ConTeXt source file. I was > using staticMPfigure because I'd noticed the code in the ConTeXt sources > and it's so fast. > > we can spend a lot of time to make it more advanced but within a year > from now we will have mp as a library in tex which will reduce runtime > to nearly zero (at least that 's what experiments show) so .... > > Great! Although earlier you had said, when I wondered whether > pdftex+lua will make it easier to meld tex and metapost: > > not really, for that we need mp as a library (we did experiments with > simulating that but it's kind of tricky) > > concerning lua ... i do have a mkiv file on my machine that uses lua > to parse the mp output (precursor to mp natively spitting out such > code); currently its a bit slower (two step conversion ps -> lua -> > tex) but when using many pen shapes its faster because then we don't > need the tex based concat code; also, less (and cleaner) code is > needed for parsing > > Oh I understand what you were saying: that pdftex+lua is not sufficient > for clean metapost intergration, one also needs metapost as a library (I > guess in lua?). Anyway, don't bother to answer that. Develop in peace, > and I'm looking forward to the result (and will be happy to test when > that's useful). > > what we can do [for staticMPfigure] is pass info from the mpenvironment" > > It works well, thanks for another instant improvement. The 2006.09.28 > beta passes the following test case (I will commit it to the contexttest > repository). It gives a 12pt "outside sometxt" and a 20pt "in sometxt": > > ============= with-static.tex ================================ > \startMPenvironment > \setupbodyfont[20pt] > \stopMPenvironment > > \starttext > > \startstaticMPfigure{fig} > label(\sometxt{in sometxt},origin); > \stopstaticMPfigure > > outside sometxt\quad > \usestaticMPfigure[fig] > \stoptext > ============================================= > > Another difference (not important to fix, just a strange corner case) > between staticMPfigure and reusableMPgraphic is the depth of the > resulting box. With staticMPfigure, the 'in sometxt' is raised to have > its baseline about at the midline of the 'outside sometxt': > > ============= with-static12.tex ================================ > \starttext > \startstaticMPfigure{fig} > label(\sometxt{in sometxt},origin); > \stopstaticMPfigure > outside sometxt\quad > \usestaticMPfigure[fig] > \stoptext > ============================================= > > In the reusableMPgraphic method, the outside and inside texts have their > baselines aligned: > > ============= with-reusable12.tex ================================ > \starttext > \startreusableMPgraphic{fig} > label(\sometxt{in sometxt},origin); > \stopreusableMPgraphic > outside sometxt\quad > \reuseMPgraphic{fig} > \stoptext > ============================================= > > BUT: I don't need this fixed! It's a corner case I happened to notice, > and I'm noting it in case it indicates a bug in the box manufacturing. > 'See loose thread, any loose thread, pull thread' is how I debug. > consider a static graphic to be(have) like an external figure, it's basically mp code processes as startMPpage .. stopMPpage Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------