On Wed, May 9, 2012 at 10:13 AM, Urs
Liska
<address@hidden>
wrote:
Hi David,
now I tested your new function.
OK, I didn't test more than the sources you provided, but I
think they give all the necessary combinations.
So my conclusion is: This is awesome!
I won't ever live without this (as long as LilyPond is
concerned) anymore - as long as it won't get broken by new
versions.
Great! I'm very happy to hear this!
One idea to make it
even more comfortable and generic to use would be not to
hard-code the color within the function.
If one could somehow set the color outside the function one
could personalize it to ones needs.
As this is kind of a library thing, I think it isn't
necessary to make this settable at runtime through the
function call.
Maybe one could define a variable for the color above the
function, setting #black as default.
Then anybody can easily see how to adapt it even if she/he
doesn't understand the function itself.
Ah, I just realized that this way one could still set the
color in the music source by redefininge the variable ...
I would be happy about this enhancement.
But I really have to admit that this is quite low priority
because the function is already extremely helpful.
This isn't difficult to do. As you say, you could define a
variable for color above the function. All you would need to
do then is replace red with the name of the variable in the
two places it occurs. In the attached file, I do this and
give several ways of specifying the color you want. (Of
course, it's the last definition that is actually used.)
Best and thanks again
Urs
You're very welcome!
Best,
David