[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
conditional \when-property
From: |
Kieren MacMillan |
Subject: |
conditional \when-property |
Date: |
Tue, 30 Jul 2013 19:25:49 -0400 |
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.
- conditional \when-property,
Kieren MacMillan <=