2015-03-28 20:27 GMT+01:00 Mark Knoop <m...@opus11.net>: > At 14:13 on 28 Mar 2015, Trevor Bača wrote: >>Hi, >> >>Is there a way to do ... >> >> foo = #12 >> \new Staff \with { >> instrumentName = \markup { \hcenter-in \foo Percussion } >> } { ... } >> \new Staff \with { >> instrumentName = \markup { \hcenter-in \foo Violin } >> } { ... } >> >>... or equivalent? > > Just write #foo. Or even #(+ foo 3), #(/ foo 2.735), .... > > -- > Mark Knoop
How about: \version "2.19.17" val = 12 \layout { \context { \Staff \override InstrumentName.after-line-breaking = #(lambda (grob) (ly:grob-set-property! grob 'long-text (markup #:box ;; only for debugging, delete me #:hcenter-in val (ly:grob-property grob 'long-text)))) } } \new Staff \with { instrumentName = "Percussion" } { c''1 } \new Staff \with { instrumentName = "Violin" } { d''1 } HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user