[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
\tocItem within \score block, using header properties
From: |
Joel C. Salomon |
Subject: |
\tocItem within \score block, using header properties |
Date: |
Tue, 6 Dec 2022 12:10:49 -0500 |
The requirement that `\tocItem` is either outside the `\score` block
or within a music variable is making it awkward for me to keep it near
where the score `\header` block defines the piece title. And I have
entirely failed to figure out a way to re-use the piece title.
Minimal example below, showing different ways I've tried.
Is there a cleaner way to accomplish this?
—Joel
\version "2.23.80"
upperI = \relative c' {
\tocItem \markup "Piece Title" % works, but is an awkward place
c4 d e f }
lowerI = \relative c {\clef bass f e d c }
scoreI = \score {
\header {
piece = "Piece Title"
}
\new PianoStaff <<
% \tocItem \markup \fromproperty #'header:piece % doesn't work
% \tocItem \markup "Piece Title" % works, but creates extra staff
\new Staff = "upper" \upperI
\new Staff = "lower" \lowerI
>>
}
\book {
\markuplist \table-of-contents
% \tocItem \markup "Piece Title" % breaks locality
\scoreI
}
- \tocItem within \score block, using header properties,
Joel C. Salomon <=