From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80362 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Re: t-filter for LilyPond enhancements Date: Sun, 20 Jan 2013 21:35:31 +0100 Message-ID: <3858932E-1242-408E-91E7-21E4933B088E@fiee.net> References: <4707DFCF-783C-439F-B3F0-F80D74943C3F@fiee.net> <48E85065-3C8A-4E01-8E02-E946A24321D9@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358714140 10338 80.91.229.3 (20 Jan 2013 20:35:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2013 20:35:40 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 20 21:35:59 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 1Tx1cQ-0004PP-R5 for gctc-ntg-context-518@m.gmane.org; Sun, 20 Jan 2013 21:35:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7D27101EA; Sun, 20 Jan 2013 21:35:37 +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 tIKNY5YQFmJU; Sun, 20 Jan 2013 21:35:36 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EBC30101E5; Sun, 20 Jan 2013 21:35:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8863101E5 for ; Sun, 20 Jan 2013 21:35:34 +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 3EKJr7qLWXbs for ; Sun, 20 Jan 2013 21:35:33 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 6ED1E101E2 for ; Sun, 20 Jan 2013 21:35:33 +0100 (CET) Original-Received: from thesan.fiee.net (thesan.fiee.net [178.77.74.245]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0KKZW1O022566 for ; Sun, 20 Jan 2013 21:35:32 +0100 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=fiee.net; b=axkAjdeWF/C6HFr63bU9TylbEEv9MmuwF5PtIvgvupCgktgetreJpid8n1qX9Vv03Z6o9J06nRsiUD+3U7yW2FchrapRJBC7VQ4NXxGc+DbMCrsBBXeuFygW2qFPm76E; h=Received:Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; Original-Received: (qmail 26485 invoked from network); 20 Jan 2013 21:35:32 +0100 Original-Received: from hsi-kbw-149-172-52-191.hsi13.kabel-badenwuerttemberg.de (HELO ixchel.fritz.box) (149.172.52.191) by thesan.fiee.net with ESMTPSA (AES128-SHA encrypted, authenticated); 20 Jan 2013 21:35:32 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1085) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=178.77.74.245; country=DE; region=07; city=Duisburg; latitude=51.4333; longitude=6.7500; http://maps.google.com/maps?q=51.4333,6.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NIOkzwIz - b790b05eeb27 - 20130120 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:80362 Archived-At: Am 2013-01-20 um 21:19 schrieb Aditya Mahajan: > Unfortunately no. The name key is reset at every `\startexternalfilter`; = otherwise it will be difficult to mix `name=3D....` with normal usage. What do you think about using UIDs (or maybe some hash value of the buffer)= instead of serial numbers? It might help with other uses of t-filter to be= able to re-order the filter sections without re-compiling. >> Thanks, handling of multipage PDFs might help, but I=92d try a different= approach: LilyPond can generate EPS/PDF for single note systems and writes= the number of them into a simple text file. I=92d parse that with Lua and = place all those small PDFs. I just need a clue how I must define t-filter= =92s "readcommand" as a Lua function. > = > Something like this: > = > \def\ParseLilypondFile#1% > % #1 is the name of the output file > {\ctxlua{thirddata.parselilypondfile("#1")} > = > \startluacode > thirddata =3D thirddata or {} > function thirddata.parselilypondfile(name) > --- parse "name" file as you wish and > --- generate approapriate context(...) commands > --- to write back to ConTeXt > end > \stopluacode > = > \defineexternalfilter[lilypond] > [ > ..... > readcommand=3D\ParseLilypondFile, > .... > ] Thank you very much! It=92s been a while since I wrote my last Lua code for= ConTeXt... I=92ll just update the LilyPond wiki page (and then delete everything about= the old LilyPond module). Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________