Re: [NTG-context] Asymptote and Context

2018-04-19 Thread Aditya Mahajan

On Thu, 19 Apr 2018, Context NTG wrote:


I am running context minimals and Asymptote on Windows.This example used to
work in the past, but it seems to have stopped working. Is there anything
that has changed?


I uploaded a new version of the filter module yesterday, but the error 
below seems unrelated.



\usemodule[filter]

\defineexternalfilter
[ASY]
[filtercommand={asy -tex "context" -outformat pdf
-outname \externalfilteroutputfile},
output=\externalfilterbasefile.pdf,
cache=yes,
readcommand=\ReadImage,]


Short answer: Change `filtercommand` to `filter`.

Long answer: The standard way to specify the command to be executed in 
each snippet is to use `filtercommand`. This should be the FULL command 
(as you would run on the command line). So in case of asymptote, it should 
be:


filtercommand={asy -tex context -outformat pdf -outname 
\externalfilteroutputfile\space \externalfilterinputfile}



Since many commands are of the form:

   command-name  input-name

a shortcut is provided in the filter module. Instead of saying

...
filtercommand={command-name  input-name},
...

you can say

filter={command-name }

In the example that you posted, you are using `filtercommand=` but the 
input filename is missing, so asymptote launches an interactive promt.


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-11-02 Thread Fabrice Couvreur
When compiling the file with asy -V -f pdf test-2.asy  I get the following
message

