Confusing behavior of score titles when all fields turned off
\version "2.23.9"
\header {
piece = "piece"
opus = "opus"
}
\score {
{ c' }
}
\score {
\header {
piece = ##f
}
{ c' }
}
\score {
\header {
opus = ##f
}
{ c' }
}
\score {
\header {
piece = ##f
opus = ##f
}
{ c' }
}
As you can see, when opus
and piece
are defined in a top-level \header
(with markups interpreted into non-empty stencils) and they are redefined on \score
level, then setting either one to ##f
(or #'()
or ""
or anything that is not a markup yielding a non-empty stencil) suppresses the field in question, but setting both of them to such a value confusingly causes the title to appear as if these settings hadn't been done at all.
This apparently comes from paper-book.cc
:
Stencil title = score_title (header);
if (title.is_empty ())
title = score_title (header_);
This means that if the score-level title turns out empty, it tries to interpret the scoreTitleMarkup
without the \layout
coming from \score
. I have no idea why it does that. It makes no sense to me, and running regtests without it doesn't show any differences. Or maybe the purpose is to allow
\header {
piece = "piece"
opus = "opus"
}
{ c' }
but should that syntax really be allowed for setting score titles? The (Forget about this nonsense.)\header
should normally go inside the \score
.