Le 25 avr. 2010 à 08:13, Mark Polesky a écrit : > In both: > Notation 5.6.1 "Substitution function syntax", and > Extending 2.1.2 "Simple substitution functions", > > it says that variables inside the music block part of a > music-function definition should be referenced using the > hash-cash notation (#$), but this clearly doesn't work in > several significant cases: > > \tempo \markup { \bold #$tempotext } > #$note > > In fact, I did an experiment where I took every example from > these sections, removing the # from every #$, and all the > examples still compiled fine. Are there any cases where the > #$ is actually needed? Also, for cases where both #$ and $ > work, is there any reason that omitting the # would be bad > practice or something? Any additional insights would be > appreciated too.
Inside the #{ ... #} construct, you have to you #$variable where a scheme token is required, but you use $variable where \variable could be used. Behind the scence, $variable is actually replaced by something like \tmpvar before being parsed. In your example, in regular LilyPond notation, you can write: tempotext = "blablah" and then later use this variable: \tempo \markup \bold \tempotext So you can write: #{ \tempo \markup \bold $tempotext #} The same way: music = { c' d' e' } { a b \music f' g' } So you write: #{ a b $music f' g' #} The question to answer when in doubt is: can I use a backslashed variable here? Nicolas _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel