lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing page number in markup for custom title


From: Han-Wen Nienhuys
Subject: Re: Accessing page number in markup for custom title
Date: Sat, 25 Jun 2005 01:23:15 +0200
User-agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513)

Rob Vlasaty wrote:
I’m trying to make a different title for each song in a book depending on the page 
(song number to the left then title for even pages, title then song number to the right for odd 
pages).  I’ve managed to write a little bit of scheme code, but I’m stuck 
on how to access the value of the page number.  Here’s what I've come up with so far:

#(define MyTitle (if (odd? 3) "odd title" "even title" ) )

        scoreTitleMarkup = \markup {    
                \MyTitle
}

This works when I put in an even or odd number in place of the “3”.  From looking at the 
file titling.scm, I would think I could just replace the “3” with 
“page-number”, but that doesn’t work.  I’ve tried every variation I 
could think of with no luck, and can't find anything in the documents.  What expression would I put to access 
the page number at this point?


Have a look at how page numbers are done in ly/titling-init.ly


--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]