Hi all, Found the correct solution (I think):
#(define-markup-command (when-property layout props symbol markp) (symbol? markup?) (if (chain-assoc-get symbol props) (interpret-markup layout props markp) (ly:make-stencil '() empty-interval empty-interval))) At least that *seems* to do the right thing — if I've set myself up for disaster, I'd appreciate being corrected. =) Thanks, Kieren. On 2013-Jul-30, at 19:25, Kieren MacMillan <kieren_macmil...@sympatico.ca> wrote: > Hello all, > > This \when-property function (whence I found it, I can't remember) clearly > doesn't work as expected: > > \version "2.17" > > #(define-markup-command (when-property layout props symbol markp) (symbol? > markup?) > (if (chain-assoc-get symbol props) > (interpret-markup layout props markp) > (ly:make-stencil '() '(1 . -1) '(1 . -1)))) > > \paper { > scoreTitleMarkup = \markup \column { > \when-property #'header:foo { \fromproperty #'header:foo } > \when-property #'header:bar { \fromproperty #'header:bar } > \when-property #'header:foo { \fromproperty #'header:foo } > \when-property #'header:bar { \fromproperty #'header:bar } > \when-property #'header:foo { \fromproperty #'header:foo } > \when-property #'header:bar { \fromproperty #'header:bar } > \when-property #'header:foo { \fromproperty #'header:foo } > \when-property #'header:bar { \fromproperty #'header:bar } > \fromproperty #'header:title > } > } > > \header { > title = TEST > } > > \score { > \relative c' { c1 } > } > > How can it be made truly conditional (so that the titling line/item takes up > no vertical space if the property is null)? > > Thanks, > Kieren. > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user