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

@@ -7,10 +7,10 @@
}
\begin{verse}
Ihr s \chord{a}ollt ni \chord{F}cht im D \chord{G}unkel verm \chord{a}odern, zu B \chord{C}es \chord{F}serem s \chord{G}eid ihr \\
noch h \chord{C}ier: Das Leben will flammen und l \chord{F}odern, \\
und, F \chord{C}reunde, das Leben seid i \chord{G}hr. Das L \chord{a}eben will \\
f \chord{G}lammen und lo \chord{F}dern, und, F \chord{C}reunde, das L \chord{G}eben seid \chord{C}ihr.
Ihr \chord{a}sollt \chord{F}nicht im \chord{G}Dunkel \chord{a}vermodern, zu \chord{F}Besserem \chord{G}seid ihr \\
noch \chord{C}hier: Das Leben will flammen und \chord{F}lodern, \\
und, \chord{C}Freunde, das Leben seid \chord{G}ihr. Das \chord{a}Leben will \\
\chord{G}flammen und \chord{F}lodern, und, \chord{C}Freunde, das \chord{G}Leben seid \chord{C}ihr.
\end{verse}
\begin{verse}