On 22/01/2024 19:09, Kieren MacMillan wrote:
Is there a more efficient construct where the book name and header variables
could be “injected” or “conditionalled” in? Or is that just overcomplicating
this particular problem-space? (n.b., In future questions, the problem-space is
naturally more complicated without any help from me!)
Thanks,
Kieren.
How about setting up some Scheme variables that are later used to build
variants of the score?
\version "2.24.2"
#(define variant 'full)
% or #(define variant 'short)
#(define bookname (format #f "MyScore_~a" variant))
#(define N (if (eq? variant 'full) 10 5))
notes = { c'4 d' e' f' }
final_score =
<<
\new Staff \notes
>>
\header {
composer = "Kieren MacMillan"
}
\book {
\bookOutputName \bookname
\header {
title = #(format #f "~a. Song" N)
}
\score { \final_score }
}
--
Timothy Lanfear, Bristol, UK.