From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80964 Path: news.gmane.org!not-for-mail From: Mica Semrick Newsgroups: gmane.comp.tex.context Subject: Re: python embedded in ConTeXt Date: Mon, 25 Feb 2013 14:36:39 -0800 Message-ID: References: <5128BA65.3020802@telefonica.net> <512BA7BE.907@telefonica.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0941929858==" X-Trace: ger.gmane.org 1361831810 8330 80.91.229.3 (25 Feb 2013 22:36:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2013 22:36:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 25 23:37:13 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UA6fZ-0002lt-9T for gctc-ntg-context-518@m.gmane.org; Mon, 25 Feb 2013 23:37:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 49C05101E7; Mon, 25 Feb 2013 23:36:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QmolRSpZLcVw; Mon, 25 Feb 2013 23:36:50 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2A7BD101E3; Mon, 25 Feb 2013 23:36:50 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A12EB101E3 for ; Mon, 25 Feb 2013 23:36:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tAEyHv9DzYsv for ; Mon, 25 Feb 2013 23:36:46 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id C3238101E2 for ; Mon, 25 Feb 2013 23:36:46 +0100 (CET) Original-Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r1PMad0i027230 for ; Mon, 25 Feb 2013 23:36:40 +0100 Original-Received: by mail-wg0-f42.google.com with SMTP id 12so3816269wgh.3 for ; Mon, 25 Feb 2013 14:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=AFryirdAmN5gRmxpMDoR/PDcS3lMgYPZxYCIZcCKzLk=; b=GhSiqu4fPTI3dNc3PHtcUjt6Kls8nThgQmEhHdtVr8FTt1xGwv/k95P3JRJW689Kyu wSgJ046ssmFjVRlanGVOcx8IJkipI0iFIRG0L6Wg5qYHViQu3LlatIvo7BNwlu4OcGm9 bgYHdtKIEpBtw+grcXF8kIu4WfL0MvtuNFZPkmGjyCjccCfRrIMlk0x2h4RaBu61/lNT PxpqixCafpqBs6MqY3ZF0lWu/8rwO/6LJnI00ZR6rQ38kZw34rpSbEBB9PcLGtX1AmwG 9LmvPt5iuLu5WG3G7ZDMYoG/eoBf6y5oNx6bj/XEFnqr3lVc76VYFD3jFq9aaANdQxCy eGEQ== X-Received: by 10.180.87.98 with SMTP id w2mr15358598wiz.30.1361831799634; Mon, 25 Feb 2013 14:36:39 -0800 (PST) Original-Received: by 10.194.7.98 with HTTP; Mon, 25 Feb 2013 14:36:39 -0800 (PST) In-Reply-To: <512BA7BE.907@telefonica.net> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VJ4KADtt - b286180ad662 - 20130225 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80964 Archived-At: --===============0941929858== Content-Type: multipart/alternative; boundary=f46d04182616a94c4b04d6942c31 --f46d04182616a94c4b04d6942c31 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xan, not sure if you're aware, but you can execute Lua code within a ConTeXt document. Best, Mica On Mon, Feb 25, 2013 at 10:04 AM, Xan wrote: > Thank you very much, Henning and Aditya. It clear the actual programming > in ConTeXt. Now I use mako templates for emulate this purpose, but it's a= n > annoying thing having to do this "outside" ConTeXt documents.... > > Thanks, both. > > Xan. > > On Sat, 23 Feb 2013, Henning Hraban Ramm wrote: > > >* Am 2013-02-23 um 13:47 schrieb Xan:*>** > >>* I just want to know if there is a equal thing like python.sty [1], *>= >* sympytex [2] or sagetex [3] for embed python, sympy and sage into *>>* C= onTeXt documents as there exist for latex. Yeah, I know I could write *>>* = a script and run python externally to ConTeXt but this were easier to *>>* = use.*>** > >* Have a look at Aditya's filter module, that can call arbitrary externa= l commands.* > > Attached is a proof of concept implementation for sympy. All the three > python packages that you mentioned include a corresponding python script > that does a lot of book-keeping. So, getting the full functionality of al= l > these packages will require adapting those python script to generate > results in ConTeXt syntax rather than in LaTeX syntax. > > Aditya > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: sympy.tex > Type: application/x-tex > Size: 916 bytes > Desc: > URL: > > ------------------------------ > > > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --f46d04182616a94c4b04d6942c31 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xan,=A0

not sure if you're aware, but you can execut= e Lua code within a ConTeXt document.

Best,
<= div>Mica

On Mon, Feb 25, 2013 at 10:04 AM= , Xan <dxpublica@telefonica.net> wrote:
=20 =20 =20
Thank you very much, Henning and Aditya. It clear the actual programming in ConTeXt. Now I use mako templates for emulate this purpose, but it's an annoying thing having to do this "outside= " ConTeXt documents....

Thanks, both.

Xan.
On Sat, 23 Feb 2013, Henning Hraban Ramm wrote= : > Am 2013-02-23 um 13:47 schrieb Xan: >
>> I just want to know if there is a e= qual thing like python.sty [1],=20 >> sympytex [2] or sagetex [3] for embed python, sympy and sag= e into=20 >> ConTeXt documents as there exist for latex. Yeah, I know I = could write=20 >> a script and run python externally to ConTeXt but this were= easier to=20 >> use. >
> Have a look at Aditya's filter modu= le, that can call arbitrary external commands.
Attached is a proof of concept implementation for sympy. All the three=20 python packages that you mentioned include a corresponding python script=20 that does a lot of book-keeping. So, getting the full functionality of all= =20 these packages will require adapting those python script to generate=20 results in ConTeXt syntax rather than in LaTeX syntax. Aditya -------------- next part -------------- A non-text attachment was scrubbed... Name: sympy.tex Type: application/x-tex Size: 916 bytes Desc:=20 URL: <http://www.ntg.nl/pipermai= l/ntg-context/attachments/20130223/f57ddc6c/attachment.tex>


_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________

--f46d04182616a94c4b04d6942c31-- --===============0941929858== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0941929858==--