warning: /home/fab/context/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No cnf
value on line: OSFONTDIR =.
dvips: warning: no config file for `download35'
dvips: ! Couldn't find header file: tex.pro
/home/fab/Asymptote/share/asymptote/plain_shipout.asy: 87.10: runtime:
shipout failed

2017-11-02 12:45 GMT+01:00 Fabrice Couvreur :

> Sorry test-2.asy compile with OpenGL output
>
> 2017-11-02 12:43 GMT+01:00 Fabrice Couvreur :
>
>> I check if the installation of Asymptote is correct.
>> If I compile the file test-1.asy it works with a pdf output but if I
>> compile the file test-2.asy it does not work and the pdf file is empty.
>> Both files compile with OpenGL output
>>
>> fab@debian:~$ asy -V -f pdf test-1.asy
>> warning [version]: using possibly incompatible version 2.41 of plain.asy
>>
>> fab@debian:~$ asy -V -f pdf test-2.asy
>> warning [version]: using possibly incompatible version 2.41 of plain.asy
>>
>> fab@debian:~$
>> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>>
>> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>>
>> ** (evince:8297): WARNING **: Unimplemented annotation:
>> POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince bugzilla (
>> http://bugzilla.gnome.org) with a testcase.
>>
>> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>>
>> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>>
>> ** (evince:8297): WARNING **: Unimplemented annotation:
>> POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince bugzilla (
>> http://bugzilla.gnome.org) with a testcase.
>>
>> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>>
>> fab@debian:~$
>>
>>
>> 2017-11-02 11:26 GMT+01:00 Fabrice Couvreur 
>> :
>>
>>> I will first specify that all the files with the extension .asy work and
>>> that I try to include Asymptote code in a file with the extension .tex to
>>> be able to compile it with context.
>>>
>>> My operating system is Debian Stretch and I installed Asymptote in my
>>> home because that of Texlive 2017 did not work because some libraries were
>>> missing
>>>
>>> https://sourceforge.net/p/asymptote/discussion/409349/thread/d208bdcc/
>>>
>>> fab@debian:~$ which asy
>>> /home/fab/Asymptote/bin/asy
>>> fab@debian:~$
>>>
>>> Fabrice
>>>
>>> 2017-11-02 10:14 GMT+01:00 Mojca Miklavec >> m>:
>>>
 On 2 November 2017 at 09:54, Fabrice Couvreur wrote:
 > Hi Aditya
 >>
 >> Are you using context minimals or texlive?
 >
 >  With Emacs, I work with context minimals and command 'ConTeXt Full'
 but I
 > also tried with texlive  2017.

 A more relevant question would be: where does your asymptote binary
 come from and which OS are you using?

 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/list
 info/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 : ntg-context@ntg.nl / 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
___

Re: [NTG-context] Asymptote with Context

2017-11-02 Thread Fabrice Couvreur
Sorry test-2.asy compile with OpenGL output

2017-11-02 12:43 GMT+01:00 Fabrice Couvreur :

> I check if the installation of Asymptote is correct.
> If I compile the file test-1.asy it works with a pdf output but if I
> compile the file test-2.asy it does not work and the pdf file is empty.
> Both files compile with OpenGL output
>
> fab@debian:~$ asy -V -f pdf test-1.asy
> warning [version]: using possibly incompatible version 2.41 of plain.asy
>
> fab@debian:~$ asy -V -f pdf test-2.asy
> warning [version]: using possibly incompatible version 2.41 of plain.asy
>
> fab@debian:~$
> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>
> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>
> ** (evince:8297): WARNING **: Unimplemented annotation:
> POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince bugzilla (
> http://bugzilla.gnome.org) with a testcase.
>
> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>
> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>
> ** (evince:8297): WARNING **: Unimplemented annotation:
> POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince bugzilla (
> http://bugzilla.gnome.org) with a testcase.
>
> (evince:8297): Poppler-WARNING **: Unsupported Annot Type
>
> fab@debian:~$
>
>
> 2017-11-02 11:26 GMT+01:00 Fabrice Couvreur :
>
>> I will first specify that all the files with the extension .asy work and
>> that I try to include Asymptote code in a file with the extension .tex to
>> be able to compile it with context.
>>
>> My operating system is Debian Stretch and I installed Asymptote in my
>> home because that of Texlive 2017 did not work because some libraries were
>> missing
>>
>> https://sourceforge.net/p/asymptote/discussion/409349/thread/d208bdcc/
>>
>> fab@debian:~$ which asy
>> /home/fab/Asymptote/bin/asy
>> fab@debian:~$
>>
>> Fabrice
>>
>> 2017-11-02 10:14 GMT+01:00 Mojca Miklavec > >:
>>
>>> On 2 November 2017 at 09:54, Fabrice Couvreur wrote:
>>> > Hi Aditya
>>> >>
>>> >> Are you using context minimals or texlive?
>>> >
>>> >  With Emacs, I work with context minimals and command 'ConTeXt Full'
>>> but I
>>> > also tried with texlive  2017.
>>>
>>> A more relevant question would be: where does your asymptote binary
>>> come from and which OS are you using?
>>>
>>> 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/list
>>> info/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 : ntg-context@ntg.nl / 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
___

Re: [NTG-context] Asymptote with Context

2017-11-02 Thread Fabrice Couvreur
I check if the installation of Asymptote is correct.
If I compile the file test-1.asy it works with a pdf output but if I
compile the file test-2.asy it does not work and the pdf file is empty.
Both files compile with OpenGL output

fab@debian:~$ asy -V -f pdf test-1.asy
warning [version]: using possibly incompatible version 2.41 of plain.asy

fab@debian:~$ asy -V -f pdf test-2.asy
warning [version]: using possibly incompatible version 2.41 of plain.asy

fab@debian:~$
(evince:8297): Poppler-WARNING **: Unsupported Annot Type

(evince:8297): Poppler-WARNING **: Unsupported Annot Type

** (evince:8297): WARNING **: Unimplemented annotation:
POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince bugzilla (
http://bugzilla.gnome.org) with a testcase.

(evince:8297): Poppler-WARNING **: Unsupported Annot Type

(evince:8297): Poppler-WARNING **: Unsupported Annot Type

** (evince:8297): WARNING **: Unimplemented annotation:
POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince bugzilla (
http://bugzilla.gnome.org) with a testcase.

(evince:8297): Poppler-WARNING **: Unsupported Annot Type

fab@debian:~$


2017-11-02 11:26 GMT+01:00 Fabrice Couvreur :

> I will first specify that all the files with the extension .asy work and
> that I try to include Asymptote code in a file with the extension .tex to
> be able to compile it with context.
>
> My operating system is Debian Stretch and I installed Asymptote in my home
> because that of Texlive 2017 did not work because some libraries were
> missing
>
> https://sourceforge.net/p/asymptote/discussion/409349/thread/d208bdcc/
>
> fab@debian:~$ which asy
> /home/fab/Asymptote/bin/asy
> fab@debian:~$
>
> Fabrice
>
> 2017-11-02 10:14 GMT+01:00 Mojca Miklavec 
> :
>
>> On 2 November 2017 at 09:54, Fabrice Couvreur wrote:
>> > Hi Aditya
>> >>
>> >> Are you using context minimals or texlive?
>> >
>> >  With Emacs, I work with context minimals and command 'ConTeXt Full'
>> but I
>> > also tried with texlive  2017.
>>
>> A more relevant question would be: where does your asymptote binary
>> come from and which OS are you using?
>>
>> 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>
>


test-1.asy
Description: Binary data


test-2.asy
Description: Binary data
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-11-02 Thread Fabrice Couvreur
I will first specify that all the files with the extension .asy work and
that I try to include Asymptote code in a file with the extension .tex to
be able to compile it with context.

My operating system is Debian Stretch and I installed Asymptote in my home
because that of Texlive 2017 did not work because some libraries were
missing

https://sourceforge.net/p/asymptote/discussion/409349/thread/d208bdcc/

fab@debian:~$ which asy
/home/fab/Asymptote/bin/asy
fab@debian:~$

Fabrice

2017-11-02 10:14 GMT+01:00 Mojca Miklavec :

> On 2 November 2017 at 09:54, Fabrice Couvreur wrote:
> > Hi Aditya
> >>
> >> Are you using context minimals or texlive?
> >
> >  With Emacs, I work with context minimals and command 'ConTeXt Full' but
> I
> > also tried with texlive  2017.
>
> A more relevant question would be: where does your asymptote binary
> come from and which OS are you using?
>
> 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://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 : ntg-context@ntg.nl / 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
___

Re: [NTG-context] Asymptote with Context

2017-11-02 Thread Mojca Miklavec
On 2 November 2017 at 09:54, Fabrice Couvreur wrote:
> Hi Aditya
>>
>> Are you using context minimals or texlive?
>
>  With Emacs, I work with context minimals and command 'ConTeXt Full' but I
> also tried with texlive  2017.

A more relevant question would be: where does your asymptote binary
come from and which OS are you using?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-11-02 Thread Fabrice Couvreur
Hi Aditya

> Are you using context minimals or texlive?


 With Emacs, I work with context minimals and command 'ConTeXt Full' but I
also tried with texlive  2017.

If you compile the attach ntg71.tex file, do you get ntg71-macro.pdf?


No
Fabrice

2017-11-01 16:49 GMT+01:00 Mojca Miklavec :

> On 1 November 2017 at 16:29, Ulrike Fischer wrote:
> > Am Wed, 1 Nov 2017 09:50:47 -0400 (EDT) schrieb Aditya Mahajan:
> >
> >> The only reason that I can think of is that "import solids;" is
> >> calling an external program and there are some settings in your
> >> texmfcnf file that is restricting that program to run.
> >
> > I don't know much about asymptote but as I just tried to debug an
> > error message in miktex: Imho the "solids" library calls the three
> > library which tries to use the OpenGL-renderer.
> >
> > In miktex this fails (https://github.com/MiKTeX/miktex/issues/26)
> > and the "solution" is to set the output format to pdf:
> >
> > https://tex.stackexchange.com/questions/398421/miktex-how-
> to-install-glut-library-on-windows/398674#398674
> >
> > Perhaps the problem here is due to a similar issue.
>
> If this has something to do with OpenGL, a properly built asymptote
> might solve the problem. Which OS and which distribution are you
> using?
>
> 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://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 : ntg-context@ntg.nl / 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
___

Re: [NTG-context] Asymptote with Context

2017-11-01 Thread Mojca Miklavec
On 1 November 2017 at 16:29, Ulrike Fischer wrote:
> Am Wed, 1 Nov 2017 09:50:47 -0400 (EDT) schrieb Aditya Mahajan:
>
>> The only reason that I can think of is that "import solids;" is
>> calling an external program and there are some settings in your
>> texmfcnf file that is restricting that program to run.
>
> I don't know much about asymptote but as I just tried to debug an
> error message in miktex: Imho the "solids" library calls the three
> library which tries to use the OpenGL-renderer.
>
> In miktex this fails (https://github.com/MiKTeX/miktex/issues/26)
> and the "solution" is to set the output format to pdf:
>
> https://tex.stackexchange.com/questions/398421/miktex-how-to-install-glut-library-on-windows/398674#398674
>
> Perhaps the problem here is due to a similar issue.

If this has something to do with OpenGL, a properly built asymptote
might solve the problem. Which OS and which distribution are you
using?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-11-01 Thread Ulrike Fischer
Am Wed, 1 Nov 2017 09:50:47 -0400 (EDT) schrieb Aditya Mahajan:

> The only reason that I can think of is that "import solids;" is
> calling an external program and there are some settings in your
> texmfcnf file that is restricting that program to run.

I don't know much about asymptote but as I just tried to debug an
error message in miktex: Imho the "solids" library calls the three
library which tries to use the OpenGL-renderer. 

In miktex this fails (https://github.com/MiKTeX/miktex/issues/26)
and the "solution" is to set the output format to pdf:

https://tex.stackexchange.com/questions/398421/miktex-how-to-install-glut-library-on-windows/398674#398674

Perhaps the problem here is due to a similar issue.


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-11-01 Thread Aditya Mahajan

On Wed, 1 Nov 2017, Fabrice Couvreur wrote:


Hi Aditya,
I continue to test files, some work (ntg70.tex) and some do not
(ntg71.tex). This
seems to depend on imported modules but why ?


Both files work correctly at my end. I don't understand asymptote well 
enough to debug why some imported modules fail. The only reason that I can 
think of is that "import solids;" is calling an external program and there 
are some settings in your texmfcnf file that is restricting that program 
to run.


Are you using context minimals or texlive?

If you compile the attach ntg71.tex file, do you get ntg71-macro.pdf? If 
not, then this is an issue with shell escape restrictions on your system.


Aditya

ntg71.tex
Description: TeX document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-11-01 Thread Fabrice Couvreur
Hi Aditya,
I continue to test files, some work (ntg70.tex) and some do not
(ntg71.tex). This
seems to depend on imported modules but why ?
Thank you.
Fabrice


2017-10-28 12:38 GMT+02:00 Fabrice Couvreur :

> Hi Aditya,
>
> What happens when you run
>>
>> asy -tex "context" -outformat pdf -outname ntg70-temp-ASY-0.pdf
>> ntg70-temp-ASY-0.tmp
>
>
>  fab@debian:~$ asy -tex "context" -outformat pdf -outname
>> ntg70-temp-ASY-0.pdf ntg70-temp-ASY-0.tmp
>> warning [version]: using possibly incompatible version 2.41 of plain.asy
>>
>> error: could not load module 'ntg70-temp-ASY-0.tmp'
>
>
>  After, I tried to recompile the file with the command ConTeXt Full with
> Emacs and it works 
>
> Does any other example with the filter module work?
>
>
>  It depends on the files, some yes, some no. For example the one who is
> attached does not work
>
> Thanks
> Fabrice
>
> 2017-10-27 13:38 GMT+02:00 Aditya Mahajan :
>
>> On Fri, 27 Oct 2017, Fabrice Couvreur wrote:
>>
>> I enclose the files you requested
>>>
>>
>> 1. What happens when you run
>>
>> asy -tex "context" -outformat pdf -outname ntg70-temp-ASY-0.pdf
>> ntg70-temp-ASY-0.tmp
>>
>> from the command line (in the same directory as your MWE). Do you get a
>> correct pdf?
>>
>> 2. Does any other example with the filter module work? (This is just to
>> make sure that \executesystemcommand{...} is working correctly).
>>
>>
>> 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>
>


ntg70.tex
Description: TeX document


ntg71.tex
Description: TeX document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-10-28 Thread Fabrice Couvreur
Hi Aditya,

What happens when you run
>
> asy -tex "context" -outformat pdf -outname ntg70-temp-ASY-0.pdf
> ntg70-temp-ASY-0.tmp


 fab@debian:~$ asy -tex "context" -outformat pdf -outname
> ntg70-temp-ASY-0.pdf ntg70-temp-ASY-0.tmp
> warning [version]: using possibly incompatible version 2.41 of plain.asy
>
> error: could not load module 'ntg70-temp-ASY-0.tmp'


 After, I tried to recompile the file with the command ConTeXt Full with
Emacs and it works 

Does any other example with the filter module work?


 It depends on the files, some yes, some no. For example the one who is
attached does not work

Thanks
Fabrice

2017-10-27 13:38 GMT+02:00 Aditya Mahajan :

> On Fri, 27 Oct 2017, Fabrice Couvreur wrote:
>
> I enclose the files you requested
>>
>
> 1. What happens when you run
>
> asy -tex "context" -outformat pdf -outname ntg70-temp-ASY-0.pdf
> ntg70-temp-ASY-0.tmp
>
> from the command line (in the same directory as your MWE). Do you get a
> correct pdf?
>
> 2. Does any other example with the filter module work? (This is just to
> make sure that \executesystemcommand{...} is working correctly).
>
>
> 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>


ntg70.tex
Description: TeX document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-10-27 Thread Aditya Mahajan

On Fri, 27 Oct 2017, Fabrice Couvreur wrote:


I enclose the files you requested


1. What happens when you run

asy -tex "context" -outformat pdf -outname ntg70-temp-ASY-0.pdf 
ntg70-temp-ASY-0.tmp

from the command line (in the same directory as your MWE). Do you get a 
correct pdf?


2. Does any other example with the filter module work? (This is just to 
make sure that \executesystemcommand{...} is working correctly).


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote with Context

2017-10-27 Thread Fabrice Couvreur
Hi Aditya,
I enclose the files you requested
Thank you
Fabrice

2017-10-26 17:09 GMT+02:00 Aditya Mahajan :

> On Thu, 26 Oct 2017, Fabrice Couvreur wrote:
>
> https://mailman.ntg.nl/pipermail/ntg-context/2015/080581.html
>>
>> Hi,
>> I tested the file and the figure is not drawn but I get the following
>> message "[[output file missing"
>>
>
> That works at my end so you will need to provide additional information.
> Please create a MWE, add \traceexternalfilters after \usemodule[filter] and
> attach the tex and log files.
>
> 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___


ntg70.tex
Description: TeX document
resolvers   > trees > analyzing 'home:texmf'

open source > level 1, order 1, name '/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2017.05.15 21:48 MKIV beta  fmt: 2017.10.21  int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name '/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
close source> level 2, order 2, name '/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'ntg70', input './ntg70', result 'ntg70'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/fab/ntg70.tex'
resolvers   > modules > 'filter' is loaded
open source > level 3, order 4, name '/home/fab/texlive/2017/texmf-dist/tex/context/third/filter/t-filter.mkiv'
loading > Filter (ver: 2016.03.02)
resolvers   > modules > 'module-catcodes' is loaded
open source > level 4, order 5, name '/home/fab/texlive/2017/texmf-dist/tex/context/third/filter/t-module-catcodes.tex'
loading > Module Catcodes (ver: 2011.12.17)
close source> level 4, order 5, name '/home/fab/texlive/2017/texmf-dist/tex/context/third/filter/t-module-catcodes.tex'
close source> level 3, order 5, name '/home/fab/texlive/2017/texmf-dist/tex/context/third/filter/t-filter.mkiv'
t-filter> defining filter : ASY
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
t-filter> current filter : ASY
t-filter> base file : ntg70-temp-ASY-0
t-filter> input file : ntg70-temp-ASY-0.tmp
t-filter> output file : ntg70-temp-ASY-0.pdf
t-filter> command : asy -tex "context" -outformat pdf -outname ntg70-temp-ASY-0.pdf ntg70-temp-ASY-0.tmp
t-filter> state : 
t-filter> cached output file 'ntg70-temp-ASY-0.pdf' missing. Rerunning filter
t-filter> file 'ntg70-temp-ASY-0.pdf' cannot be found
t-filter> current filter : ASY
t-filter> base file : ntg70-temp-ASY-0
t-filter> input file : ntg70-temp-ASY-0.tmp
t-filter> output file : ntg70-temp-ASY-0.pdf
floatblocks > '1' placed
backend > xmp > using file '/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 5, name '/home/fab/ntg70.tex'
close source> level 1, order 5, name '/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'

system  > structure > start used structure

used structure  > text: ntg70

system  > structure > stop used structure


system  > files > start used files

used file   >1: filename=cont-yes.mkiv filetype=tex foundname=/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
used file   >2: filename=publ-imp-default.lua filetype=scripts foundname=/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
used file   >3: filename=cont-new.mkiv filetype=tex foundname=/home/fab/texlive/2017/texmf-dist/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
used file   >4: filename=lang-us.lua filetype=scripts foundname=/home/fab/texlive/2017/texmf-dist/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
used file   >5: filename=/home/fab/ntg70.tex foundname=/home/fab/ntg70.tex usedmethod=direct
used file   >6: filename=t-filter.mkiv filetype=tex foundname=/home/fab/texlive/2017/texmf-dist/tex/context/third/filter/t-filter.mkiv usedmethod=database
used file   >7: filename=t-module-catcodes.tex filetype=tex 

Re: [NTG-context] Asymptote with Context

2017-10-26 Thread Aditya Mahajan

On Thu, 26 Oct 2017, Fabrice Couvreur wrote:


https://mailman.ntg.nl/pipermail/ntg-context/2015/080581.html

Hi,
I tested the file and the figure is not drawn but I get the following
message "[[output file missing"


That works at my end so you will need to provide additional information. 
Please create a MWE, add \traceexternalfilters after \usemodule[filter] 
and attach the tex and log files.


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote in Context

2015-01-19 Thread Aditya Mahajan

On Fri, 2 Jan 2015, Context NTG wrote:


Here is an Asymptote example

unitsize(1cm);
draw((-.1,0) -- (2,0),
arrow=Arrow(TeXHead));
draw((0,-.1) -- (0,2), arrow =
Arrow(TeXHead));
draw((0,0) .. (1,1) .. (2,sqrt(2)));


Below is how I have started setting this up in Context. This creates a pdf
file with the drawing, but it is not included in the final docuement.


Sorry for the late reply. You just need to change a few options:

\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
  unitsize(1cm);
  draw((-.1,0) -- (2,0), arrow=Arrow(TeXHead));
  draw((0,-.1) -- (0,2), arrow=Arrow(TeXHead));
  draw((0,0) .. (1,1) .. (2,sqrt(2)));
\stopASY
  \stopplacefigure
\stoptext

Here \startASY behaves similar to \startMPcode. To get something similar 
to \startMPenvironment in mkii, you can use beforebuffer.


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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote in Context

2015-01-02 Thread Context NTG
Here is an Asymptote example

unitsize(1cm);
draw((-.1,0) -- (2,0),
arrow=Arrow(TeXHead));
draw((0,-.1) -- (0,2), arrow =
Arrow(TeXHead));
draw((0,0) .. (1,1) .. (2,sqrt(2)));


Below is how I have started setting this up in Context. This creates a pdf
file with the drawing, but it is not included in the final docuement.


\defineexternalfilter
[ASY]
[filtercommand={asy -tex context -View -outformat pdf -outname
\externalfilteroutputfile\space \externalfilterinputfile},
output=\externalfilterbasefile.out,
readcommand=\typefile,
cache=force,
location=text,
continue=yes]

\starttext
\startASY[myplot]
unitsize(1cm);
draw((-.1,0) -- (2,0),
arrow=Arrow(TeXHead));
draw((0,-.1) -- (0,2), arrow =
Arrow(TeXHead));
draw((0,0) .. (1,1) .. (2,sqrt(2)));

\stopASY
\externalfigure[myplot]
\stoptext


Thanks
Jeroen

2014-12-28 12:04 GMT+01:00 Mojca Miklavec mojca.miklavec.li...@gmail.com:

 Dear Aditya,

 On Sun, Dec 28, 2014 at 8:21 AM, Aditya Mahajan wrote:
  On Wed, 24 Dec 2014, Context NTG wrote:
 
  Could anybody explain how to use Asymptote in ConTeXt with the filter
  module.
 
  Can you post a minimal asymptote file and how it shoud be processed via
 the
  command line?

 I have no time to create a nice minimal example, but here's an ugly
 non-minimal example which should at least enable you to test the
 interaction with the filter module.

 I also added one ConTeXt-specific command while trying to make math
 fonts work properly, just replace lucidaot with another font in case
 you don't have that one installed.

 You can run the example with
 asy -tex context cylinder.asy

 (Maybe it's possible to set the tex engine inside the file as well.)


 Bonus points if you can get PRC to work properly before TL 2015. Or if
 you can make the file print properly from OS X without using Acrobat
 or ghostscript/CUPS. Preview.app forgets to print the (smoothly
 shaded) cylinder for example.

 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  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote in Context

2014-12-28 Thread Mojca Miklavec
Dear Aditya,

On Sun, Dec 28, 2014 at 8:21 AM, Aditya Mahajan wrote:
 On Wed, 24 Dec 2014, Context NTG wrote:

 Could anybody explain how to use Asymptote in ConTeXt with the filter
 module.

 Can you post a minimal asymptote file and how it shoud be processed via the
 command line?

I have no time to create a nice minimal example, but here's an ugly
non-minimal example which should at least enable you to test the
interaction with the filter module.

I also added one ConTeXt-specific command while trying to make math
fonts work properly, just replace lucidaot with another font in case
you don't have that one installed.

You can run the example with
asy -tex context cylinder.asy

(Maybe it's possible to set the tex engine inside the file as well.)


Bonus points if you can get PRC to work properly before TL 2015. Or if
you can make the file print properly from OS X without using Acrobat
or ghostscript/CUPS. Preview.app forgets to print the (smoothly
shaded) cylinder for example.

Mojca


cylinder.asy
Description: Binary data


cylinder.pdf
Description: Adobe PDF document
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Asymptote in Context

2014-12-27 Thread Aditya Mahajan

On Wed, 24 Dec 2014, Context NTG wrote:


Could anybody explain how to use Asymptote in ConTeXt with the filter
module.


Can you post a minimal asymptote file and how it shoud be processed via 
the command line?


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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___