|
From: | Timothy Lanfear |
Subject: | Re: Function operating on header |
Date: | Sat, 7 Mar 2020 17:50:24 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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))) -- Timothy Lanfear, Bristol, UK.
[Prev in Thread] | Current Thread | [Next in Thread] |