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

@@ -5,16 +5,16 @@
\begin{verse}
\chord{A}Oh, I thought I heard the old Man say: \\
\chord{E}Leave her, Johnny, l \chord{A}eave her.“ \\
Tom \chord{D}orrow y \chord{A}ou will \chord{h}get your p \chord{A}ay. \\
And its ti \chord{A}me for \chord{E}us to l \chord{A}eave her.
\chord{E}Leave her, Johnny, \chord{A}leave her.“ \\
\chord{D}Tomorrow \chord{A}you will \chord{h}get your \chord{A}pay. \\
And its \chord{A}time for \chord{E}us to \chord{A}leave her.
\end{verse}
\begin{verse}
Ref.: \chord{E}Leave her, Johnny, l \chord{A}eave her! \\
Oh, l \chord{D}eave her, Johnny, l \chord{A}eave her! \\
For the \chord{D}voyage is lo \chord{A}ng and the w \chord{h}inds dont bl \chord{A}ow \\
And its t \chord{A}ime for \chord{E}us to le \chord{A}ave her.
Ref.: \chord{E}Leave her, Johnny, \chord{A}leave her! \\
Oh, \chord{D}leave her, Johnny, \chord{A}leave her! \\
For the \chord{D}voyage is \chord{A}long and the \chord{h}winds dont \chord{A}blow \\
And its \chord{A}time for \chord{E}us to \chord{A}leave her.
\end{verse}
\begin{verse}