![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sun, 20 Jan 2013, Henning Hraban Ramm wrote:
I'm using t-filter with LilyPond for my songbooklets like this:
-----
\def\readPDFfile#1{\externalfigure[#1]}
\usemodule[filter] \defineexternalfilter[lilypond] [continue=yes, readcommand=\readPDFfile, directory=lilytemp/, output={\externalfilterbasefile.pdf}, filtercommand={lilypond -dbackend=eps -dinclude-eps-fonts -dno-gs-load-fonts -o"lilytemp/\externalfilterbasefile" "\externalfilterinputfile"}]
-----
Now, I'd like my lilypond sections/buffers to have different names than just numbers; I'd prefer some unique IDs or even manually set names to be able to re-order them without the need of re-compiling. I.e. if I change the order of songs in my songbook, all LilyPond snippets must get recalculated, even if they didn’t change.
Does \startlilypond[name=one] .... \stoplilypond what you are looking for? (see the docs for how this behaves behind the scenes)
There are some more enhancements that I’d like to implement, e.g. checking the resulting files if there are several pages or using single notelines to let ConTeXt do the page breaking (like lilypond-book does with LaTeX). I guess that would be as simple as replacing my \readPDFfile with some Lua code - can you give me a hint how to do that?
See grph-inc.*. I'll post an example later on how to handle single page and multipage pdfs differently. Aditya