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

@@ -6,11 +6,11 @@
}
\begin{verse}
N \chord{a}icht fürs \chord{F}Süße, n \chord{C}ur fürs S \chord{G}charfe u \chord{a}nd fürs Bi \chord{F}ttre \chord{C}bin ich \\
d \chord{G}a; \chord{C} Schlag, ihr \chord{E}Leute, \chord{a}nicht die Harfe, \chord{F}spiel die \\
Z \chord{G}iehharmo \chord{e}nika \chord{a}. \\
Ref:L \chord{a}ai la l \chord{F}ai lai, l \chord{G}ai la l \chord{C}ai lai, l \chord{a}ai la \chord{F}lai lai, \chord{G}lai la l \chord{a}a, \chord{F} schlag, \\
ihr \chord{G}Leute, n \chord{a}icht die Harfe, spiel \chord{F} die Ziehhar \chord{G}monika.
\chord{a}Nicht fürs \chord{F}Süße, \chord{C}nur fürs \chord{G}Scharfe \chord{a}und fürs \chord{F}Bittre \chord{C}bin ich \\
\chord{G}da; \chord{C}Schlag, ihr \chord{E}Leute, \chord{a}nicht die Harfe, \chord{F}spiel die \\
\chord{a}Ziehharmonika. \\
\chord{a}Ref:Lai la \chord{F}lai lai, \chord{G}lai la \chord{C}lai lai, \chord{a}lai la \chord{F}lai lai, \chord{G}lai la \chord{a}la, \chord{F}schlag, \\
ihr \chord{G}Leute, \chord{a}nicht die Harfe, spiel \chord{F}die \chord{G}Ziehharmonika.
\end{verse}
\begin{verse}