Trevor Bača <trevorb...@gmail.com> writes: > Are hyphens no longer required to prefix postevent tweaks?
They are still required. > For years I've been writing a hyphen ... > > - \tweak color #red > \startTextSpan > > ... to tweak text spanners but no hyphen ... > > <c' > \tweak color #red > d' > b'>4 > > ... to tweak note heads. > > As of 2.25.6, the difference between the two forms of \tweak no longer > appears necessary: globally replacing thousands of "- \tweak ..." with > just "\tweak ..." now seems to work perfectly. Don't. > This change is really great! Trying to divine (and then remember) > which of dozens of grobs are postevents (versus events?) was a > pain. And the effort now appears no longer necessary. Post events from music functions (like \tweak) are now accepted into music lists (though not necessarily elsewhere). When a music list is completed, there is a clean-up sweep attaching lone post events to the preceding music. This may be too late and/or the preceding music may be too complex to attach a post-event to it. Check for example { \magnifyMusic 2 c'2-\tweak color #red \p \magnifyMusic 2 c'2 \tweak color #red \p } > Is the change intentional? I must have missed it in CHANGES, It's a 2.22 change (2.21.0 actually). You are right that it doesn't appear in "Changes" in 2.22. Part of the reason is that it is a patch more intended to silence the user than LilyPond by attempting a "do what I mean" on a superset of valid input with a reasonably straightforward patchup attempt. The above at least gives off a warning. But if you, for example, do { \displayLilyMusic c'2-\tweak color #red \p \displayLilyMusic c'2 \tweak color #red \p } you get differing results and not even a warning. Overall, it is an improvement, but relying on it is a bad idea. > and the NR entry for \tweak > <https://lilypond.org/doc/v2.25/Documentation/notation/the-tweak-command#index-_005ctweak-1> > still shows ... > > \relative { c'-\tweak thickness #5 ( d e f) } % hyphen > > ... even though ... > > \relative { c' \tweak thickness #5 ( d e f) } % no hyphen > > ... works under 2.25.6. As long as you cannot rely on it working outside of simple cases, it is not a good idea to advertise it. > Thanks so much for this! If you want to check the discussion, this was issue 5181. It's a Pyrrhic horse, really. -- David Kastrup