From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: John Bowman <bowman@math.ualberta.ca>
Subject: asymptote support
Date: Fri, 22 May 2009 08:49:34 +0200 [thread overview]
Message-ID: <6faad9f00905212349g370c11dbpf503c1adc0d9e4@mail.gmail.com> (raw)
Hello,
Just to let you know - thanks to John Bowman (Michail Vidiassov is
also working on it) these are some latest posts from asymptote
developers on their forum - if anyone would like to play with
asymptote, feel free to test.
I didn't take a look, but John Bowman says that he needed null.tex to
get context into interactive mode for some reason. Any clue about
that?
Mojca
PS: I really really have to avoid the temptation to get distracted in
the next few days/weeks unless I find an excuse that I need to make
3D/movies for my reports (which is not so unlikely to happen after all
:) I have converted asycolors.sty; if anyone wants to take a look at
asymptote.sty feel free to take it over. I might come back to it, but
not right now. My quick first impression is that it does something
similar to t-gnuplot, t-r, t-vim, t-lilypond, etc., that is: it
defines some high-level commands, writes a file, lets asymptote
process it and then includes the resulting graphic back.
PPS: Recent Asymptote logs say "Updates to facilitate TeXLive builds."
Sounds promissing.
----------------------------------------------------------------------
Good news: After digesting the advice /.../, I have been able to
implement full support for a context tex engine in 2D.
First of all, with TeXLive 2008 it is necessary to configure both lua and
context:
luatools --generate
context --make
We also rely on the empty tex file misc/null.tex. Hopefully everyone has that.
We use this to
get into context interactive mode, for the tex pipe (phase 1 of Asymptote's
2-phase typesetting system):
context misc/null
This was a crucial trick that I did not see documented anywhere.
I didn't like the need for the \hbox but I too could not find a way around
this; it seems that context takes liberties with the vertical spacing (glue?)
otherwise, in a seemingly unpredictable manner. I was able to work around the
one problem that I could forsee, with \eject (newpage() in asy, for multipage
output).
Everything appears to be working: label clipping, minipage, and even
functionshading.
This was the benefit of using specials; once the high-level code was in place,
all of the low-level support was ready to go.
The only thing that I haven't tested is inlinetex mode with the context tex
engine. Could someone please test this for me? Thanks.
----------------------------------------------------------------------
I checked that -inlinetex -tex context appears to be generating the right files.
Now all that needs to be done is for someone familiar with context to port
asymptote.sty to a context module.
----------------------------------------------------------------------
I forgot to mention that context support is committed to svn and will be in
1.74 release (likely tomorrow).
Regarding fonts, one can either use the low-level TeX \font way using
fontcommand
or,
as the following contextfonts.asy example illustrates, the high-level way
(see the definition of font in plain_pens.asy):
settings.tex="context";
texpreamble("\usetypescript[iwona][ec]");
texpreamble("\usetypescript[antykwa-torunska][t5]");
label("$A$",0,N,font("iwona"));
label("$A$",0,S,font("antykwa")+red);
----------------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2009-05-22 6:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 6:49 Mojca Miklavec [this message]
2009-05-22 8:01 ` Arthur Reutenauer
2009-05-23 3:45 ` Aditya Mahajan
2009-05-23 8:10 ` Mojca Miklavec
2009-06-02 10:41 ` Michail Vidiassov
2009-06-02 17:32 Michail Vidiassov
2009-06-02 18:52 ` Hans Hagen
2009-06-03 7:35 ` Michail Vidiassov
2009-06-03 8:11 ` Hans Hagen
2009-06-04 3:54 ` Michail Vidiassov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6faad9f00905212349g370c11dbpf503c1adc0d9e4@mail.gmail.com \
--to=mojca.miklavec.lists@gmail.com \
--cc=bowman@math.ualberta.ca \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).