fix markup tag group trouble accross songs

This commit is contained in:
2026-04-10 14:29:20 +02:00
parent 71c8c0385c
commit 6e528a5328
3 changed files with 17 additions and 1 deletions

View File

@@ -39,6 +39,7 @@
\include "title_with_category_images.ily"
\include "chord_settings.ily"
\include "transposition.ily"
\include "markup_tag_groups_hack.ily"
\include "verses_with_chords.ily"
\include "arrows_in_scores.ily"
\include "swing_style.ily"

View File

@@ -0,0 +1,13 @@
% We have to record the tag groups for markup, so we use the right tag groups during markup interpretiton.
recordedTagGroups = #'()
tagGroup =
#(define-void-function (tags) (symbol-list?)
(let ((err (define-tag-group tags)))
(if err (ly:parser-error err (*location*))
(set! recordedTagGroups (cons tags recordedTagGroups)))))
#(define-markup-command (handle-tag-groups layout props recorded-groups m) (list? markup?)
(resetTagGroups)
(every (lambda (group) (define-tag-group group)) recorded-groups)
(interpret-markup layout props m))