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=....` 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’d 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’d parse that with Lua and place all those small PDFs. I just need a clue how I must define t-filter’s "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 = 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=\ParseLilypondFile, .... ]
Thank you very much! It’s been a while since I wrote my last Lua code for ConTeXt... I’ll 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)