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

@@ -6,12 +6,12 @@
}
\begin{verse}
E \chord{C}isiges Land \chord{e} von Feu \chord{a}ern durchzogen \chord{e} und manchem \\
bekan \chord{C}nt als In \chord{d}sel der H \chord{C}erzen namens Thule \chord{G}strand. \\
G \chord{C}laub ich dara \chord{e}n, was die Alt \chord{a}en erzähl \chord{e}en so lebe \chord{F}n dort \\
noch he \chord{C}ute Tro \chord{E}lle und Fee \chord{E7}n. \\
Ref: /: I \chord{F}sl \chord{C}and, du E \chord{G}nde der We \chord{a}lt, bi \chord{d}st Nordlands Ins \chord{a}el \\
von der man gerne \chord{E7} erzählt. \chord{a} :/
\chord{C}Eisiges Land \chord{e}von \chord{a}Feuern durchzogen \chord{e}und manchem \\
\chord{C}bekannt als \chord{d}Insel der \chord{C}Herzen namens \chord{G}Thulestrand. \\
\chord{C}Glaub ich \chord{e}daran, was die \chord{a}Alten \chord{e}erzählen so \chord{F}leben dort \\
noch \chord{C}heute \chord{E}Trolle und \chord{E7}Feen. \\
Ref: /: \chord{C}Island, du \chord{G}Ende der \chord{a}Welt, \chord{d}bist Nordlands \chord{a}Insel \\
von der man gerne \chord{E7}erzählt. \chord{a}:/
\end{verse}
\begin{verse}