> Le 3 nov. 2023 à 07:56, Paul Scott <[email protected]> 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 ).

Reply via email to