[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
conditional markup
From: |
Orm Finnendahl |
Subject: |
conditional markup |
Date: |
Sat, 14 Jun 2014 15:07:34 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
for defining markups which appear selectively either only in the
parts or only in the score I'm trying to use the following strategy:
I include a "score-defs.ly" or "part-defs.ly" file in the score or
part respectively and define commands like "sMarkup" for markup only
appearing in the score or "pMarkup" for markup only appearing in the
part by defining them to be effective or have no effect accordingly in
the part-defs and score-defs.
Unfortunately I can't seem to get the definition straight for the
custom markup command to mimic the original markup command.
Below is one of my futile attempts. Can anybody help?
\version "2.9.15"
sMarkup =
#(define-music-function
(parser location markuptext)
(markup?)
#{
\markup { #markuptext }
#})
\relative c' { a'^ \sMarkup "Test" }
-------------------------------------------
result:
Parsing...
/tmp/markup-def.ly:11:20: error: music function cannot return (#<procedure
line-markup (layout props args)> (Test))
\relative c' { a'^
\sMarkup "Test" }
/tmp/markup-def.ly:11:20: error: post-event expected
\relative c' { a'^
\sMarkup "Test" }
- conditional markup,
Orm Finnendahl <=
- Re: conditional markup, Phil Holmes, 2014/06/14
- Re: conditional markup, David Kastrup, 2014/06/14
- Re: conditional markup, Orm Finnendahl, 2014/06/15
- Re: conditional markup, David Kastrup, 2014/06/15
- Re: conditional markup, Orm Finnendahl, 2014/06/15
- Re: conditional markup, David Kastrup, 2014/06/15
- Re: conditional markup, Orm Finnendahl, 2014/06/15
- Re: conditional markup, James, 2014/06/15