ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* asymptote support
@ 2009-05-22  6:49 Mojca Miklavec
  2009-05-22  8:01 ` Arthur Reutenauer
  2009-05-23  3:45 ` Aditya Mahajan
  0 siblings, 2 replies; 10+ messages in thread
From: Mojca Miklavec @ 2009-05-22  6:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: John Bowman

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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-05-22  6:49 asymptote support Mojca Miklavec
@ 2009-05-22  8:01 ` Arthur Reutenauer
  2009-05-23  3:45 ` Aditya Mahajan
  1 sibling, 0 replies; 10+ messages in thread
From: Arthur Reutenauer @ 2009-05-22  8:01 UTC (permalink / raw)
  To: Mailing list for ConTeXt users; +Cc: John Bowman

> PPS: Recent Asymptote logs say "Updates to facilitate TeXLive builds."
> Sounds promissing.

  Yes, asymptote will be included in TeX Live 2009, this is also latest
news :-)

  See http://tug.org/pipermail/tlbuild/2009q2/000738.html

	Arthur
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-05-22  6:49 asymptote support Mojca Miklavec
  2009-05-22  8:01 ` Arthur Reutenauer
@ 2009-05-23  3:45 ` Aditya Mahajan
  2009-05-23  8:10   ` Mojca Miklavec
  1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2009-05-23  3:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 22 May 2009, Mojca Miklavec wrote:

> 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.

This is great. However, even simple examples do not work. I will test in 
more detail later. Is there some settings to get a verbose output on what 
asymptote is doing (-v just says Processing filename, which is not too 
informative).

> 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.

It will be better to encapsulate asymptote setup similar to metapost 
(e.g., \startASYenvironment, \startASYinitilizations, etc)

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-05-23  3:45 ` Aditya Mahajan
@ 2009-05-23  8:10   ` Mojca Miklavec
  2009-06-02 10:41     ` Michail Vidiassov
  0 siblings, 1 reply; 10+ messages in thread
From: Mojca Miklavec @ 2009-05-23  8:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, May 23, 2009 at 05:45, Aditya Mahajan wrote:
> On Fri, 22 May 2009, Mojca Miklavec wrote:
>
>> 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.
>
> This is great. However, even simple examples do not work. I will test in
> more detail later. Is there some settings to get a verbose output on what
> asymptote is doing (-v just says Processing filename, which is not too
> informative).

Sorry, I forgot to tell (and I forgot that I have been using this
before at all):

> You can generate examples that use these constructs in settings.cc like this:
>     asy -k labelsquare
> Then see the file labelsquare_.tex

On my computer I have a file
    /opt/local/share/doc/asymptote/examples/labelsquare.asy
for example. You need to copy that file (or any other asymptote file)
on working directory and run
    asy -k -tex context labelsquare
At least that is my guess. Using
    asy -k -tex xelatex labelsquare
works here and generates all the intermediate files
    labelsquare.pdf
    labelsquare_.aux
    labelsquare_.log
    labelsquare_.tex
    labelsquare_0.eps
    labelsquare_0.pdf
and I'm waiting for a release since I have no idea how to compile from
source (thanks to Arthur's pointer - the build in TL works fine with
-DBROKENCOMPILER switch, but it doesn't have the ConTeXt patches
included yet). I could copy-paste single files, but I'll wait a bit
longer to be able to test the official release.

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-05-23  8:10   ` Mojca Miklavec
@ 2009-06-02 10:41     ` Michail Vidiassov
  0 siblings, 0 replies; 10+ messages in thread
From: Michail Vidiassov @ 2009-06-02 10:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Mojca and All,

the unique feature of Asymptote is 3D PDF.
I have developed code to create 3D annotations some months ago
(to do what movie15 does in LaTeX), but now (latest beta) it does not work.
Since movie inclusion I have used as a base is also broken
(
\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth, height=.7\textwidth, label=demo]} 
fails to work
)
i did not investigate the issue in depth yet.
What is the state of affairs?
Why is movie inclusion broken now?

Another option is attaching a 3D PDF file to the main PDF (someting like 
attachfile2 in LaTeX). Is this functionality OK now? How to use it?

                   Sincerely, Michail
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-06-03  8:11     ` Hans Hagen
@ 2009-06-04  3:54       ` Michail Vidiassov
  0 siblings, 0 replies; 10+ messages in thread
From: Michail Vidiassov @ 2009-06-04  3:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

On Wed, 3 Jun 2009, Hans Hagen wrote:
>>> Since movie inclusion I have used as a base is also broken
>>> fixed
>> Beta in minimals this morning ...
>> did not include the movie.
>
> well, i get the movie here; did you specify the width and height?

Sorry, tested with Apple viewer, Adobe Reader shows movie OK.

                Sincerely, Michail

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-06-03  7:35   ` Michail Vidiassov
@ 2009-06-03  8:11     ` Hans Hagen
  2009-06-04  3:54       ` Michail Vidiassov
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2009-06-03  8:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Michail Vidiassov wrote:
> Dear Hans,
> I wrote
> 
>> I have developed code to create 3D annotations some months ago
>> (to do what movie15 does in LaTeX), but now (latest beta) it does not work.
>> Since movie inclusion I have used as a base is also broken
>> (
>> \placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth,
>> height=.7\textwidth, label=demo]}
>> fails to work
>> )
>> I did not investigate the issue in depth yet.
>> What is the state of affairs?
>> Why is movie inclusion broken now?
> 
> You replied:
> 
>> fixed
> 
> In what beta?
> Beta in minimals this morning did not produce error reports at "contest
> movietest.tex" stage, as it was before, but produced a small pdf file that
> did not include the movie.

well, i get the movie here; did you specify the width and height?

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-06-02 18:52 ` Hans Hagen
@ 2009-06-03  7:35   ` Michail Vidiassov
  2009-06-03  8:11     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Michail Vidiassov @ 2009-06-03  7:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,
I wrote

>I have developed code to create 3D annotations some months ago
>(to do what movie15 does in LaTeX), but now (latest beta) it does not work.
>Since movie inclusion I have used as a base is also broken
>(
>\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth,
>height=.7\textwidth, label=demo]}
>fails to work
>)
>I did not investigate the issue in depth yet.
>What is the state of affairs?
>Why is movie inclusion broken now?

You replied:

> fixed

In what beta?
Beta in minimals this morning did not produce error reports at "contest
movietest.tex" stage, as it was before, but produced a small pdf file that
did not include the movie.

             Sincerely, Michail

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
  2009-06-02 17:32 Michail Vidiassov
@ 2009-06-02 18:52 ` Hans Hagen
  2009-06-03  7:35   ` Michail Vidiassov
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2009-06-02 18:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Michail Vidiassov wrote:
> 
>  Dear Mojca,
> 
>  On Tue, 2 Jun 2009, Mojca Miklavec wrote:
> 
>> It will help a lot if you could post a link to some file to be
>> included, so that Hans has something to play with in hand.
> 
>  http://www.navone.org/Media/Movies/AlienSong_mp4.mov

fixed

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: asymptote support
@ 2009-06-02 17:32 Michail Vidiassov
  2009-06-02 18:52 ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Michail Vidiassov @ 2009-06-02 17:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

  Dear Mojca,

  On Tue, 2 Jun 2009, Mojca Miklavec wrote:

> It will help a lot if you could post a link to some file to be
> included, so that Hans has something to play with in hand.

  http://www.navone.org/Media/Movies/AlienSong_mp4.mov


        Sincerely, Michail
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2009-06-04  3:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-22  6:49 asymptote support Mojca Miklavec
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

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).