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,11 +9,11 @@
}
\begin{verse}
Was sollen wir trink \chord{e}en, sieben Tage lang, \\
was sollen wir trin \chord{e}ken, wir ha \chord{D}ben Durs \chord{e}t. \\
/: Es ist gen \chord{G}ug für al \chord{D7}le \chord{G}da, / da \chord{D7}rum lasst uns \\
tr \chord{e}inken,/ rollt das Fass here \chord{D}in, wir trinken \\
zusa \chord{e}mmen,/ nicht \chord{D}allein. \chord{e}:/
Was sollen wir \chord{e}trinken, sieben Tage lang, \\
was sollen wir \chord{e}trinken, wir \chord{D}haben \chord{e}Durst. \\
/: Es ist \chord{G}genug für \chord{D7}alle \chord{G}da, / \chord{D7}darum lasst uns \\
\chord{e}trinken,/ rollt das Fass \chord{D}herein, wir trinken \\
\chord{e}zusammen,/ nicht \chord{e}allein.:/
\end{verse}
\begin{verse}