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,16 +10,16 @@
}
\begin{verse}
\chord{e}Unter den Toren im Schatt \chord{D}en der Stadt, schläft \\
man gut \chord{C}, wenn man sonst keine Schla \chord{H7}fstelle hat. / \\
Ke \chord{e}iner, der fragt nach wohe \chord{D}r und wo \chord{G}hin, und zu \\
k \chord{H7}alt ist die Nacht für Gend \chord{e}armen.
\chord{e}Unter den Toren im \chord{D}Schatten der Stadt, schläft \\
man \chord{C}gut, wenn man sonst keine \chord{H7}Schlafstelle hat. / \\
\chord{e}Keiner, der fragt nach \chord{D}woher und \chord{G}wohin, und zu \\
\chord{H7}kalt ist die Nacht für \chord{e}Gendarmen.
\end{verse}
\begin{verse}
Refrain: \\
/:H \chord{G}e \chord{D}ho, ein F \chord{G}euerlein b \chord{D}rennt, k \chord{e}alt ist es \chord{H7} für \\
Genda \chord{e}rmen. :/
\chord{D}/:Heho, ein \chord{G}Feuerlein \chord{D}brennt, \chord{e}kalt ist es \chord{H7}für \\
\chord{e}Gendarmen. :/
\end{verse}
\begin{verse}