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

@@ -14,9 +14,9 @@
% ge immer den Originaltext - man solle Historisches eben nicht verleugnen.
\begin{verse}
Wir si \chord{D}tzen zu Pf \chord{A}erde, /: bei T \chord{D}ag und bei N \chord{A}acht, :/ \\
/: wir w \chord{D}eißen Dragoner, wir we \chord{G}ißen Dragoner, \\
wir we \chord{D}ißen Dragoner, dem Kaise \chord{A}r zur Wacht \chord{D}. :/
Wir \chord{D}sitzen zu \chord{A}Pferde, /: bei \chord{D}Tag und bei \chord{A}Nacht, :/ \\
/: wir \chord{D}weißen Dragoner, wir \chord{G}weißen Dragoner, \\
wir \chord{D}weißen Dragoner, dem \chord{A}Kaiser zur \chord{D}Wacht. :/
\end{verse}
\begin{verse}