lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unbound variable: \markup


From: Kevin Barry
Subject: Re: Unbound variable: \markup
Date: Mon, 4 May 2020 15:51:20 +0100

Hi Freeman,

> The first one below works fine but the second does not work when the
> dollar is replaced with \markup \vcenter \huge \bold "$".   Please
> explain why?    Why is \markup bound in the first and not in the
> second.    I see \markup used in many places like to the second
> example that works, what is the difference?

If you want to include lilypond syntax inside scheme syntax you have to
put #{ #} around it. Here is your second example, with that included
(which made the error go away for me):

\layout { 
  \context { 
    \Voice
    \override Accidental.before-line-breaking = 
    #(lambda (grob)
       (if (eqv? (ly:grob-property grob 'alteration) SHARP)
           (begin 
            (ly:grob-set-property! 
             grob 'horizontal-skylines 
ly:grob::horizontal-skylines-from-stencil)
            (ly:grob-set-property! 
             grob 'text #{ \markup \vcenter \huge \bold "$" #})
            (ly:grob-set-property! 
             grob 'stencil ly:text-interface::print))))
  }
}

Hope that works for you

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]