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,10 +8,10 @@
}
\begin{verse}
D \chord{C}er Mo \chord{G7}nd \chord{C}is \chord{F}t \chord{C}au \chord{G7}fge \chord{C}gangen, die g \chord{a}oldnen \chord{F}St \chord{G7}ernlein \\
p \chord{G7}ran \chord{C}gen am Him \chord{a}mel he \chord{F}ll \chord{C} u \chord{G7}nd \chord{C}kl \chord{G7}ar; \chord{C} der Wald steht \\
schwar \chord{F}z \chord{C}und schwe \chord{G7}ige \chord{C}t, und a \chord{a}us den Wi \chord{F}e \chord{C}sen st \chord{G7}eig \chord{C}et \\
der w \chord{a}eiße \chord{F}Ne \chord{C}be \chord{G7}l w \chord{C}underbar.
\chord{C}Der \chord{G7}Mond \chord{F}ist \chord{C}aufgegangen, die \chord{a}goldnen \chord{G7}Sternlein \\
\chord{C}prangen am \chord{a}Himmel \chord{F}hell \chord{G7}und \chord{G7}klar; \chord{C}der Wald steht \\
\chord{F}schwarz \chord{C}und \chord{C}schweiget, und \chord{a}aus den \chord{C}Wiesen \chord{C}steiget \\
der \chord{a}weiße \chord{G7}Nebel \chord{C}wunderbar.
\end{verse}
\begin{verse}