Hi Mark & hi Harm, Brilliant. Just what I was looking for, and instructive in two different ways.
Thank you both. Trevor. On Sat, Mar 28, 2015 at 4:20 PM, Thomas Morley <[email protected]> wrote: > 2015-03-28 20:27 GMT+01:00 Mark Knoop <[email protected]>: > > 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 > [email protected] > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- Trevor Bača [email protected]
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
