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

@@ -5,11 +5,11 @@
}
\begin{verse}
Ad \chord{D}e \chord{A7}nun zur gu \chord{D}ten Nacht! \\
J \chord{A7}etz \chord{D}t \chord{G}wird der Sch \chord{D}luss gema \chord{h}cht, / dass i \chord{e}ch muss \\
sch \chord{A7}eid \chord{D}en. /: \chord{A7}Im \chord{D}Sommer, da \chord{G}chst der Klee \chord{e}, \\
im W \chord{A7}inter, da schne \chord{D}it's den Schn \chord{h}ee, \\
da k \chord{e}omme ich wie \chord{A7}der \chord{D}.:/
\chord{D}Ade \chord{A7}nun zur \chord{D}guten Nacht! \\
\chord{D}Jetzt \chord{G}wird der \chord{D}Schluss \chord{h}gemacht, / dass \chord{e}ich muss \\
\chord{D}scheiden. /: \chord{A7}Im \chord{D}Sommer, da \chord{G}chst der \chord{e}Klee, \\
im \chord{A7}Winter, da \chord{D}schneit's den \chord{h}Schnee, \\
da \chord{e}komme ich \chord{D}wieder.:/
\end{verse}
\begin{verse}