[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: custom markup help
From: |
Damian leGassick |
Subject: |
Re: custom markup help |
Date: |
Sun, 24 May 2015 11:07:44 +0100 |
On 23 May 2015, at 13:11, Klaus Blum wrote:
> Hi Damian,
>
> aah, Nick was faster than me... :-)
>
> The easiest way I've found would be this:
>
> % ---------------------------------------------------------------
> \version "2.18.0"
>
> #(define-markup-command (sd layout props sdnum) (markup?)
> "Put a number with a carat above the note."
> (interpret-markup layout props
> #{\markup {
> \override #'(baseline-skip . 0.5)
> \column { \small {^ #sdnum }}
> }
> #}))
>
> {g^\markup \sd 3}
> % ---------------------------------------------------------------
>
> If you dont want to use "\markup" every time, you also could work like this:
>
> % ---------------------------------------------------------------
> \version "2.18.0"
>
> sd = #(define-music-function (parser location sdnum)
> (markup?)
> "Put a number with a carat above the note."
> #{
> -\markup {
> \override #'(baseline-skip . 0.5)
> \column { \small {^ #sdnum }}
> }
> #})
>
> {g^\sd "3"}
> % ---------------------------------------------------------------
>
> Cheers,
> Klaus
>
>
Thanks Klaus
now to combine yours and Nick's version so that I can override the
baseline-skip set by your music-function
Damian