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

@@ -8,15 +8,15 @@
}
\begin{verse}
Wo \chord{d}´s nur Felsen gibt, da bin ich gebo \chord{A}ren, / \\
früh ward ich geliebt, früh bekam ich Sp \chord{d}oren, / \\
Do \chord{g}lch und Silberschlos \chord{d}s, wähl \chord{g}te mir mein Ros \chord{d}s, / \\
t \chord{A}anzte manchen Tanz, Kelche trank ich gan \chord{d}z. \\
\chord{d}Wo´s nur Felsen gibt, da bin ich \chord{A}geboren, / \\
früh ward ich geliebt, früh bekam ich \chord{d}Sporen, / \\
\chord{g}Dolch und \chord{d}Silberschloss, \chord{g}wählte mir mein \chord{d}Ross, / \\
\chord{A}tanzte manchen Tanz, Kelche trank ich \chord{d}ganz. \\
Ref.: \\
/: Wi \chord{d}r sind voller Märchen \chord{A}und Leg \chord{A7}enden, / \\
w \chord{d}ir haben Schwielen von den Säbe \chord{g}ln an den Händen, / \\
wir schlafen tags und durchre \chord{d}iten die Nächte, / \\
sto \chord{A}lz auf die Narben vom l \chord{d}etzten Gefechte.:/
/: \chord{d}Wir sind voller Märchen \chord{A}und \chord{A7}Legenden, / \\
\chord{d}wir haben Schwielen von den \chord{g}Säbeln an den Händen, / \\
wir schlafen tags und \chord{d}durchreiten die Nächte, / \\
\chord{A}stolz auf die Narben vom \chord{d}letzten Gefechte.:/
\end{verse}
\begin{verse}