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,21 +9,21 @@
}
\begin{verse}
As \chord{C} I was going over the f \chord{a}ar famed Kerry mountains \\
I m \chord{F}et with Captain Farrell and his m \chord{C}oney he was counting. \\
I first produced my pistol, and t \chord{a}hen produced my rapier. \\
S \chord{F}aying stand and deliver, for I \chord{C}am a bold deceiver.
As \chord{C}I was going over the \chord{a}far famed Kerry mountains \\
I \chord{F}met with Captain Farrell and his \chord{C}money he was counting. \\
I first produced my pistol, and \chord{a}then produced my rapier. \\
\chord{F}Saying stand and deliver, for I \chord{C}am a bold deceiver.
\end{verse}
\begin{verse}
Ref: \\
Musha r \chord{G7}ing dumma do damma da \\
Musha \chord{G7}ring dumma do damma da \\
whack for the daddy 'oh
\end{verse}
\begin{verse}
whack for the daddy 'oh \\
there's w \chord{C}hiskey \chord{G7} in the j \chord{C}ar.
there's \chord{C}whiskey \chord{G7}in the \chord{C}jar.
\end{verse}
\begin{verse}