ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt + asymptote
@ 2006-04-21 15:49 Renaud AUBIN
  2006-04-21 16:17 ` Renaud AUBIN
  2006-04-25  7:52 ` Taco Hoekwater
  0 siblings, 2 replies; 38+ messages in thread
From: Renaud AUBIN @ 2006-04-21 15:49 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 806 bytes --]


Hi all,

I like metapost but, according to the following mail (on the metapost ML):

[metapost] MP vs. Asymptote
I don't want to start a flame, but since someone posted a message some
time ago mentioning Asymptote I got curious and I have to say that I was
very impressed, even if I still have some problems with it. However, it
seems a net improvement over MP, or not? Is there anyone with an
informed opinion over Asymptote? Might Asymptote be the killer of MP?

Cheers,
(and always thanks for the help I got here now and then...)

Maurizio
_______________________________________________
metapost mailing list
http://tug.org/mailman/listinfo/metapost

I wonder if someone has already tried to use asymptote with ConTeXt... IMHO, this doesn't seem obvious at all but I'm maybe wrong...

Cheers

Renaud


[-- Attachment #1.2: Type: text/html, Size: 1215 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 38+ messages in thread
* ConTeXt + asymptote
@ 2006-06-29 13:40 John Bowman
  2006-06-29 18:05 ` Hans Hagen
  2006-06-30  1:12 ` Sanjoy Mahajan
  0 siblings, 2 replies; 38+ messages in thread
From: John Bowman @ 2006-06-29 13:40 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 38+ messages in thread
* Re: ConTeXt + asymptote
@ 2006-10-15  5:04 John Bowman
  0 siblings, 0 replies; 38+ messages in thread
From: John Bowman @ 2006-10-15  5:04 UTC (permalink / raw)


Hi all,

As requested some time ago on this list, Asymptote 1.14 (a modern MetaPost
replacement) now supports alternate TeX engines via the -tex option:

-tex engine           TeX engine ("latex|pdflatex|tex|pdftex|none") ["latex"]

Other engines (presumably including ConTeXt) can easily be added in settings.cc.

General affine transforms and clipping of labels is now implemented
via PostScript or PDF specials (as appropriate). So if ConTeXt can handle
TeX specials, adding support for it should be straightforward. We also
input the tex graphics and picture packages; presumably something like them
is accessible to ConTeXt too. If someone comes up with a diff for ConTeXt,
please post it (as a patch under the link News) at asymptote.sourceforge.net

Regards,

-- John Bowman

University of Alberta

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2006-10-15  5:04 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-21 15:49 ConTeXt + asymptote Renaud AUBIN
2006-04-21 16:17 ` Renaud AUBIN
2006-04-21 16:45   ` Hans Hagen
2006-04-21 18:29     ` Jilani Khaldi
2006-04-21 18:52       ` Renaud AUBIN
2006-04-21 19:11         ` Hans Hagen
2006-04-21 19:13         ` Hans Hagen
2006-04-21 19:25           ` Renaud AUBIN
2006-04-22  8:38             ` Hans Hagen
2006-04-22  9:16               ` andrea valle
2006-04-21 19:10       ` Hans Hagen
2006-04-21 19:20         ` Renaud AUBIN
2006-04-21 19:52           ` Hans Hagen
2006-04-23 18:51             ` Renaud AUBIN
2006-04-23 20:28               ` Hans Hagen
2006-04-23 21:02                 ` Renaud AUBIN
2006-04-23 21:50                   ` Hans Hagen
2006-04-23 22:33                     ` Renaud AUBIN
2006-04-24  0:54                       ` Sanjoy Mahajan
2006-04-24  7:33                       ` Hans Hagen
2006-04-25  4:36                         ` Sanjoy Mahajan
2006-04-25  7:04                           ` Hans Hagen
2006-04-25  8:02                             ` Taco Hoekwater
2006-04-25 15:17                             ` Sanjoy Mahajan
2006-04-21 20:00         ` ConTeXt +Tioga Jilani Khaldi
2006-04-21 20:49           ` Sanjoy Mahajan
2006-04-22  7:47           ` Hans Hagen
2006-04-22  9:47             ` Taco Hoekwater
2006-04-22 12:12               ` Jilani Khaldi
2006-04-22 15:56                 ` andrea valle
2006-04-21 19:37     ` ConTeXt + asymptote Sanjoy Mahajan
2006-04-21 23:30       ` Mojca Miklavec
2006-04-25  7:52 ` Taco Hoekwater
2006-06-29 13:40 John Bowman
2006-06-29 18:05 ` Hans Hagen
2006-06-30  1:12 ` Sanjoy Mahajan
2006-06-30  8:16   ` Hans Hagen
2006-10-15  5:04 John Bowman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).