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

@@ -9,14 +9,14 @@
}
\begin{verse}
H \chord{d}ier w \chord{F}ächst kein \chord{C}A \chord{d}horn, \\
hier w \chord{C}ächst kein Pfl \chord{e}aumenb \chord{d}aum. \\
Hier w \chord{F}achsen kei \chord{C}ne Mäd \chord{e}chenhe \chord{d}rzen, \\
k \chord{C}eine Mädchenher \chord{d}zen.
\chord{d}Hier \chord{F}wächst kein \chord{d}Ahorn, \\
hier \chord{C}wächst kein \chord{d}Pflaumenbaum. \\
Hier \chord{F}wachsen \chord{C}keine \chord{d}Mädchenherzen, \\
\chord{C}keine \chord{d}Mädchenherzen.
\end{verse}
\begin{verse}
/: L \chord{d}a \chord{C}la, lalala l \chord{d}a, \chord{C} la lalala \chord{d}la \chord{C} l \chord{e}a \chord{d}la lala la.:/
/: \chord{d}La \chord{C}la, lalala \chord{d}la, \chord{C}la lalala \chord{d}la \chord{e}la \chord{d}la lala la.:/
\end{verse}
\begin{verse}