> On 3 Nov 2023, at 08:43, Jean Abou Samra <j...@abou-samra.fr> wrote: > >>> Le 3 nov. 2023 à 07:56, Paul Scott <waterhorsemu...@aol.com> a écrit : >>> >> I know how to use fromproperty to put the page number in a header or footer. >> Can I get the page number in a variable so I can use it in another text >> string? > > > It depends on what kind of variable you are talking about and what you want > to use it for. There is no way to do "num = \currentPage" in the middle of > the music, simply because the music cannot be defined in terms of its own > page numbers. However, if you write a custom markup command, then you can > read the 'page:page-number property, and this will work in paper or header > markups (but elsewhere, it gets more subtle). > > So, this is a little complicated in general. But if you're just trying to > print a reference like "go to page x", see \label and \markup \page-ref ( > https://lilypond.org/doc/v2.25/Documentation/notation/other-markup-commands ).
In case you need some example of applying it you can find it at https://lilypond.org/doc/v2.25/Documentation/notation/reference-to-page-numbers