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

@@ -6,15 +6,15 @@
}
\begin{verse}
Alle St \chord{G}raßen dies \chord{D}er \chord{G} Erde führen j \chord{e}eden nur im Kr \chord{D}eis, \\
der dem \chord{a}ewgen Stirb \chord{G}und W \chord{C}erde, \chord{D}nicht den Hafen \chord{G}weiß.
Alle \chord{G}Straßen \chord{D}dieser \chord{G}Erde führen \chord{e}jeden nur im \chord{D}Kreis, \\
der dem \chord{a}ewgen Stirb \chord{G}und \chord{C}Werde, \chord{D}nicht den Hafen \chord{G}weiß.
\end{verse}
\begin{verse}
Ref: \\
/: S \chord{G}onne \chord{C}jagt die W \chord{G}olken, über Zellhof streicht d \chord{e}er \chord{D} Wind. \\
Was der T \chord{D}ag gebracht, \chord{a}deckt die Nacht, \\
dass sich Tr \chord{D}aum und W \chord{D7}achen f \chord{G}ind :/
/: \chord{G}Sonne \chord{C}jagt die \chord{G}Wolken, über Zellhof streicht \chord{e}der \chord{D}Wind. \\
Was der \chord{D}Tag gebracht, \chord{a}deckt die Nacht, \\
dass sich \chord{D}Traum und \chord{D7}Wachen \chord{G}find :/
\end{verse}
\begin{verse}