Sorry. I neglected to include the users group in my reply.
-------- Forwarded Message --------
Subject: Re: data available for the header
Date: Tue, 15 Apr 2025 18:42:14 -0400
From: clyde <mizug...@gmail.com>
To: William Rehwinkel <will...@williamrehwinkel.net>
Thank-you William,
Your attached sample is essentially what I started with up to the point
where I wanted two movements. For that,I followed the example in section
3.2.1. It uses a "global" (not in the code sense) header for the major
title and uses a score for each of the movements. Embedded in each score
is another header block which generates an additional title markup and
allows any field, ie title, to be overridden. The paper variable
print-all-headers determines whether to print both headers. Apparently
the page headers use only the first header block that is encountered.
But as I was comparing your example and mine, it [finally] occurred to
me that it might be a scope issue and there was an intermediate option.
I had originally declared a header for the book and one for each score
in the bookparts. In the attached version, I no longer declare a header
block for the book, but instead declare one for each bookpart that
includes the "major" title and the instrument. That information is
indeed used in generating page headers as desired. And the header blocks
for the scores override the titles to show the movement names as before.
Thank-you for your help. I have attached the modified version of my
example (after paring it down a bit more like yours).
On 4/15/25 14:28, William Rehwinkel wrote:
Dear Clyde,
You should be able to do this with separate \book{} or \bookpart{}
blocks. Try the example attached file. Does this achieve what you were
hoping for?
Thanks,
-William
On 4/15/25 12:55, clyde wrote:
I would like the page header to change on the fly as data about the
composition changes. For instance, I'd like the header on the pages
for each part of a quartet to indicate the part name. The page number
changes, but info from the header field does not get changed. Is
there some means to do that? Using
\fromproperty #'header:instrument
in one of the evenHeaderMarkup fields seems like the obvious method.
The titles seem to get updated that way. But the page header doesn't
change.
\version "2.22.1"
\language "english"
% Composition consists of two movements
% for quartet.
% I print the score and the parts as separate bookParts.
% I want the header of the pages for the instrument parts
% to display the instrument name.
% For the moment I am using the formatting of the poet field for the instrument name.
% The problem I have is that the page header seems to update the page number (as expected)
% but it does not update the poet field from the header.
\paper {
print-all-headers = ##t
}
scoreAI = \relative c'' { c1 }
scoreAII = \relative c'' { a1 }
scoreAIII = \relative c' { f1 }
scoreAIV = \relative c' { d1 }
scoreBI = \relative c'' { c1 \pageBreak a }
scoreBII = \relative c'' { a1 \pageBreak f }
scoreBIII = \relative c' { f1 \pageBreak c }
scoreBIV = \relative c' { c1 \pageBreak f }
\book {
%\header {
% title = "Major Title"
% composer = "Some Body"
% instrument = "quartet"
%}
\bookpart {
\header {
title = "Major Title"
composer = "Some Body"
instrument = "quartet"
}
\score {
\header {
title = "Part I"
instrument = "score"
composer = ##f
}
<<
\new Staff \scoreAI
\new Staff \scoreAII
\new Staff \scoreAIII
\new Staff \scoreAIV
>>
\layout { }
\midi { }
}
\score {
\header {
title = "Part II"
%instrument = "score"
composer = ##f
}
<<
\new Staff \scoreBI
\new Staff \scoreBII
\new Staff \scoreBIII
\new Staff \scoreBIV
>>
}
}
\bookpart {
\header {
title = "Major Title"
composer = "Some Body"
instrument = "instr I"
}
\score {
\header {
title = "Part I"
instrument = ##f
composer = ##f
poet = "instr I"
}
\new Staff \scoreAI
}
\score {
\header {
title = "Part II"
instrument = ##f
composer = ##f
poet = "instr I"
}
\new Staff \scoreBI
}
}
\bookpart {
\header {
title = "Major Title"
composer = "Some Body"
instrument = "instr II"
}
\score {
\header {
title = "Part I"
instrument = ##f
poet = "instr II"
composer = ##f
}
\new Staff \scoreAII
}
\score {
\header {##f
title = "Part II"
instrument = ##f
poet = "instr II"
composer = ##f
}
ing\new Staff \scoreBII
}
}
\bookpart {
\header {
title = "Major Title"
composer = "Some Body"
instrument = "instr III"
}
\score {
\header {
title = "Part I"
instrument = ##f
poet = "instr III"
composer = ##f
}
\new Staff \scoreAIII
}
\score {
\header {
title = "Part II"
instrument = ##f
poet = "instr III"
composer = ##f
}
\new Staff \scoreBIII
}
}
\bookpart {
\header {
title = "Major Title"
composer = "Some Body"
instrument = "instr IV"
}
\score {
\header {
title = "Part IV"
instrument = ##f
poet = "instr IV"
composer = ##f
}
\new Staff \scoreAIV
}
\score {
\header {
title = "Part IV"
instrument = ##f
poet = "instr IV"
composer = ##f
}
\new Staff \scoreBIV
}
}
}