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

@@ -7,13 +7,13 @@
}
\begin{verse}
Die \chord{C}Affen r \chord{a}asen d \chord{C}urch den Wal \chord{a}d, \\
der \chord{C}eine ma \chord{a}cht den a \chord{C}ndern kal \chord{a}t. \\
Die ganze A \chord{G7}ffenbande brü \chord{C}llt: \\
Die \chord{C}Affen \chord{a}rasen \chord{C}durch den \chord{a}Wald, \\
der \chord{C}eine \chord{a}macht den \chord{C}andern \chord{a}kalt. \\
Die ganze \chord{G7}Affenbande \chord{C}brüllt: \\
Ref.: \\
/: Wo ist die K \chord{F}okosnuss, \\
wo ist die Ko \chord{C}kosnuss, \\
wer hat die Ko \chord{G7}kosnuss gekl \chord{C}aut? :/
/: Wo ist die \chord{F}Kokosnuss, \\
wo ist die \chord{C}Kokosnuss, \\
wer hat die \chord{G7}Kokosnuss \chord{C}geklaut? :/
\end{verse}
\begin{verse}