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,18 +10,18 @@
}
\begin{verse}
Oh, B \chord{E}ootsmann, Bootsmann, s \chord{H7}ag uns doch, / wann \\
g \chord{E}ehen \chord{H7}wir in S \chord{E}ee? / Wenn hoch am Maste die Fl \chord{H7}aggen \\
wehn, / die M \chord{E}ädels all am \chord{H7}Ufer stehn, / dann g \chord{E}ehen w \chord{H7}ir \\
in S \chord{E}ee.
Oh, \chord{E}Bootsmann, Bootsmann, \chord{H7}sag uns doch, / wann \\
\chord{E}gehen \chord{H7}wir in \chord{E}See? / Wenn hoch am Maste die \chord{H7}Flaggen \\
wehn, / die \chord{E}Mädels all am \chord{H7}Ufer stehn, / dann \chord{E}gehen \chord{H7}wir \\
in \chord{E}See.
\end{verse}
\begin{verse}
Ref.: \\
H \chord{E}ejaho, hejaho! Ja, das M \chord{H7}eer, das ist groß und der \\
H \chord{E}immel ist frei, und der B \chord{H7}ootsmann hat recht, ja was \\
i \chord{E}st denn dabei! Wir sind fr \chord{A}ei und \chord{H7}fahren zur S \chord{E}ee \\
ahoi, wir sind frei und f \chord{H7}ahren zur S \chord{E}ee.
\chord{E}Hejaho, hejaho! Ja, das \chord{H7}Meer, das ist groß und der \\
\chord{E}Himmel ist frei, und der \chord{H7}Bootsmann hat recht, ja was \\
\chord{E}ist denn dabei! Wir sind \chord{A}frei und \chord{H7}fahren zur \chord{E}See \\
ahoi, wir sind frei und \chord{H7}fahren zur \chord{E}See.
\end{verse}
\begin{verse}