[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom markup
From: |
Nicolas Sceaux |
Subject: |
Re: Custom markup |
Date: |
Tue, 19 Jul 2005 20:36:18 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
"Sven Axelsson" <address@hidden> writes:
> OK, thanks. That gives the correct output.
>
> But how would I wrap this into a self-contained command?
>
> If I try
>
> tc = \once \override TextScript #'staff-padding = #2 \markup { \column { "T"
> "C" } }
>
> then Lily fails (understandably) when I try to use as { a_\tc }
>
> I would like to have the command completely self-contained,
> since this is an abbreviated notation, and I want to be able to
> switch between this and the full notation that instead inserts
> a complex grace note, without any changes to the score.
>
> That is also the reason for why I want the syntax to be
>
> { a\tc } instead of { a_\tc }
You can write a music function that takes a note as an argument, and
returns the override, the note and its markup.
%[not tested]
\version "2.7.1"
tcdown = #(def-music-function (parser location note) (ly:music)
#{
\once \override TextScript #'staff-padding = #2
$note _\markup \column { T C }
#})
{ \tcdown a }
nicolas