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,15 +9,15 @@
}
\begin{verse}
Sti \chord{d}ebt vom Kasbek kalt der Schnee, t \chord{A}ausend Diam \chord{d}anten; \\
w \chord{d}irbeln auf den Wintersee, d \chord{A}en vom Eis geb \chord{d}annten.
\chord{d}Stiebt vom Kasbek kalt der Schnee, \chord{A}tausend \chord{d}Diamanten; \\
\chord{d}wirbeln auf den Wintersee, \chord{A}den vom Eis \chord{d}gebannten.
\end{verse}
\begin{verse}
Ref.: \\
H \chord{F}ei Tscherkesse! S \chord{C}ei nicht faul, / l \chord{d}ass die Troika \chord{A}jagen, \\
\chord{d}unter bl \chord{g}eichem St \chord{d}eppenm \chord{g}onde / f \chord{d}ern die W \chord{A}ölfe k \chord{d}lagen. \\
\chord{d}U Kawk \chord{A}askich g \chord{d}or!
\chord{F}Hei Tscherkesse! \chord{C}Sei nicht faul, / \chord{d}lass die Troika \chord{A}jagen, \\
\chord{d}unter \chord{g}bleichem \chord{g}Steppenmonde / \chord{d}fern die \chord{A}Wölfe \chord{d}klagen. \\
\chord{d}U \chord{A}Kawkaskich \chord{d}gor!
\end{verse}
\begin{verse}