Kevin Barry <barr...@gmail.com> writes: > On 21 January 2016 at 13:02, Ralph Palmer <palmer.r.vio...@gmail.com> wrote: > >> I can't figure out how to revert for that one bar > > > There are two ways to do this: > 1) move your \override from the \with {} block into the beginning of the > music expression so that you can \revert it later on, when you need to
Reverting does not depend on whether the override happened in a \with expression or with an explicit \override. However, the overrides in context definitions and \with expressions _accumulate_ on the stack while normal \override _replaces_ the topmost override. So if you want to get back a _previous_ context-specific value (many grob property values are just established as global defaults and are impervious to reverting) through reverting, you need to use \temporary\override instead of \override. > 2) check what the default value is in the internals manual and use > that as a value for an override If there _is_ a default value, reverting should get you there. Here is an example for accumulating overrides:
\layout { \context { \Staff \override NoteHead.color = #red \override NoteHead.color = #blue } } \fixed c' \new Staff \with { \override NoteHead.color = #green } { c1 \revert Staff.NoteHead.color g \revert Staff.NoteHead.color e \revert Staff.NoteHead.color c }
-- David Kastrup
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user