lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with custom markup command?


From: Nicolas Sceaux
Subject: Re: help with custom markup command?
Date: Mon, 24 Jul 2006 11:07:51 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

"Monk Panteleimon" <address@hidden> writes:

> \markup \pad-markup #3 \large{ \with-color #(x11-color 'firebrick) \italic {
> \hspace #9 Deacon:} \override #'(line-width . 60) \justify{ What the deacon
> says. } }
>
> I want to condense this into a command so that {what the deacon says}
> constitutes the argument-in-question, whereas the rest of the formatting and
> the {deacon} argument remain the same. \markup \deacon{what the deacon says}
> would be fine. 
> Just plain \deacon{what the deacon says} would be even better. In fact it
> would be splendid, if only I could figure out where and what and how
> everything goes into the #(define ... scheme. Then I could alter that
> definition for use with {what everyone else who isn't singing says}.
> \rubric{some rubrics} etc. etc.

The first step is to convert your literal \markup expression to
scheme. Then substitue the part that should change with a variable name,
finally wrap this expression inside a define-markup-command expression.

The argument to your \deacon command, a markup, will be the justified
part.

#(define-markup-command (deacon layout props what-is-said)
                        (markup?)
  (interpret-markup layout props
    (markup #:pad-markup 3 
              #:large #:line (#:hspace 9
                              #:with-color (x11-color 'firebrick) #:italic 
"Deacon:"
                              #:override '(line-width . 60) what-is-said))))

\markup \deacon \justify {
  What the deacon says.
}

nicolas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]