Hello,
I do not answer the question, but I'm interested because I also use
Asymptote. The following code works with context in texlive 2016 but does
not work with standalone context.
thank you,
Fabrice
% macros=mkvi
\usemodule[filter]
\defineexternalfilter
[ASY]
[
filter={asy -tex "context" -outformat pdf
-outname \externalfilteroutputfile},
output=\externalfilterbasefile.pdf,
cache=yes,
readcommand=\ReadImage,
]
\define[1]\ReadImage{\externalfigure[#1]}
\starttext
Testing if we can include an asymptote image
\startplacefigure[location={here}, title={An Asymptote figure}]
\startASY
import three;
size(8cm,0);
currentlight.background=black;
material White(real x, real y){
return material(diffusepen=gray(.05+.1x+.3y),
emissivepen=gray(.05+.1x+.3y));
}
for(int y=0; y<=2; ++y)
for(int x=0; x<3; ++x)
draw(shift(2x,2y,0)*unitsphere,White(x,y));
\stopASY
\stopplacefigure
\stoptext
2016-12-19 8:41 GMT+01:00 Jaroslav Hajtmar <[email protected]>:
> Hello ConTeXtist,
>
> I saw the opportunity to insert an Asymptote picture into Context source
> code (due filter).
>
> For example here: https://mailman.ntg.nl/pipermail/ntg-context/2015/
> 080581.html
>
>
>
> Is there a way to pass the ConTeXt parameter which influenced the creation
> of the Asymptote image? My point eg. the ability to define macros, which
> gave its parameters to Asymptote procedure or function and depending on
> these parameters, the image created by Asymptote looked differently.
>
>
>
> Before starting work on an illustrative example I am asking, whether it
> makes sense to deal with such a thing ... I suppose the impossibility of
> combining asymptote code and such Lua code (or not?).
>
>
>
> There is a similar possibility, at least in Metapost? For simpler pictures
> it would probably suffice ....
>
>
>
> Thanx
>
> Jaroslav Hajtmar
>
>
>
> ____________________________________________________________
> _______________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : [email protected] / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ____________________________________________________________
> _______________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________