From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29033 Path: news.gmane.org!not-for-mail From: John Bowman Newsgroups: gmane.comp.tex.context Subject: ConTeXt + asymptote Date: 29 Jun 2006 07:40:39 -0600 Message-ID: <20060629134039.12300.qmail@wizard.math.ualberta.ca> 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 1151600175 20870 80.91.229.2 (29 Jun 2006 16:56:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 16:56:15 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 29 18:56:14 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 1FvzoI-0000kY-Sx for gctc-ntg-context-518@m.gmane.org; Thu, 29 Jun 2006 18:56:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F170E128D8; Thu, 29 Jun 2006 18:56:10 +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 32474-05-3; Thu, 29 Jun 2006 18:56:05 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 58B9F128CA; Thu, 29 Jun 2006 18:56:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 18DDC1284D for ; Thu, 29 Jun 2006 15:40: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 20936-05 for ; Thu, 29 Jun 2006 15:40:49 +0200 (CEST) Original-Received: from eddy.math.ualberta.ca (eddy.math.ualberta.ca [129.128.207.36]) by ronja.ntg.nl (Postfix) with SMTP id 7737212847 for ; Thu, 29 Jun 2006 15:40:44 +0200 (CEST) Original-Received: (qmail 21533 invoked from network); 29 Jun 2006 13:31:03 -0000 Original-Received: from localhost (HELO wizard.math.ualberta.ca) (127.0.0.1) by localhost with SMTP; 29 Jun 2006 13:31:03 -0000 Original-Received: (qmail 12301 invoked by uid 9062); 29 Jun 2006 13:40:39 -0000 Original-To: ntg-context@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl X-Mailman-Approved-At: Thu, 29 Jun 2006 18:56:03 +0200 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:29033 Archived-At: In regard to adding support for ConTeXt or plain TeX to Asymptote, it should be no problem to do this, but perhaps someone on this list can help provide some preliminary information, particularly regarding item 1 below on how best to rotate text at an arbitrary angle. Also, since I am not sure what the precise planned use of a plain tex/ConTeXt engine here is, it isn't clear to me whether the miniltx solution below would be an acceptable solution. Perhaps someone can also explain why so many context users are interested in this feature? Why exactly can't they let Asymptote do its typesetting with latex behind the scenes and then import the resulting ps or pdf files in context? Is the issue just that latex might not be installed? If so, the miniltx style file (which appears to be part of plain tex) seems like a viable and simple solution. In regard to the remark I saw posted about "monster eps" files, use the -aZ option and you will see that Asymptote output files are as compact as those of MetaPost. If you want tex labels, you have to process MetaPost output through dvips, etc. Asymptote simply does this automatically, perhaps giving some users the illusion that Asymptote files are bigger. In other words, you should compare the final postscript files that MetaPost produces, not the intermediate ones (I recall that there is a MetaPost command for running MetaPost output through dvips too). Another issue I would be happy to discuss sometime is the need for implicit equation solving. We could add it, given an appropriate syntax, but the majority of uses I have seen for it are covered by the extension function in math.asy. I find the latter more explicit and less confusing to new users. But we could be persuaded to add something similar if someone can justify the need. Asymptote already includes an explicit linear solver that uses LU decomposition. Anyway here are the two features we would need from a plain tex/ConTeXt engine: 1. We will need to replace pstricks (which is used only for rotating text) with PostScript or PDF \special commands. There is a rotate.tex package in dvips but it would have to be modified to typeset at arbitrary angles... 2. We could use epsf to include PostScript figures or else the miniltx package. I see from some posts that some ConTeXt users are thinking of using \epsfbox instead of \includegraphics. Any preferences here? Alternatively, here is the miniltx solution, which would be trivial to provide support for in an upcoming release of Asymptote: Here's an example: asy -k venn Edit venn_.tex to look like this (then tex+dvips): \input miniltx \input graphicx \input pstricks \newbox\ASYbox \newdimen\ASYdimen \def\ASYbase#1#2{\setbox\ASYbox=\hbox{#1}\ASYdimen=\ht\ASYbox% \setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox} \def\ASYalign(#1,#2)(#3,#4)#5#6{% \setbox\ASYbox=\hbox{#6}% \rput[lB]{#5}(#1,#2){\ASYdimen=\ht\ASYbox% \advance\ASYdimen by\dp\ASYbox\kern#3\wd\ASYbox\raise#4\ASYdimen\box\ASYbox}} \def\ASYscale(#1,#2)(#3,#4)(#5,#6)#7#8{% \ASYalign(#1,#2)(#3,#4){#7}{\scalebox{#5}[#6]{#8}}}% \psset{unit=1pt} \includegraphics[bb=228.608356 320.125000 382.391644 470.875000]{venn_0.eps}% \ASYalign(-104.955775,75.657656)(-0.500000,-0.500000){0.000000}{$A$} \ASYalign(-49.404200,75.657656)(-0.500000,-0.500000){0.000000}{$B$} \ASYalign(-77.179988,134.822731)(-0.500000,0.000000){0.000000}{$A\cap B$} \ASYalign(-77.179988,16.492581)(-0.500000,-1.000000){0.000000}{$A\cup B$} \bye -- John Bowman Department of Mathematical and Statistical Sciences University of Alberta