Thank you, Carl!
I see that in your snippet/example, you overrode
Lyrics.VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance to #5
(default is #5.5). The output looks good to me. Thanks again.
I have also come up with the following other approach, which has the
advantage that it does not require any overrides:
%%% SNIPPET BEGINS
\version "2.24.4"
#(define-markup-command (squaremata layout props text) (markup?)
"Place a long fermata centered above the given text, with
baseline-skip of 2.2 and *a glyph height of 2 staff spaces above the text*
."
(interpret-markup layout props
(markup
#:override (cons 'baseline-skip 2.2)
#:override (cons 'direction UP)
#:dir-column
(#:center-align text
#:center-align
* (#:with-dimension Y '(0 . 2) ; adjust as needed * #:musicglyph
"scripts.ulongfermata")))))
<<
\relative {
\repeat unfold 4 { c'1 } \break
\repeat unfold 5 { c1 } \break
\repeat unfold 8 { f } \break
\repeat unfold 5 { f } g, \repeat unfold 5 { f' } \break
\repeat unfold 7 { g,1 }
}
\new Lyrics { \lyricmode {
no collision with \markup \squaremata glyph;
no glyphs in this system;
no ledger line or collision in this \markup \squaremata system;
no col -- li -- sion in this \markup \squaremata system, ei -- ther;
hoo -- ray!
Test:
\markup \concat { \squaremata "This" " is a long lyric" }
and *everything is working now! *
}
}
>>
%%% SNIPPET ENDS
On Thu, 8 Jan 2026, Carl Sorensen wrote:
> > LilyPond is not “seeing” the obvious collision in measure 25 between the
> note head and the long fermata and padding appropriately. Why?
>
> You explicity tell LilyPond that the long fermata has no size with the
> following line:
>
> >> (#:with-dimensions-from #:null ; % removing this line pushes
> lyrics too far below their relatedstaff
>
> Since the long fermata has zero dimension, it cannot collide with anything
> else.
>