On 18/04/17 20:28, Thomas Morley wrote:
#(format #t "\nCurrent output-filename: \"~a\"\n" (paper-variable (ly:parser-lookup '$current-book) 'output-filename))
This example of ly:parser-lookup was the clue I needed to figure out how to read fields in a book's header.
\version "2.19.59" #(define (booktitle) (let* ((mybook (ly:parser-lookup '$current-book)) (myheader (ly:book-header mybook))) (module-ref myheader 'title))) \book { \header { title = "MyPiece" } \bookOutputName #(string-join (list (getcwd) (booktitle)) "/") \score { c''1 } } -- Timothy Lanfear, Bristol, UK. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user