Am 2013-09-08 um 16:28 schrieb David Kastrup <[email protected]>: >>>> Right now, which is the best choice for putting ConTeXt and LilyPond >>>> together? (Your answer might be "Don't bother, just use LaTeX", if you >>>> have a good reason for saying that.) >>> >>> Hehe – just use LaTeX ;-) >> >> I would not. Let’s not start a flame war here. > > Context is not supported by Lilypond-book as far as I can tell. That > might be a worthwhile project for a Context user.
No, the approach is different. Lilypond-book is a preprocessor that works on a pre-LaTeX source, extracts the LilyPond snippets, compiles them and writes a LaTeX source with image inclusions back. (As far as I understand.) With ConTeXt we use the "filter" module to call external programs on snippets at runtime (keeping track of changes, to avoid unnecessary runs), i.e. in the LilyPond case we write everything between \startlilypond and \stoplilypond into a buffer file, run LilyPond on it (if the snippet’s MD5 sum is different than the previous version) and inject the image inclusion directly into ConTeXt’s processing stream. On the wiki page I show my version of the setup: http://wiki.contextgarden.net/LilyPond It’s really simple Lua code. (Ok, you have to get used to ConTeXt’s use of Lua.) The biggest part is the lookup on the number of systems - I decided to include single systems to let the page breaking to ConTeXt. Both approaches have their merits, I guess. Greetlings, Hraban --- fiëé visuëlle Henning Hraban Ramm http://www.fiee.net http://angerweit.tikon.ch/lieder/ https://www.cacert.org (I'm an assurer) _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
