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

@@ -7,15 +7,15 @@
}
\begin{verse}
We \chord{e}nn di \chord{D}e \chord{e}Zeit gekommen ist, für ein schöne \chord{D}s \\
kleines Fest, wenn die Ze \chord{e}it gekommen ist für \\
ein L \chord{D}ied, ja dann s \chord{G}ingen wir, ja dann sp \chord{e}ielen wir, \\
ja dann fe \chord{A}iern wir die ganze Na \chord{e}cht.
\chord{e}Wenn \chord{D}die \chord{e}Zeit gekommen ist, für ein \chord{D}schönes \\
kleines Fest, wenn die \chord{e}Zeit gekommen ist für \\
ein \chord{D}Lied, ja dann \chord{G}singen wir, ja dann \chord{e}spielen wir, \\
ja dann \chord{A}feiern wir die ganze \chord{e}Nacht.
\end{verse}
\begin{verse}
/:T \chord{e}schirimtimtim, tschirimtimtim, tschirimtimtim \\
\chord{D}tim timpterimtimti \chord{e}m.:/
\chord{e}/:Tschirimtimtim, tschirimtimtim, tschirimtimtim \\
\chord{D}tim \chord{e}timpterimtimtim.:/
\end{verse}
\begin{verse}