To William:
Felix, I’m curious what you mean by cropping the file. Sounds to me like
you are trying to just write a small snippet of music, maybe a few
measures, and not have the output flooded by whitespace all around the
size of an A4 paper? This is also similar to what I was using lilypond
for and there are ways to do this without any external apps.
Actually this is exactly what I'm trying to do. My current setup uses a python library called svgpathtools to get the bounding box, then I do some basic manipulation of the width, height, and viewbox parameters to trim all of the excess whitespace out. Although I am very interested in how you can do this without any additional utilities.
To Henning Hraban Ramm:
I never used the SVG backend, but maybe the lilypond-book header works
with it, too?
It helps to create small snippets, I used the following settings in my
LilyPond setup for ConTeXt:
...
I gave this a go and it still seems to generate a large amount of whitespace.