This is a stripped down version of the first three pages of my input file, Hwaen Ch'uqi. Do I need something as elaborate as your scheme code?
-David %%%%%%%% BEGIN LILY %%%%%%%% \version "2.20.0" \book { % \bookpart { \markup \fill-line{ \center-column { "Title page" } } \pageBreak } % \bookpart { \markup \justify{ Page of notes. Page "ii." } \paper { tagline = "" left-margin = 2\cm right-margin = 2\cm print-page-number = ##t print-first-page-number = ##f page-number-type = roman-lower oddHeaderMarkup = \markup \null evenHeaderMarkup = \markup \null oddFooterMarkup = \markup { \fill-line { \on-the-fly \print-page-number-check-first \fromproperty #'page:page-number-string } } } \pageBreak } % \bookpart { \score { \relative c { c1 } } \header { title = "Want this to be be page 1 not 3" } \paper { tagline = "" } } % End bookpart } %%%%%%%% END LILY %%%%%%%% ----- Original Message ----- > From: "Hwaen Ch'uqi" <hwaench...@gmail.com> > To: "bobroff" <bobr...@centrum.is> > Cc: "Lillypond Users Mailing List" <lilypond-user@gnu.org> > Sent: Sunday, February 7, 2021 11:07:22 AM > Subject: Re: set page number > Greetings David, > > Not knowing what you halve already, it's a bit tricky to advise. > However, here is the code that I use, given a long time ago on this > list. It may be more than you need, because it also includes > provisions for correct numbering in the Table of Contents. This first > part goes above the \book block: > > %%% roman numeral page numbers > #(define begin-arabic 11) > > %% The following is an adaptation of a function found in > `define-markup-commands.scm' which is used to create tables of > contents. An offset to the Arabic numerals has been incorporated so > that the first page of the music is 1. > #(define-markup-command (page-ref layout props label gauge default) > (symbol? markup? markup?) > #:category other > " > @cindex referencing page numbers in text > > Reference to a page number. @var{label} is the label set on the referenced > page (using the @code{\\label} command), @var{gauge} a markup used to estimate > the maximum width of the page number, and @var{default} the value to display > when @var{label} is not found." > (let* ((gauge-stencil (interpret-markup layout props gauge)) > (x-ext (ly:stencil-extent gauge-stencil X)) > (y-ext (ly:stencil-extent gauge-stencil Y))) > (ly:make-stencil > `(delay-stencil-evaluation > ,(delay (ly:stencil-expr > (let* ((table (ly:output-def-lookup layout 'label-page-table)) > (page-number (if (list? table) > (assoc-get label table) > #f)) > (page-markup > (if page-number > (if (< page-number begin-arabic) > (format #f "~(~@r~)" page-number) ; > Roman numerals > ; Arabic numerals, but offset to begin on 1 > (format #f "~a" (- (1+ page-number) > begin-arabic))) > default)) > (page-stencil (interpret-markup layout props > page-markup)) > (gap (- (interval-length x-ext) > (interval-length (ly:stencil-extent > page-stencil X))))) > (interpret-markup layout props > (markup #:concat (#:hspace gap > page-markup))))))) > x-ext > y-ext))) > > #(define-markup-command (roman-numeral-page-number layout props) () > (let ((page-number (chain-assoc-get 'page:page-number props -1))) > (interpret-markup layout props > (if (> page-number 0) ; only positive integers can be `romanized' > (format #f "~(~@r~)" page-number) > (chain-assoc-get 'page:page-number-string props -1))))) > > #(define-markup-command (offset-page-number layout props offset) (integer?) > (let ((page-number (chain-assoc-get 'page:page-number props -1))) > (interpret-markup layout props > (format #f "~a" (- page-number offset))))) > > #(define (part-not-first-page layout props arg) > (if (= (chain-assoc-get 'page:page-number props -1) > (ly:output-def-lookup layout 'first-page-number)) > empty-stencil > (interpret-markup layout props arg))) > > You can change the begin-arabic number to whatever you need, the > number being the first Roman page that should have the Arabic number > 1. Then, in the bookparts containing Arabic numbers, I include this in > the \paper block: > > oddHeaderMarkup = \markup { > \fill-line { > " " > \on-the-fly #create-page-number-stencil \offset-page-number #(1- > begin-arabic) > } > } > evenHeaderMarkup = \markup { > \fill-line { > \on-the-fly #create-page-number-stencil \offset-page-number #(1- > begin-arabic) > " " > } > } > > hth, > > Hwaen Ch'uqi > > > On 2/7/21, bobr...@centrum.is <bobr...@centrum.is> wrote: >> I have a series of scores in a small book. I want to have the first couple >> of pages numbered in Roman numerals and then switch to Arabic. I have >> accomplished that. The problem I face now is that I want the first Arabic >> numbered page to be page 1. There is '\set currentBarNumber' but there does >> not seem to be a corresponding '\set currentPageNumber' or equivalent. >> >> There must be a way to do this. >> >> Thanks for any help. >> >> David >>