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

@@ -11,11 +11,11 @@
% berichterstatter mit Gedichten wie diesem dem Kaiser entsprechend dankte.
\begin{verse}
Als wi \chord{G}r nach Fr \chord{D}ankreich zo \chord{G}g \chord{e}en, \\
wir wa \chord{a}ren un \chord{D}srer d \chord{G}rei, \\
/: ein Sch \chord{G}ütze und ein J \chord{e}äger, \\
und ic \chord{a}h, der Fahnenträ \chord{D}ger \\
der schwe \chord{G}ren Re \chord{D}it \chord{G}erei. :/
Als \chord{G}wir nach \chord{D}Frankreich \chord{e}zogen, \\
wir \chord{a}waren \chord{D}unsrer \chord{G}drei, \\
/: ein \chord{G}Schütze und ein \chord{e}Jäger, \\
und \chord{a}ich, der \chord{D}Fahnenträger \\
der \chord{G}schweren \chord{G}Reiterei. :/
\end{verse}
\begin{verse}