From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65608 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \bufferprefix in MKIV Date: Fri, 28 Jan 2011 15:18:48 -0500 (EST) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296245968 27907 80.91.229.12 (28 Jan 2011 20:19:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Jan 2011 20:19:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 28 21:19:21 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Piumr-0005Re-Rr for gctc-ntg-context-518@m.gmane.org; Fri, 28 Jan 2011 21:19:17 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E7761CAA06; Fri, 28 Jan 2011 21:19:16 +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 LBYypi9lYelQ; Fri, 28 Jan 2011 21:19:14 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E2AC9CA9F4; Fri, 28 Jan 2011 21:19:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 32637CA9F4 for ; Fri, 28 Jan 2011 21:19:12 +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 NULFdPpwa-gE for ; Fri, 28 Jan 2011 21:19:00 +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 732FCCA9D5 for ; Fri, 28 Jan 2011 21:19:00 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0SKIwHE018740 for ; Fri, 28 Jan 2011 21:18:59 +0100 Original-Received: FROM adi-netbook (Unknown [65.94.14.230]) By hackers.mr.itd.umich.edu ID 4D4324B0.449A1.4931 ; Authuser adityam; 28 Jan 2011 15:18:56 EST In-Reply-To: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05E18iWK9 - 55c66a0e3d5c - 20110128 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:65608 Archived-At: On Fri, 28 Jan 2011, Henning Hraban Ramm wrote: > Am 2011-01-27 um 20:08 schrieb Aditya Mahajan: > >> On a unrelated note, I have been thinking if I can extend the filter module >> to take care of features provided by lilypond and gnuplot modules. IIUC, in >> both these modules, the input is transformed before being written to an >> output file, then an external filter is run and the output is read back >> again. If we restrict ourselves to MkIV, then the transforming the input >> can be done in a lua function; the filter module already takes care of the >> rest of the book-keeping. >> >> Do you think that it makes sense to have such a feature? Then you could >> just define the gnuplot module as: >> >> \usemodule[filter] >> >> \defineexternalfilter[GNUPLOT] >> [filter={gnuplot --appropriate options}, >> conitnue=yes, >> transformation=thirddata.GNUPLOT.transformation, >> ] >> >> where thirddata.GNUPLOT.transformation is a lua function that does all the >> fancy processing. >> >> What do you think? > > I already replaced the LilyPond module by a filter setup, see > http://wiki.contextgarden.net/LilyPond > > It doesn't work completely the same, but good enough. > And since every user has different needs, the filter approach is more > flexible and thus better than a bunch of hardcoded setup options. Making the interface configurable is not too difficult. Here[1] is an example that replicates the main functionality of the gnuplot module (a separate inclusions environment and named figures, using the pdf terminal). I will also look at the functionality of the lilypond module in detail and see if I can replicate all features. [1]: https://github.com/adityam/filter/blob/dev/tests/gnuplot.tex 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 ___________________________________________________________________________________