![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
Christopher Creutzig wrote:
Yes, but those are not suitable for inclusion because they are full-size A4 pages. I tried using them first, but couldn't get the information needed to properly clip the A4 pages to the required part.
It means you can't include the header I copied from lilypond-book to get cropped output with the default backend.
I just found what I was looking for for quite some time: http://www.tug.org/tex-archive/support/pdfcrop/ I may be wrong, but I guess that the code doesn't do much more than calling ghostscript with -sDEVICE=bbox, parsing the data and cropping the page according to the information provided by ghostscript. I guess that this could be integrated into scripts in ConTeXt in quite an elegant way. Before I downloaded the pdfcrop script mentioned above, I was dreaming about being able to say something like texexec --pdf --crop filename.tex (or even texexec --png --transparent --r200 filename.tex) for quite some time. If cropping support would be built into ConTeXt, you wouldn't need to ask lilypond for cropping, but ConTeXt scripts could do that for you. (In the worst case you can still use the script mentioned above.) Mojca And another said information (for windows users only): if you want to call lilypond from command line, you have to call it with the whole path, ie: C:/prog/lilypond/usr/bin/lilypond. Developers don't know how to fix that, so the one who needs to use lilypond under windows has to modify path to lilypond in the module by hand. I guess there's no trivial solution to find where a certain executable is residing (I have "which.exe", but this is way too complicated/not worth the effort.)