Hello all,

In the snippet included below, I’m hoping the second line of the 
scoreTitleMarkup will take no vertical space. If you comment out that line, 
you’ll see that it *does* take no space, but when it’s included, so is the 25mm 
spacing that is [I thought] conditional on the presence of a ‘testB’ property 
in the property.

Where is my code going wrong?
More precisely, how can I make it work as intended?  =)

Thanks,
Kieren.

%%%%  SNIPPET BEGINS
\version "2.19.46"

#(define-markup-command (when-property layout props symbol markp) (symbol? 
markup?)
  (if (chain-assoc-get layout props symbol markp)
      (interpret-markup layout props markp)
      empty-stencil))

#(define-markup-command (mm-feed layout props amount) (number?)
 (let ((o-s (ly:output-def-lookup layout 'output-scale)))
   (ly:make-stencil "" '(0 . 0) (cons 0 (abs (/ amount o-s))))))

#(define-markup-command (put-mm layout props dir amount arg)
 (ly:dir? number? markup?) (interpret-markup layout props
   (markup #:put-adjacent Y dir arg #:mm-feed amount)))

\header {
  testA = "True!"
  testC = "True!"
}

\paper {
  scoreTitleMarkup = \markup \center-column {
    \when-property #'header:testA { \put-mm #UP #25 \fromproperty 
#'header:testA }
    \when-property #'header:testB { \put-mm #UP #25 \fromproperty 
#'header:testB }
    \when-property #'header:testC { \put-mm #UP #25 \fromproperty 
#'header:testC }
  }
}

\score {
  c'4
}
%%%%  SNIPPET ENDS

________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to