|
From: | Marc Hohl |
Subject: | Re: How to create shortcut to a command? |
Date: | Wed, 06 May 2009 11:11:31 +0200 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090318) |
Marc Mouries schrieb:
Thanks a lot guys this is helpful. I am trying to make the lily code easier to read.I also have many command to write the position like "^\markup { \small "IV" }" and "^\markup { \small "IIII" }" and so on, would you know how to create a command that takes an argument?
I searched for "markup" in the LSR and found the following snippet: http://lsr.dsi.unimi.it/LSR/Item?id=349 So you can define a command like \smark as follows: smark =#(define-music-function (parser location string) (string?) (make-music 'TextScriptEvent 'direction UP 'text (markup #:small string))) and put it _before_ the note where it should appear: c4 \smark "III" d \smark "IV" e f Here, the "III" appears over the d, while "IV" is placed over the e. Marc
On Apr 27, 2009, at 6:09 AM, Francisco Vila wrote:2009/4/27 Dmytro O. Redchuk <address@hidden>:2009/4/27 Francisco Vila <address@hidden>:2009/4/27 Dmytro O. Redchuk <address@hidden>:% or even, i guess, this should work: <note> _\markup { \italic "poco" \rit }Yes, it does, but how would you do it for \upbow and \downbow?:-) Don't know.I have investigated a bit how downbow is defined and I've found it in the source code in ly/script-init.ly so we can write db = #(make-articulation "downbow") ub = #(make-articulation "upbow") { c' \db c' \ub } -- Francisco Vila. Badajoz (Spain) www.paconet.org_______________________________________________ lilypond-user mailing list address@hidden http://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |