lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LilyPond and ConTeXt


From: Henning Hraban Ramm
Subject: Re: LilyPond and ConTeXt
Date: Sun, 8 Sep 2013 16:53:46 +0600

Am 2013-09-08 um 16:28 schrieb David Kastrup <address@hidden>:

>>>> 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)







reply via email to

[Prev in Thread] Current Thread [Next in Thread]