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

@@ -10,12 +10,12 @@
}
\begin{verse}
Wenn he \chord{E}ll die goldne Sonne lacht, / muss i \chord{H7}n die \\
Welt ich zi \chord{E}eh´n, / denn irgendwo muss voller \\
Pracht / die bl \chord{H7}aue Blume blü \chord{E}h´n. /: So w \chord{H7}andre ich \\
landa \chord{E}uf, landab, such die \chord{A}ses Blümelei \chord{H7}n, und \\
e \chord{E}rst wenn i \chord{A}ch´s gefu \chord{E}nden hab, stell \chord{H7}ich das \\
Wandern ein \chord{E}.:/
Wenn \chord{E}hell die goldne Sonne lacht, / muss \chord{H7}in die \\
Welt ich \chord{E}zieh´n, / denn irgendwo muss voller \\
Pracht / die \chord{H7}blaue Blume \chord{E}blüh´n. /: So \chord{H7}wandre ich \\
\chord{E}landauf, landab, such \chord{A}dieses \chord{H7}Blümelein, und \\
\chord{E}erst wenn \chord{A}ich´s \chord{E}gefunden hab, stell \chord{H7}ich das \\
Wandern \chord{E}ein.:/
\end{verse}
\begin{verse}