I was following the caption subject in lily user list. I run the following (copy from the lists). I got error, please see the log at the end of lily code.
Thanks,
Ming
%lily code starts %%%%%%%%%%%%%%%%%
\version "2.17.27"
colorizeDir =
#(define-music-function (parser location item)
(symbol-list-or-music?)
(define (grob-colorize-dir grob)
(let ((ev (event-cause grob)))
(case (ly:event-property ev 'direction)
((1) red)
((-1) blue)
(else '())))))
#{ \tweak color #grob-colorize-dir #item #})
\new Staff \with { \colorizeDir Slur } {
c''^(
d'')
c''(
d'')
\undo \colorizeDir Staff.Slur
c''_(
d'')
<c'' e''>-\once \colorizeDir ^(
<d''
f''>)
}
% lily code ends %%%%%%%%%%%%%%
log file messAGE:
Starting lilypond-windows.exe 2.17.27 [Untitled (2)]...
Processing `c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly'
Parsing...
#
{ \tweak color #grob-colorize-dir #item #})
#{ \tweak color #
grob-colorize-dir #item #})
#{ \tweak color #grob-colorize-dir #
item #})
#{ \tweak color #grob-colorize-dir
#item #})
#{ \tweak color #grob-colorize-dir #item #
})
#{ \tweak color #grob-colorize-dir #item #}
)
Unbound variable: {
Unbound variable: grob-colorize-dir
Unbound variable: item
Unbound variable: }
Exited with return code 1.