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

@@ -10,15 +10,15 @@
}
\begin{verse}
Ive \chord{D} been a wild rover for many a y \chord{G}ear, \\
I s \chord{D}pend all my money on whi \chord{A}skey and beer. \\
Ive \chord{D}been a wild rover for many a \chord{G}year, \\
I \chord{D}spend all my money on \chord{A}whiskey and beer. \\
But now Im returning with gold in great \chord{G}store \\
and I \chord{D}never will play the wild r \chord{A}over no \chord{D}more.
and I \chord{D}never will play the wild \chord{A}rover no \chord{D}more.
\end{verse}
\begin{verse}
And its n \chord{A}o, nay, never, no nay n \chord{D}ever no mo \chord{G}re \\
will I \chord{D}play the wild \chord{G}rover no n \chord{D}ever, \chord{A}no \chord{D} more.
And its \chord{A}no, nay, never, no nay \chord{D}never no \chord{G}more \\
will I \chord{D}play the wild \chord{G}rover no \chord{D}never, \chord{A}no \chord{D}more.
\end{verse}
\begin{verse}