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,12 +7,12 @@
}
\begin{verse}
She ha \chord{e}ngs her head and cries in my shirt. \\
She mus \chord{D}t be hur \chord{e}t very bad \chord{D}l \chord{G}y. / Tell me, what´s \\
ma \chord{D}king you sad \chord{e}ly \chord{A}? / Ope \chord{e}n your door, d \chord{A}on´t \\
h \chord{D}ide in the d \chord{C}ark, / you´re \chord{D}lost in the d \chord{e}ark, you \\
can t \chord{D}rust m \chord{G}e, / cause you know that h \chord{D}ow it \\
mu \chord{e}st \chord{A} be. / L \chord{e}isa, Lis \chord{D}a, \chord{C} s \chord{H7}ad Lisa, Lisa \chord{e}.
She \chord{e}hangs her head and cries in my shirt. \\
She \chord{D}must be \chord{e}hurt very \chord{G}badly. / Tell me, what´s \\
\chord{D}making you \chord{A}sadly? / \chord{e}Open your door, \chord{A}don´t \\
\chord{D}hide in the \chord{C}dark, / you´re \chord{D}lost in the \chord{e}dark, you \\
can \chord{D}trust \chord{G}me, / cause you know that \chord{D}how it \\
\chord{e}must \chord{A}be. / \chord{e}Lisa, \chord{D}Lisa, \chord{H7}sad Lisa, \chord{e}Lisa.
\end{verse}
\begin{verse}