Hi Neil and Simon,
I also combined your solutions, but it isn't easy this time. I don't know how to
make the following code run without error.
timesig = #(define-music-function (parser location numerator denominator)
(number? number?)
#{
\once \override #'(baseline-skip . 1)
{\center-column {\number #'numerator=$numerator
\number #'denominator=$denominator}}
#})
\markup {\timesig #3 #4}
I just mimic the example of define-music-function in lilypond's manual. It seems
the arguments transferring is not right.
Thanks a lot!
Best wishes,
Wei-Wei
Neil Puttock 写道:
2009/4/13 Simon Bailey <[email protected]>:
On Apr 13, 2009, at 3:17 PM, Wei-Wei Guo wrote:
Combining your solutions, the following way is the better, but still to
long...
\markup{ \override #'(baseline-skip . 1) {\center-column {\number 2
\number 4}}}
define this as a variable, then you only have to type it once:
If you need to produce several different time signature markups, you
could create a new markup command:
#(define-markup-command (timesig layout props numerator denominator)
(number? number?)
(interpret-markup layout props
(markup
#:override '(baseline-skip . 0)
#:number
(make-center-column-markup
(map number->string (list numerator denominator))))))
\markup \timesig #3 #4
Regards,
Neil
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user