On 07/08/2019 15:29, Pierre-Luc Gauthier wrote:
Hello there,

I trying to add the *current* piece in the header and/or footer of,
say, every page in a score.

As mentioned here :

http://lilypond.org/doc/v2.19/Documentation/notation/creating-titles-headers-and-footers#default-layout-of-headers-and-footers

"These markup variables can only access text fields from top-level
\header blocks (which apply to all scores in the book)."

Is there a way to get around this limitation?

Thanks for any pointers
Here is a MWE
--
Pierre-Luc Gauthier

Structure the book with bookparts. As a bonus, a bookpart starts a new page so you don't need pageBreak.


--
Timothy Lanfear, Bristol, UK.

\version "2.19.83"

\header {
  piece = \markup \typewriter \italic \bold "Not the good piece name"
}

\paper {
  oddHeaderMarkup = \markup {
    The piece on this page is :
    \fromproperty #'header:piece
  }
  evenHeaderMarkup = \oddHeaderMarkup
  oddFooterMarkup = \oddHeaderMarkup
  evenFooterMarkup = \oddHeaderMarkup
}

\book {
  \score {
    {a''4}
    \header {piece="Piece A"}
  }

% \pageBreak
  \bookpart {
    \header {piece="Piece B"}
    \score {
      {b'4}
    }
  }

% \pageBreak
  \bookpart {
    \header {piece="Piece C"}
     \score {
      {c'4}
    }
  }
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to