thanks a lot for your help.
> what you're trying to do seems to be creating a staff system on the
fly,
-Yes, that's exactly what I was trying to do, only I had copied out the example provided by the LSR archive:
file:///Users/alistairzaldua/Documents/Lilypond%20Stuff/Lilypond-texts/lilypond-2.11.56-1.documentation/input/lsr/lilypond-snippets/Staff-notation.html#Staff-notation
I used your example but unfortunately it wouldn't parse, I also tried trouble-shooting using the % trick, but I still couldn't locate the error, the message being:
/Applications/LilyPond-2.11.56-1.app/Contents/Resources/share/
lilypond/current/ly/init.ly:49:66: error: syntax error,
unexpected $end
(ly:parser-error parser (_ "expected error, but none found"))))
I think your suggestion of creating contexts is definitely the way to go, so will look into that.
Greetings,
alistair