On 07/03/2020 14:52, Noeck wrote:
Thank you, Timothy,
this is how far I got already. It is probably a step in the right
direction. But there are two issues with it:
1) I would like to use some Scheme code on the fields (with if etc),
so I need the 'header:author as a string and #(markup->string …)
did not work.
2) Can this be put in a command which I can move to a separate file?
Like \evaluateHeaders
Cheers,
Joram
Ok, so here is an example of a function to create a bookpart
consisting of a single blank page by clearing all the header
variables. It should give some clues about how to construct a header
in Scheme,
\version "2.19.80"
% Print a blank page
blankpage = #(define-void-function () ()
(let ((bookpart #{ \bookpart { \paper { page-count = 1
print-page-number = ##f } \markup \null } #})
(header (make-module))
(props '(dedication title subtitle subsubtitle instrument
poet composer meter arranger opus piece copyright)))
(for-each (lambda (prop) (module-define! header prop #f)) props)
(ly:book-set-header! bookpart header)
(ly:book-add-bookpart! $current-book bookpart)))