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

@@ -9,10 +9,10 @@
}
\begin{verse}
Meine Son \chord{C}ne will \chord{G} ich fra \chord{a}gen, / meine Ste \chord{e}rne, meine \\
N \chord{C}acht, / hat ein Sturm ihn f \chord{G}ortgetrag \chord{a}en, / hat ein \\
Kr \chord{e}ieg ihn umgebra \chord{G}cht? / Unterm Flied \chord{e}erbaum \\
ver \chord{G7}lassen,/ fortgew \chord{d}eht aus leeren Gass \chord{C}en.
Meine \chord{C}Sonne will \chord{G}ich \chord{a}fragen, / meine \chord{e}Sterne, meine \\
\chord{C}Nacht, / hat ein Sturm ihn \chord{a}fortgetragen, / hat ein \\
\chord{e}Krieg ihn \chord{G}umgebracht? / Unterm \chord{e}Fliederbaum \\
\chord{G7}verlassen,/ \chord{d}fortgeweht aus leeren \chord{C}Gassen.
\end{verse}
\begin{verse}
@@ -20,8 +20,8 @@ Ref.:
\end{verse}
\begin{verse}
Lilas bl \chord{e}anches, li \chord{F}las b \chord{C}leues, / \chord{d}oh mon c \chord{C}oeur, \\
\chord{G7}oh mon die \chord{C}u.
Lilas \chord{e}blanches, \chord{F}lilas \chord{C}bleues, / \chord{d}oh mon \chord{C}coeur, \\
\chord{G7}oh mon \chord{C}dieu.
\end{verse}
\begin{verse}