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,12 +10,12 @@
}
\begin{verse}
Das Lil \chord{E}ie \chord{H7}nbanner wehe \chord{E}t, \\
komm, Brude \chord{A}r, reic \chord{H7}h die Han \chord{E}d \\
und wen \chord{E}n der Stur \chord{H7}m auch wehe \chord{E}t, \\
wir f \chord{A}ahren dur \chord{H7}ch das La \chord{E}nd. \\
Wir fa \chord{A}hren auf und ni \chord{E}e \chord{H7}de \chord{E}r, zur gu \chord{H7}ten Tat berei \chord{E}t, \\
/: hell erkl \chord{E}ingen unsre Lieder: Gut P \chord{H7}fad, Allzeit Ber \chord{E}eit.:/
Das \chord{H7}Lilienbanner \chord{E}wehet, \\
komm, \chord{A}Bruder, \chord{H7}reich die \chord{E}Hand \\
und \chord{E}wenn der \chord{H7}Sturm auch \chord{E}wehet, \\
wir \chord{A}fahren \chord{H7}durch das \chord{E}Land. \\
Wir \chord{A}fahren auf und \chord{E}nieder, zur \chord{H7}guten Tat \chord{E}bereit, \\
/: hell \chord{E}erklingen unsre Lieder: Gut \chord{H7}Pfad, Allzeit \chord{E}Bereit.:/
\end{verse}
\begin{verse}