Fix chord alignment: snap to word boundaries

Improve merge_chord_lyric() to snap chord positions to the start
of the word they fall within, instead of splitting words mid-way.
Fixes artifacts like "Liebespaar \chord{C}e" → "\chord{C}Liebespaare".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-04-02 16:36:06 +02:00
parent d875fd225b
commit 7b99778f67
295 changed files with 1804 additions and 1782 deletions

View File

@@ -9,14 +9,14 @@
}
\begin{verse}
Hans Spie \chord{C}lmann, stimme deine Fiedel, \\
es g \chord{G7}eht in Schritt und Tr \chord{C}itt. \\
Zum Abschied noch ein lustig Lied \chord{G}el, \\
wer L \chord{G7}ust hat, der singt m \chord{C}it. \\
/: Wir z \chord{C}iehen in die w \chord{F}eite, ja weite, \\
wunderschöne \chord{C} Welt hinaus. \\
Frisch auf zum frohen Wand \chord{G}ern, \\
wer Lu \chord{G7}st hat, bleibt zu H \chord{C}aus.:/
Hans \chord{C}Spielmann, stimme deine Fiedel, \\
es \chord{G7}geht in Schritt und \chord{C}Tritt. \\
Zum Abschied noch ein lustig \chord{G}Liedel, \\
wer \chord{G7}Lust hat, der singt \chord{C}mit. \\
/: Wir \chord{C}ziehen in die \chord{F}weite, ja weite, \\
wunderschöne \chord{C}Welt hinaus. \\
Frisch auf zum frohen \chord{G}Wandern, \\
wer \chord{G7}Lust hat, bleibt zu \chord{C}Haus.:/
\end{verse}
\begin{verse}