This works perfectly for me.  Attached is a diff with minor syntax
changes to "\set stanza" for 2.27.2.  There's also a block comment for
the test harness.  It can then just be \include'd into my score.
 Wonderful.

I do however have a personal sense of unease.  I once came to rely on
another block of Scheme that I barely understood (another example of
"cargo-cult" coding).  I couldn't keep it updated for syntax/API
changes in lilypond, and for over a year that effectively locked me out
of all the scores that used it.  It would be wonderful if someone™ with
actual skills could merge this functionality into lilypond itself.

On Sun, 2026-11-15 at 15:20 +0000, Graham King wrote:
> Well, this list is usually prompt, polite and helpful but, Gabriel,
> you have just set a new record for the response time!  You have just
> posted an answer to the very question for which I was in the middle
> of composing an MWE.  I'll test your example later today.
> 
> Thanks!
> -- Graham

diff --git a/Carry_Mark_in_Lyrics_v5.ily b/Carry_Mark_in_Lyrics_v5.ily
index 82cb8ee..d40ff20 100644
--- a/Carry_Mark_in_Lyrics_v5.ily
+++ b/Carry_Mark_in_Lyrics_v5.ily
@@ -238,6 +238,7 @@ withLyricTieHarm = \with {
          DOWN))))
 }
 
+%{ % Comment out the test harness...
 
 %%% TEST 1: MWE from “O sacrum convivium” (Thomas Tallis); beginning
 %%% of the motet in the Discantus part, transposed up a whole step
@@ -263,10 +264,10 @@ text = \lyricmode {
     \new Voice = "discantus" \discantus
     \new Lyrics
       \with \withLyricTieClaude
-      \lyricsto "discantus" { \set stanza = "Claude:" \text }
+      \lyricsto "discantus" { \stanza "Claude:" \text }
     \new Lyrics
       \with \withLyricTieHarm
-      \lyricsto "discantus" { \set stanza = "Harm:" \text }
+      \lyricsto "discantus" { \stanza "Harm:" \text }
   >>
   \header { piece = "Test 1: Tallis, “O sacrum convivium” (Discantus, opening)" }
 }
@@ -308,10 +309,10 @@ testText = \lyricmode {
     \new Voice = "test" \testMelody
     \new Lyrics
       \with \withLyricTieClaude
-      \lyricsto "test" { \set stanza = "Claude:" \testText }
+      \lyricsto "test" { \stanza "Claude:" \testText }
     \new Lyrics
       \with \withLyricTieHarm
-      \lyricsto "test" { \set stanza = "Harm:" \testText }
+      \lyricsto "test" { \stanza "Harm:" \testText }
   >>
   \layout { ragged-right = ##t }
   \header { piece = "Test 2: whole words of different lengths, each on one note" }
@@ -346,6 +347,8 @@ depthMelody = \relative c'' {
 
 depthText = \lyricmode {
   Lord, \startTextSpan are \stopTextSpan
+  \once \override TextSpanner.details.left-overlap = #-0.2
+  \once \override TextSpanner.details.right-overlap = #0
   Lord, \startTextSpan are \stopTextSpan
   Lord, \startTextSpan are \stopTextSpan
 }
@@ -355,12 +358,12 @@ depthText = \lyricmode {
     \new Voice = "depth" \depthMelody
     \new Lyrics
       \with \withLyricTieClaude
-      \lyricsto "depth" { \set stanza = "Claude:" \depthText }
+      \lyricsto "depth" { \stanza "Claude:" \depthText }
     \new Lyrics
       \with \withLyricTieClaude
       % Try different values here (staff spaces):
       \with { \override TextSpanner.details.tie-height = 0.5 }
-      \lyricsto "depth" { \set stanza = "Fixed depth:" \depthText }
+      \lyricsto "depth" { \stanza "Fixed depth:" \depthText }
   >>
   \layout { ragged-right = ##t }
   \header { piece = "Test 3: Claude’s approach, with and without a fixed tie depth" }
@@ -406,13 +409,13 @@ splitTextTweaked = \lyricmode {
     \new Voice = "split" \splitMelody
     \new Lyrics
       \with \withLyricTieClaude
-      \lyricsto "split" { \set stanza = "Claude:" \splitText }
+      \lyricsto "split" { \stanza "Claude:" \splitText }
     \new Lyrics
       \with \withLyricTieClaude
-      \lyricsto "split" { \set stanza = "Tweaked:" \splitTextTweaked }
+      \lyricsto "split" { \stanza "Tweaked:" \splitTextTweaked }
     \new Lyrics
       \with \withLyricTieHarm
-      \lyricsto "split" { \set stanza = "Harm:" \splitText }
+      \lyricsto "split" { \stanza "Harm:" \splitText }
   >>
   \layout { ragged-right = ##t }
   \header { piece = "Test 4: a carry mark split by a line break" }
@@ -448,11 +451,13 @@ markupText = \lyricmode {
     \new Voice = "markup" \markupMelody
     \new Lyrics
       \with \withLyricTieClaude
-      \lyricsto "markup" { \set stanza = "Claude:" \markupText }
+      \lyricsto "markup" { \stanza "Claude:" \markupText }
     \new Lyrics
       \with \withLyricTieHarm
-      \lyricsto "markup" { \set stanza = "Harm:" \markupText }
+      \lyricsto "markup" { \stanza "Harm:" \markupText }
   >>
   \layout { ragged-right = ##t }
   \header { piece = "Test 5: no punctuation, and syllables written with markup" }
 }
+
+%}
\ No newline at end of file

Reply via email to