[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: order of function arguments
From: |
Janek Warchoł |
Subject: |
Re: order of function arguments |
Date: |
Tue, 23 Apr 2013 19:03:52 +0200 |
2013/4/23 David Kastrup <address@hidden>:
> Janek Warchoł <address@hidden> writes:
>> So, a \tweak gets, so to speak, "internally transformed to an
>> override"? This is cool!!
>
> Well, it no longer has music to apply to, only a grob name. I am not
> enthused about the resulting syntax/order when one _does_ need to
> specify properties or subproperties for a command using \tweak
> internally when employing it as an override.
>
> But at least as a tweak, it looks nice.
I've just read the definition of \tweak. From what i understand, it's
entirely possible to write a function that will do a tweak if one of
its arguments is a symbol, and do an override if that argument is a
symbol-list? Something like this:
foo =
#(define-music-function (parser location prop value music)
(symbol-list-or-symbol? scheme? music?)
(if (symbol? item)
#{ \tweak #prop #value #music #}
#{ \once\override #(append a b) = #value #}))
{
\foo NoteHead.color #red % use as \once\override
c'1-\foo #color #red -> % use as \tweak
}
best,
Janek
- order of function arguments (was: Add the command \offset), Janek Warchoł, 2013/04/21
- Re: order of function arguments, David Kastrup, 2013/04/21
- Re: order of function arguments, Janek Warchoł, 2013/04/23
- Re: order of function arguments, David Kastrup, 2013/04/23
- Re: order of function arguments, Janek Warchoł, 2013/04/23
- Re: order of function arguments, David Kastrup, 2013/04/23
- Re: order of function arguments, Janek Warchoł, 2013/04/23
- Re: order of function arguments, David Kastrup, 2013/04/23
- Re: order of function arguments,
Janek Warchoł <=
- Re: order of function arguments, David Kastrup, 2013/04/23
- Re: order of function arguments, Janek Warchoł, 2013/04/23
- Re: order of function arguments, David Kastrup, 2013/04/24