Graham King <lilyp...@tremagi.org.uk> writes: > On Fri, 2017-09-01 at 20:35 +0200, David Kastrup wrote: >> Graham King <lilyp...@tremagi.org.uk> writes: >> >> > On Fri, 2017-09-01 at 19:06 +0200, David Kastrup wrote: >> >> >> >> I'd just try (equal? markupContents "") here. equal? can compare any >> >> objects for "equality", and at least "" as input should compare equal >> >> then. >> >> >> > thanks David. I'm getting "Missing or extra expression in (if (equal? >> > markupContents ""))" >> >> Well, missing. You have a condition but no expression to be evaluated >> depending on it. >> > Thanks again David. After a long struggle, I've got somewhere. The > result is probably inelegant enough to cause some sucking of teeth > among the congnoscenti, but it works for me: > > ( if ( equal? #{ \markup #markupContents #} > #{ \markup { \concat { "" "" "" } } #} )
Ouch. I've forgotten that markups are just assembled when you write them and are only interpreted when using interpret-markup . Only then does \markup \line { \concat { "" "" "" } } collapse to an empty stencil. So you probably had to mimic the contents of markupContents in order to get equal? to do something reasonable. Sorry for that. > #{ <> #} > (case whereMarkup > ((system) #{ \mark #markupContents #}) > ((staff) #{ <>^ #markupContents #}) > (else #{ \mark \markup \color #red #markupContents #}) > )) -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user