\version "2.22.2"
xBook =
#(define-void-function (key score)
(string? ly:score?)
(print-book-with-defaults
#{
\book {
\bookOutputSuffix $key
\paper {
oddHeaderMarkup = \markup {
\on-the-fly \first-page {
\circle \pad-around #2 $key
}
\on-the-fly \not-part-first-page {
\fromproperty #'header:title
\concat { "[" $key "]" }
"- p." \fromproperty #'page:page-number-string
}
}
evenHeaderMarkup = \markup {
\fromproperty #'header:title
\concat { "[" $key "]" }
"- p." \fromproperty #'page:page-number-string
}
}
$score
}
#}))
\header {
title = "TEST"
}
% FONCTIONNE PARFAITEMENT :
\xBook "Ut" \score {
\relative c' {
a b c d
\pageBreak
a b c d
}
}
% CE QUE JE SOUHAITERAIS
% NE FONCTIONNE PAS :
\xBook "Ut" {
\score {
\relative c' {
a b c d
\pageBreak
a b c d
}
}
\score {
\relative c' {
d c b a
}
}
}