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,8 +7,8 @@
}
\begin{verse}
Und der He \chord{d}rbst hat s \chord{A}ich erh \chord{d}oben, / und die w \chord{g}ilden \\
Gänse t \chord{d}o \chord{A}be \chord{d}n. / F \chord{F}ühr das Ruder, l \chord{B}ieber Br \chord{F}uder, / \\
Und der \chord{d}Herbst hat \chord{A}sich \chord{d}erhoben, / und die \chord{g}wilden \\
Gänse \chord{d}toben. / \chord{F}Führ das Ruder, \chord{B}lieber \chord{F}Bruder, / \\
\chord{C7}eh in Asche \chord{F}du zerstoben!
\end{verse}