lilypond-user
[Top][All Lists]
Advanced

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

Re: modular "markup" and arguments


From: David Kastrup
Subject: Re: modular "markup" and arguments
Date: Wed, 06 Nov 2013 00:21:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Johan Vromans <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
>> For such fixed override/revert pairings you should write
>> \temporary\override in the music function instead of just \override:
>> otherwise any previous \override NoteHead.color = #blue will get
>> overwritten and not get restored afterwards.
>
> You mean this will not work:
>
>   \override NoteHead.color = #blue
>   ...blue music...
>   \override NoteHead.color = #red
>   ...red music...
>   \revert NoteHead.color
>   ...blue music...
>   \revert NoteHead.color
>   ...boring music...

Correct.  In stack terms, \revert is a "pop" while "\override" is "pop,
push" (each context has its own stack).  In contrast,
"\temporary\override" is just "push".  So a sequence of

\temporary\override
\override
\override
\override
\revert

on the same property leaves it in the original state.

-- 
David Kastrup




reply via email to

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