Hi Trevor,

I absolutely agree. Seems like these examples need to follow our “tiny examples policy” and not use unnecessary complexity.

On 17.12.24 18:00, Trevor Bača wrote:
https://lilypond.org/doc/v2.25/Documentation/notation/tweak-and-single
[…]
< \single \easyHeadsOn c' g' >2

There’s no reason for this example to use \relative at all. It should simply be

{ < \single \easyHeadsOn c'' g'' >2 }

One line, nothing else needed. I won’t start debating the spaces within <> since I don’t have an entirely consistent policy on that myself…

https://lilypond.org/doc/v2.25/Documentation/notation/line-spanners

... shows four lines of code ...

\override Glissando.breakable = ##t
\override Glissando.bound-details.right-broken.Y = -3
c''1 \glissando \break
f''1

.... that will explode if users try to evaluate them. This is not a valid
LilyPond expression.

This applies to almost all of the examples on this page. IMO, the examples with a \relative expression starting _after_ the pertinent overrides are even worse, since in any normal use case it would be very weird to keep the overrides out of \relative{}. I’d argue that not only do these examples not require \relative, most of them don’t require explicit pitches at all. The last example could just as well be

{
\endSpanners{ 1\> }1 \bar "||"
\endSpanners{1\<1\startTextSpan}1
}

and thus avoid distractions.

Seems like someone™ should turn that into a patch/merge request… I’d love to contribute more that way myself, but I’m still unable to make time unfortunately.

Best, Simon

Reply via email to