From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27456 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt + asymptote Date: Tue, 25 Apr 2006 09:04:45 +0200 Message-ID: <444DCA0D.5080505@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 1145948704 17317 80.91.229.2 (25 Apr 2006 07:05:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 07:05:04 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 25 09:05:04 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 1FYHbV-0005Co-2q for gctc-ntg-context-518@m.gmane.org; Tue, 25 Apr 2006 09:04:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 62301127B7; Tue, 25 Apr 2006 09:04:55 +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 16864-02; Tue, 25 Apr 2006 09:04:48 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B187127B3; Tue, 25 Apr 2006 09:04:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E349F127B3 for ; Tue, 25 Apr 2006 09:04:47 +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 16399-10 for ; Tue, 25 Apr 2006 09:04:46 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id AD4AB12780 for ; Tue, 25 Apr 2006 09:04:45 +0200 (CEST) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 14031 for ; Tue, 25 Apr 2006 11:04:45 +0400 User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) 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:27456 Archived-At: Sanjoy Mahajan wrote: >> context parses the ps code and converts it to pdf and in the process >> uses tex to do the fonts >> > > %%Page: 1 1 > 0 0.5 dtransform truncate idtransform setlinewidth pop > 1 setlinecap > 1 setlinejoin > gsave > 0 0 translate > newpath 273.998159 412.742829 moveto > 338.001841 412.742829 lineto > ... > stroke > showpage > looks parsable > asy -t tex labelbox.asy [make eps, use plain tex for labels] > > which is failing, I think, in this line from the intermediate > labelbox_.tex file: > > \setbox\ASYpsbox=\hbox{\epsfbox{labelbox_0.eps}}% > > But I haven't figured out who generates labelbox_0.eps and why it isn't > being generated when using tex but is when using latex. Obviously I > haven't found all the places where latex is hardwired into asymptote. > > And even what I did is incomplete. The latex interface code spits out > e.g. \fontsize{12}{14.4}, which I just ignore if plain tex is being > used. > > Compared to the monster .eps files that asymptote produces, I now love > metapost's simple postscript files and one-line, easily parsed font > commands. > if metapost had path bound specials and a few more features ... > From: "Mojca Miklavec" > >> But I've given up once I saw how harcoded LaTeX was in there. >> > > I've pretty much given up too. > from what you describe it sounds like generic usage was not one part of the design > >> Metapost support in ConTeXt is much deeper and I wonder how much work >> should be invested into making as good support for Asymptote in >> ConTeXt as it is now for metapost. >> > > Whoever is game can start with the diff below, but I'm also not sure > it's worth it. My ideal figure program: > > 1. Agnostic about the tex engine (tex/latex/context), easy to integrate > with any of them. MP is good here. > 2. 3D built in. > 3. Modern color models (cmyk, transparency) > and even then, most of that has to take place in the backend in order to get proper integration (efficiency and such), so if for instance mp had a model for arbitrary collections, like: (r,g,b) == (c,m,y,k) => (a,b,c,d,...) actually, colors in mp are just triplets > 4. Decent syntax. MP is a bit ghastly, and writing macros is horrible > esp. with vardefs. I prefer a non-macro language, and asymptote is > good that way > well, mp misses a few things but should not be compared to tex (different model for globals, grouping, functions) > But it's a lot of work to get it right. > > -Sanjoy > > `A society of sheep must in time beget a government of wolves.' > - Bertrand de Jouvenal > > > diff -r 57c230047c98 base/babel.asy > --- a/base/babel.asy Tue Feb 07 23:34:29 2006 -0500 > +++ b/base/babel.asy Tue Apr 25 00:28:42 2006 -0400 > @@ -1,4 +1,6 @@ void babel(string s) > void babel(string s) > { > + if (texengine == "tex") > + abort("No babel package in plain TeX."); > texpreamble("\usepackage["+s+"]{babel}"); > } > such code should not be inline, but in a config file or variable, seeing this i'd say: for the moment forget about patching since it's hard to keep up with such changes btw, it should be: if texengine == latex then texpreamble ... else you need an abort for each macro package > diff -r 57c230047c98 base/fontsize.asy > --- a/base/fontsize.asy Tue Feb 07 23:34:29 2006 -0500 > +++ b/base/fontsize.asy Tue Apr 25 00:28:42 2006 -0400 > @@ -1,1 +1,3 @@ texpreamble("\usepackage{type1cm}"); > + etc 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 -----------------------------------------------------------------