lilypond-user
[Top][All Lists]
Advanced

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

Re: A question about \override in markuplist


From: Peter Toye
Subject: Re: A question about \override in markuplist
Date: Sat, 30 Nov 2019 12:36:30 +0000

Carl,

Thanks for this. My comments are below.

Peter
-------------------------
Friday, November 29, 2019, 7:25:59 PM, Carl Sorensen wrote:


 Peter,
 
Thank you for asking this question.  It is good for us to have relatively new users let us know what things are confusing, so we can try to improve them.

I'm not that new - I think I first tried it out in 2013 - but very sporadic as I don't do much arranging these days.


 
I'm a bit confused by he documentation concerning  \override. In most of the LR and NR it is described as a LilyPond command which changes the value of a property.
 
This is correct. \override changes the value of Grob properties and \markup properties (but not Context properties, which are changed with \set, as described in the Learning Manual).


However, it also seems to appear as a special function within a \markup which adds, as opposed to changes, a property.value pair to the property list (which one isn't explicitly stated, but it can presumably be inferred from the context). Presumably the property value is removed from the list after the markup argument has been evaluated, so there is no need for a \revert command.
 
The property list is an argument to the \markup function (which applies to only a specific markup), rather than a property of a Grob, so it doesn’t affect anything other than the specific markup.
 
When Context properties are \set, they affect every item in the Context.
 
When Grob properties are \override(n), all Grobs of that type at the current moment (and forward, unless there is a \once) are affected.
 
When \markup properties are \override(n), only that specific markup is affected.
 
The Notation Reference appendices A.10 and A.11 list the properties used by each \markup command.  Any properties not used by a \markup command will be ignored if they are added to the property list by the use of \override.  Any required properties not found in the property list will be given default values as described in the Notation Reference appendices.

To sum up, am I right in thinking that within a \markup, the function supersedes the command?
 
I hope my explanation above answers this question.

It does, thanks.




I have to say, this does not feel like good program design. One does not usually have two built-in operators with the same name and different scopes. :)

 
I think it’s good program design.  It’s not unlike overloading the “+” operator such that it can both add integers and concatenate strings.  
 
Except in that the scope of the effects of the \override is different between the two cases. Outside a \markup the property change is permanent until \revert(ed). Within a markup the property s changed only for the following markup.


I think our documentation of the use of \markup properties could be made clearer.   One has to jump between multiple books to see how this works.

Not the only subject that this criticism could apply to :)  But I appreciate the need for not having duplication between NR and LR, and it's not easy to work out where a topic should go. In general, slightly better contents and indexing could help.  One example is that in NR "Bars" come under "Rhythm", whereas in LR they have their own heading. Took me ages to find it.... But on the whole it's pretty good.

 
Thanks,
 
Carl
 

reply via email to

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