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

@@ -22,17 +22,17 @@
% zum Tode verurteilt wurde, steht dort leider nicht.
\begin{verse}
Was ka \chord{d}nn ich denn dafür? So kur \chord{F}z vor meiner Tür, \\
da f \chord{C}ingen sie mich ein, und bald e \chord{d}ndet me \chord{C}ine P \chord{d}ein. \\
Ich h \chord{d}atte niemals Glück. Mein tr \chord{F}ostloses Geschick \\
nahm kei \chord{C}nen von euch ein. Ja, heut so \chord{d}ll gest \chord{C}orben \\
se \chord{d}in. \\
Was \chord{d}kann ich denn dafür? So \chord{F}kurz vor meiner Tür, \\
da \chord{C}fingen sie mich ein, und bald \chord{d}endet \chord{C}meine \chord{d}Pein. \\
Ich \chord{d}hatte niemals Glück. Mein \chord{F}trostloses Geschick \\
nahm \chord{C}keinen von euch ein. Ja, heut \chord{d}soll \chord{C}gestorben \\
\chord{d}sein. \\
Refrain:
\end{verse}
\begin{verse}
/:W \chord{d}enn der Nebel auf das Mo \chord{C}or sich senkt, \\
der P \chord{B}iet am G \chord{A}algen h \chord{d}ängt.:/
\chord{d}/:Wenn der Nebel auf das \chord{C}Moor sich senkt, \\
der \chord{B}Piet am \chord{A}Galgen \chord{d}hängt.:/
\end{verse}
\begin{verse}